Dynamic WebService Invocation

Hi All,
i am facing a small issue regarding dynamic invocation of webservice from another webservice....
the probelm is when i tried to invoke a simple webmethod with string return type its working as expected.. and the same method is returning an array of string it started saying cant be able to deserialze the data....
i dont understand the meaning of this exception... can any body aware of this?
Regs,
Veeru

Hello,
When you have this error it is often because the JAX-RPC client does not know how to deserialize a specific XML type. In this case you have probably to use a custom mapping type.
It is quite hard to help you without any "real" information, could you please post the WSDL, the SOAP Response and the error. Also define how you exactly call the WS? JAX-RPC DII?
In the same time, you may know that we have on OTN a forum dedicated to Web Services
Regards
Tugdual Grall

Similar Messages

  • Dynamic Webservices Client

    Hey ,
    I have an application which requires to talk to 2 different published webservices
    from 2 different systems. Now instead od designing static webservice clients for
    each of these systems(which would involve having separate proxy jars etc),
    I am planning to design a dynamic webservice locator and invoker....
    I know that we can have webservice clients which are dynamic to the extent that
    we can create proxy objects at runtime once we know the endpoint WSDL..
    eg:
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName =new QName targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
    QName portName = new QName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
    QName operationName = new QName("urn:xmethods-delayed-quotes","getQuote");
    URL wsdlLocation = new URL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call Call call = service.createCall(portName, operationName);
    My question on this...if I have a dynamic approach like the above what are the
    pros and cons..I guess it would surely have more overhead compared to a static
    client...?
    Secondly ,is it even feasible to design a dynamic client in such a way that the
    endpoint WSDL could also be an unknown and my generic client would also locate
    the end-point dynamically and then invoke dynamic calls as above...
    If anybody can share their insights on a dynamic webservice client , I would really
    appreciate it...
    Thanx,
    Krish
    KRISH.VENKATARAMAN
    Senior Technology Analyst
    Bank of America Corp.
    Email:[email protected]

    Hi Krish,
    In WSDL, the data types passed between applications are described in schema
    and
    this is key for interop. I dont know of any standard/natural mapping for
    values types,
    object reference, etc in a binary protocol (like JRMP, IIOP) to schema. For
    eg:
    say there is serializable object Foo, which is the argument to a remote
    method in RMI.
    Object Foo can have data + behavior. It may be possible (not always, i
    think) to
    describe the data in Foo as schema, but how can one describe the behavior?
    So, if WSDL is the only contract between the server and client (key
    requirement
    for interop), then IMHO RMI can not be described by WSDL.
    Also, WSDL was designed for future extensions and does not map well to a
    programming API. WSIF trys to expose all the gory WSDL details and its apis
    are very clumsy.
    These were the two main reason to vote it down at JAX-RPC EC.
    I am attaching an example that shows, how to introspect WSDL and invoke
    a method using JAX-RPC (with little extension to the std api). Also, it
    shows
    how to handle complex type without data binding. Will this solve your
    problem?
    I am very interested to get your feedback on this.
    BTW, This example will only work with WLS 8.1.
    regards,
    -manoj
    "Krish Venkataraman" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    Mike...thanx for the inputs...
    As per ur suggestion...I have taken this offline and mailed u [email protected]
    also....lemme know if thatz cool...
    there are my observations..lemme know what am i missing..
    1) The main difference I see between JAX-RPC and WSIF, is that with WSIFclient
    it is easier to port to services talking
    via other ports like RMI,IIOP etc...where as JAX-RPC is understandsonly SOAP(atleast
    for now).
    2) Lets assume for the time-being that I would be interested only to talkto services
    talking SOAP.
    Then why do I need WSIF ?
    3) I can have a JX-RPC client , I can have a similar generic(reflection)code
    for built-in/primitive datatypes and for
    complex datatypes I anywayz would be doing the same thing(requiringthe java
    representation of the datatype unless I use
    something like JROM or something which I do not want to) in JAX-RPC orWSIF.
    >
    4) As far as syncronous or asyncronous invocation is concerned , myunderstanding
    is that my client call is going to remain the
    same ..the service provider is going to either use message-oriented orRPC
    on his side...
    Again assuming that I am interested only with services talking SOAP, thiscould
    be my generic client invocation design
    Background is that my client is going to run from within a WLS70sp1
    Actors:
    a) webSevice1ClientSessionBean : This will be a stateless session beanwhich might
    have knowledge about webSevice1's end-point ,
    complex dataTypes if any.
    (There would be other session beans like this which would haveknowledge about
    other specific webservice)
    b) GenericWebServiceInvoker : This will have knowledge about everythingwithin
    the webservice-standards/protocols.
    eg:
    //set weblogic ServiceFactory
    System.setProperty( "javax.xml.rpc.ServiceFactory",
    "weblogic.webservice.core.rpc.ServiceFactoryImpl" );
    //create service factory
    ServiceFactory factory = ServiceFactory.newInstance();
    //define qnames
    String targetNamespace = "http://soapinterop.org/";
    QName serviceName = new QName( targetNamespace, "SimpleTest" );
    QName portName = new QName( targetNamespace, "SimpleTestSoap" );
    QName operationName = new QName( "http://soapinterop.org/",
    "echoStruct" );
    //create service
    Service service = factory.createService( serviceName );
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( SOAPElement.class,
    new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
    new SOAPElementCodec(),
    new SOAPElementCodec() );
    //create call
    Call call = service.createCall();
    //set port and operation name
    call.setPortTypeName( portName );
    call.setOperationName( operationName );
    call.addParameter( "inputStruct",
    new QName( "http://soapinterop.org/xsd", "SOAPStruct" ),
    ParameterMode.IN);
    All parameter values specific to a particular webservice likeQName,targetNameSpace
    etc will be sent to this invoker by
    webSevice1ClientSessionBean. The GenericWebServiceInvoker will invokethe
    service
    (using reflection for primitive/builtin types) and alwayz accept anobject
    from the service operation and just return
    that "object" back the webSevice1ClientSessionBean.ThewebSevice1ClientSessionBean
    will know how to interpret the
    complexdataType or builtInDatatype whichever is returned.TheGenericWebServiceInvoker
    will not have any application
    specific knowledge...it will just have knowledge about how todiscover, invoke
    any SOAP webservice...
    Somewhere in the beginning of GenericWebServiceInvoker I will use JAXRto
    discover services from UDDI if needed.
    This way I will have a generic webservice client invocation frameworkwhich
    can invoke any service which talks SOAP.
    Now lemme know how the above picture looks and what is missing...
    I have some questions :
    1) Incase of complex dataTypes, I will have itz XML representation inthe
    publisher's WSDL and the publisher will give
    me the java representation of the complex dataType.But how does myclient
    JAX-RPC know how to map the XML
    to the java representation unless I specify the mapping somewhere?Does
    the TypeMapping/TypeMappingRegistry do this ?
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    You know, it's really cool to hear guys thinking things through, before
    they "jump
    on a bandwagon" :-)
    Anyway, I suspect that the performance overhead of doing reflection,
    and heavy
    server-side code intrusion, is what has made a lot of developers balk
    at using
    WSIF. I would check out the IBM newsgroups, to see what the general
    developer
    sentiment is on WSIF.
    To achieve any sort of decent performance with JAX-RPC based webservices,
    you
    need to do a fair amount of optimization/tuning on both the client and
    server
    side. I recommend setting up your own "lab environment" for doing these,
    so you
    can see exactly what's making things improve/degrade. If you are really
    interested
    in this topic, we should talk about it "off-line".
    In general, the more "dynamic" things are on the client side, the slower
    things
    will be, the more you really need to question if you really need them
    to be dynamic
    :-) Does making it "dynamic" really offer something that you can't get
    from a
    "static" version? If not, who's really benefiting here. I mean, com'n.
    All you
    really want to do is invoke an operation, right? By the time you get
    all the information
    it takes to do a dynamic invocation (i.e. port, target namespace, data
    type for
    input argument, serializer/deserializer for each non-built-in data type,
    etc.),
    your client looks like you are trying to boot a PDP-11! LOL! For those
    of you
    who don't know what a PDP-11 is, it's an early computer (from the'60-'70),
    that
    you actually had to use switches to create the "binary instructions"
    to boot it
    up!
    From a PM's (product manager's) perpective, I wouldn't even let thedevelopers
    modify "working" EJBs to expose them as a web service. Alarm bells should
    go off
    in your head, if you have to modify existing server-side code to expose
    a company
    asset as a web service.
    Response to OT comment: WebLogic Server 7.0 uses its own implementation
    of JAX-RPC
    1.0. This implementation, I've been told by one of the BEA engineering
    that worked
    on it, has been certified to be JAX-RPC compliant by Sun. Don't know
    about Apache
    Axis, in this regard. I use both Apache Axis and the JWSDP with WLS 6.1,
    but I
    haven't really spent a lot of time looking for differences between our
    (BEA's)
    implementation, and theirs.
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Hey Mike ...
    I hear ya..and I see the significance of WSIF...but that IBM started
    it a year
    back and itz not yet stabilized is what is holding me back...
    U mite have a better hold of what WSIF can do...whatever I could grasp
    from yesterday
    is this...
    a)It reads meta data from the wsdl and using a reflection mechanismcalls
    the
    service operations...
    I see examples with primitive datatypes..but what happens when
    complex/custom
    datatypes come into play...
    Would the client code differ between synchronous invocation toasynchronous
    invocation...
    And aleast in the samples for the WSIF distribution for connectors like
    EJB/JMS
    etc, the code does not look generic anymore..there are specific calls
    to operations
    and parameters...
    Also Mike , what is the trade-off on performance between having adynamic
    client(lets
    say based on WSIF)or having a static client...the extent of reflection
    a dynamic
    client will have to do and create SAAJ objects at runtime will beenormous..
    Also I know that there is a relevant API...but can u give an examleshowing
    me
    how I could discover services from UDDI ..?
    Out of this current topic...does BEA use itz own implementation of SOAP
    in itz
    webservice implementation...and how does it compare with AXIS ?
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    Hi Krish,
    Well, I guess that's how things are when "needed functionality exceeds
    the current
    state of a technology" :-)
    I (not necessarily BEA) look at it like way:
    1. IBM co-authored the "Big 3" XML grammars for the current web
    services
    stack.
    2. IBM always appears to be "there, somewhere" in the new crop ofproposed
    additional
    XML grammars for "partially agreed upon extension layers", for theweb
    services
    stack.
    3. IBM donated it's original SOAP implementation to the open-sourcecommunity.
    4. IBM came up with WSIF over a year ago.
    5. IBM's WSTK uses the Apache Axis stuff.
    6. A lot of the JAX-RPC/JAXM API is based on the Apache SOAP and Apache
    Axis implementations.
    7. It looks like IBM may have donated WSIF to Axis.
    8. You appear to need something like WSIF :-)
    So, there's probably at least a 60/40 chance that some WSIF-like thing
    will make
    it into the JWSDP, right? If you want "higher odds", you should talk
    to the folks
    working on the JWSDP, as they are somewhat "in charge" here :-)
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Yes...I am surely lookin at something similar...but that framework
    not
    being standardized
    scares me as I have seen many good ideas not seeing the light of the
    day...and
    I do not want to design something using a framework which might remain
    un-standardized..
    what are ur thots..
    Thanx,
    Krish
    "Michael Wooten" <[email protected]> wrote:
    Hi Krish,
    It sounds like you want WSIF :-)
    "WSIF allows stubless or completely dynamic invocation of a Web
    service,
    >>>>>>
    based upon examination of the meta-data about the service at runtime.
    It
    also allows updated implementations of a binding to be plugged intoWSIF
    at
    runtime, and it allows the calling service to defer choosing a
    binding
    until
    runtime."
    Correct?
    This is a relatively new "unofficial" addition to the Web ServicesStack,
    so it
    is not in WLS 7.0 (or Sun's JWSDP) yet. See the following link formore
    details:
    http://xml.apache.org/axis/wsif
    Regards,
    Mike Wooten
    "Krish Venkataraman" <[email protected]> wrote:
    Hey ,
    I have an application which requires to talk to 2 different
    published
    webservices
    from 2 different systems. Now instead od designing static webservice
    clients for
    each of these systems(which would involve having separate proxyjars
    etc),
    I am planning to design a dynamic webservice locator and invoker....
    I know that we can have webservice clients which are dynamic tothe
    extent
    that
    we can create proxy objects at runtime once we know the endpoint
    WSDL..
    eg:
    ServiceFactory factory = ServiceFactory.newInstance();
    QName serviceName =new QName
    targetNamespace,"net.xmethods.services.stockquote.StockQuoteService");
    >>>>>>>
    QName portName = newQName(targetNamespace,"net.xmethods.services.stockquote.StockQuotePort");
    >>>>>>>
    QName operationName = newQName("urn:xmethods-delayed-quotes","getQuote");
    >>>>>>>
    URL wsdlLocation = newURL("http://services.xmethods.net/soap/urn:xmethods-delayed-quotes.wsdl");
    >>>>>>>
    // create service
    Service service = factory.createService(wsdlLocation, serviceName);
    // create call Call call = service.createCall(portName,
    operationName);
    >>>>>>>
    >>>>>>>
    My question on this...if I have a dynamic approach like the abovewhat
    are the
    pros and cons..I guess it would surely have more overhead comparedto
    a static
    client...?
    Secondly ,is it even feasible to design a dynamic client in such
    a
    way
    that the
    endpoint WSDL could also be an unknown and my generic client wouldalso
    locate
    the end-point dynamically and then invoke dynamic calls as above...
    If anybody can share their insights on a dynamic webservice client
    I would really
    appreciate it...
    Thanx,
    Krish
    KRISH.VENKATARAMAN
    Senior Technology Analyst
    Bank of America Corp.
    Email:[email protected]
    [BrowserClient.java]
    [DynamicClient.java]

  • ODI-Webservice Invocation- Namespace missing in BPEL

    Hi,
    I have installed ODI (10.1.3.4).While trying to invoke a webservice(simple BPEL process) by giving the wsdl url, and giving the inputs and executing it, the request to the webservice(BPEL process) reaches without the namespace spacified but for the root element. Could anyone suggest a solution to this missing namespace during webservice invocation in ODI
    Thanks in advance.
    Regards,
    Praveen

    Were you able to find any fix for this issue. We are having a major show stopper because of this. Your help will be appreciated. Thank you.

  • Developing dynamic WebServices,,

    Hi,
    There is a webservices which I can used across my application in morethan one place .The webservices will expect 5 input and give 3 output.When I call the webservices I some times I will give 3 input and some times I will give 4 inputs.
    So is there a possibility where I can develope dynamic webservices.Which will expect different number of inputs and process??
    Thanks,
    Renga.S.

    Hi,
    I found the solution for developing dynamic webservices.If the webservices has five input but when we consume it ,we might not give exact five input ,in this case you can make the fields as optional in XSD and Inside the webservices you can have a check like if the fields is not null then implement the logic..
    Thanks,
    Renga.S.

  • Dynamic webservice selection

    Hello friends,
    Is it possible to decide at runtime to which web application server the request should send to depending on one of field in sender file?
    e.g in file adapter we could specify the file name at runtime. I am not sure whether would it be possible , becoz WSDL contains location tag specifying where webservice resides....
    i would appreciate for any kind of help
    thanks,
    Pranav

    HI,
    Yes it is possible to maitain the UDF to create the URL based on sender Data. see my links and also below link
    RFC and SOAP scenarios-/people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    Dynamic configuration payload - https://media.sdn.sap.com/javadocs/NW04/SPS15/pi/com/sap/aii/mapping/api/DynamicConfiguration.html
    Dynamic Configuration of Some Communication Channel Parameters using Message Mapping - /people/william.li/blog/2006/04/18/dynamic-configuration-of-some-communication-channel-parameters-using-message-mapping
    Dynamic configuration in adapter modules - /people/daniel.graversen/blog/2006/10/05/dynamic-configuration-in-adapter-modules
    Also see the below links for ref
    RFC to SOAP
    /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009
    /people/shabarish.vijayakumar/blog/2006/03/23/rfc--xi--webservice--a-complete-walkthrough-part-1
    /people/piers.harding/blog/2004/07/18/you-dont-need-to-use-soap-to-keep-your-rpc-clean
    /people/shabarish.vijayakumar/blog/2006/03/28/rfc--xi--webservice--a-complete-walkthrough-part-2
    /people/david.halitsky/blog/2006/08/25/soa-vs-rfc-it-doesnt-have-to-be-charles-bronson-vs-henry-fonda
    /people/michal.krawczyk2/blog/2005/03/29/configuring-the-sender-rfc-adapter--step-by-step
    https://www.sdn.sap.com/irj/sdn/advancedsearch?query=rfc%20to%20soap%20scenario&cat=sdn_weblog
    Regards
    Chilla

  • Dynamic Webservice Target URL

    I am using Crystal Reports for Eclipse to serve up some reports for my web application. Currently, I am using JDBC datasources in which I am changing the datasource at runtime in a CrystalReportViewer where I also set some report parameters for every report that passes thru it. However, I am now switching from JDBC datasources as my data provider to webservices. The webservices work perfectly during design time. However, in my report, I have to tell it that the webservice is located at http://localhost/. When I go to deploy these reports to production servers, I need to dynamically change the target URL to something like http://myproductionserver/ at runtime. I know this needs to take place in my CrystalReportViewer, but I can't figure out how to do it there. Can someone point me in the direction I need to be going?
    Thanks in advance...

    Ok. I've been making a little bit of progress with this. I have added "replaceConnection" on my database controller and am changing the URLs there. However, when I do that, I get an invalid argument exception.
    Here is my replaceConnection code:
    private void replaceConnection(DatabaseController dbController) throws ReportSDKException
           ConnectionInfos connInfos = dbController.getConnectionInfos(null);
           for(IConnectionInfo connInfo : connInfos)
                PropertyBag pb = connInfo.getAttributes();
                String newQEServer = connInfo.getAttributes().getStringValue("PreQEServerName").replace("localhost", "BJRKQJ1-SHAW");
                String newServerName = connInfo.getAttributes().getStringValue("Server Name").replace("localhost", "BJRKQJ1-SHAW");
                String newHttpWebserviceUrl = connInfo.getAttributes().getStringValue("Http WebService URL").replace("localhost", "BJRKQJ1-SHAW");
                pb.put("PreQEServerName", newQEServer);
                pb.put("Server Name", newServerName);
                pb.put("Http WebService URL", newHttpWebserviceUrl);
                dbController.replaceConnection(connInfo, connInfo, null, DBOptions._ignoreCurrentTableQualifiers + DBOptions._doNotVerifyDB);
    Here is the exception stack trace:
    <<< ERROR - Unable to create parameter for type int32s >>><<< ERROR -  detected an exception: Invalid argument
         at com.crystaldecisions.reports.common.ExceptionFactory.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ParameterRequestHandler.a(Unknown Source)
         at com.businessobjects.reports.sdk.requesthandler.ParameterRequestHandler.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
         at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
         at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.char(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.new(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.do(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.RemoteAgent.if(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.performDo(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.UndoUnitBase.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.an.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ParameterFieldController.add(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.for(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.byte(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.DatabaseController.replaceConnection(Unknown Source)
         at com.businessobjects.GenerateReport.replaceConnection(GenerateReport.java:322)
         at com.businessobjects.GenerateReport.createReportViewer(GenerateReport.java:213)
         at com.businessobjects.GenerateReport.generateReport(GenerateReport.java:77)
         at com.businessobjects.GenerateReport.doFilter(GenerateReport.java:57)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Unknown Source)
    >>>
    Sorry if the code gets displayed all out of whack. I can never get this thing to display correctly using the "code" with { } tags.

  • Dynamic webservice-address

    Hi there,
    does anyone know if it is possible to change the target address of a webdynpro webservice-model at runtime (e.g. with the visual administrator)?
    I deploy the same web service on several servers and want to do some performance tests. Do I have to change
    the address everytime within the webdynpro-view of
    NWDS and redeploy the webdynpro or is there an easier way?
    Best regards,
    Claus

    Hello Claus,
    what you want to set is the Qname in the get<WSNAME>Information method in <WSNAME>HttpGetStub.java that was generated when NWDS made the model. You can modify it. Just use a
    public static String qname;
    in the class and initialize it in the view.wdDoInit(). You can later change it at runtime. (Or pass your address as a parameter on invocation.)
    That should be it.
    greetings Walter

  • Dynamic webservice client for User-defined datatypes

    Hi All,
    I have a webservices with user-defined datat types. I want to write a dynamic client that will work even if there are any changes in the wsdl, so that I do not want to recompile the client or make any changes on the client side.
    I tried using DII but we need to modify the custome objects and recompile the same. Suggest me any alternative.
    Regards,
    Sanjay

    Rob, unfortunately not. If I ever come across the solution, I will post it here.
    The reason I wanted to use weblogic webservices was to take advantage of the asynchronous webservice functionality. I ended up using xfire instead for my webservices, as we already had that in place in the application, and then using polling clients to get the response. Not an ideal solution, but it works very good anyway.
    regards,
    Marcus

  • Dynamic WebService client within a WebService Handler

    We have a WebService running on WebLogic 10.3 that has a handler that contains a Webservice client that connects to a set of IIS WebServices.
    The client is called with code like this:
    QName qname = new QName("http://www.company.com/Webservices/", "UserService");
    UserService service = new UserService(url, qname);
    service.setHandlerResolver(resolver);
    UserServiceSoap uss = service.getUserServiceSoap();
    The URL is dynamic, we have different servers that contain different data other than that they are the same. When this is called the first time with URL http://abc it works just fine. If it is called again but this time pointing to URL http://xyz, the client still goes to http://abc. We have check through debugging to ensure that we are really passing the correct URL, and we are. I traced this through a tool called WireShark and can see our client making 2 GET requests to the proper WSDL but then does the POST to http://abc. URLS have been altered to protect the innocent :) This same webservice containing this handler works as expected within Tomcat, it is in WebLogic that things get weird. Any help would be appreciated.
    Thanks,

    Hi
    <b>Bojja Guruvulu</b>
    My Email Id is : <b>[email protected]</b>

  • Workbench WebService Invocation: Returning response as CDATA

    Hello,<br /><br />I am trying to invoke a webservice from LiveCycle Workbench. I was able to invoke the service successfully. The service returns an XML-string, so the response is coming as CDATA content. <br /><br />I am unable to extract the CDATA content from the web-service response: Here is my service response:<br /><p><br /><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><br />     <soap:Body><br />          <ns1:getXMLExtractForAClaimResponse xmlns:ns1="http://service.integration.document.eams.edic.com"><br />               <ns1:out><br /><?xml version="1.0" encoding="UTF-8"?><EamsClaim><br />...................<br /></EamsClaim></ns1:out><br />          </ns1:getXMLExtractForAClaimResponse><br />     </soap:Body><br /></soap:Envelope><br /></p><br />I am struck over here. Please help me in resolving this. I created a variable "cdataList" of type List containing objects of type "document", and then I tried to get the webservice response as that list. After invocation of my service, the cdataList element is empty. <br /><br />Thanks in advance<br />Sivajee.

    Here is the msg... Somehow its not getting the entire data which I posted... Even though I am putting the code, the CDATA element after <ns1:out> is not getting displayed<br /><code><br />soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><br />     <soap:Body><br />          <ns1:getXMLExtractForAClaimResponse xmlns:ns1="http://service.integration.document.eams.edic.com"><br />               <ns1:out> XML STRING<br /><br /></ns1:out><br />          </ns1:getXMLExtractForAClaimResponse><br />     </soap:Body><br /></soap:Envelope><br /></code>

  • Dynamic client invocation (6.1) question

    Hi
    I am invoking an external webservice using a WL6.1 based client.
    Since I have the WSDL, I use WebSeviceProxy.getServiceAt(wsdl)
    to get the proxy based on the given wsdl URL. The external
    webservice has the following signature :
    void notification(Measurement[])
    Measurement { long timestamp; double value }
    In my client code, I have my own test.telemetry.Measurement
    class. In the WSDL, the Measurement datastructure's QName is
    http://www.6d.com/Measurement.
    I am thinking that the WL webservices machinery will be able
    to serialize my test.telemetry.Measurement object into the WSDL
    specificed format for the Measurement datastructure. But that
    doesn't seem to be happening - the QName in the serialization
    is java:test.telemetry.Measurement; and hence the external
    endpoint doesn't recogonize it.
    I guess my above assumption is wrong ? (WHY ?)
    Any workarounds ? Note that I have to use the dynamic client
    mode, not the static mode.
    thanx
    -john

    Hi John,
    I'm don't think that you will be able to get WLS 6.1's Web Services Platform (i.e.
    SOAP processor, WSDL processor, etc), to use your Measurement Java Bean in its
    serialization/deserialization, unless the namespace prefix for it (the Measurement
    complex type in the WSDL) is "java:" in the WSDL :-)
    WLS 6.1 assumes that namespace URIs that start with "java:" are Java package names,
    and that the corresponding elements are Java classes (i.e. <xsd:element name="Measurement">)
    in that Java package. You might be able to get WLS 6.1 to use your Measurement
    Java Bean using public methods on the SoapEncodingCodec class, but not if you
    use the WSDL. It will still be a dynamic client. It just won't start with using
    the WSDL to define stuff for you.
    Regards,
    Mike Wooten
    "john" <[email protected]> wrote:
    >
    Hi
    I am invoking an external webservice using a WL6.1 based client.
    Since I have the WSDL, I use WebSeviceProxy.getServiceAt(wsdl)
    to get the proxy based on the given wsdl URL. The external
    webservice has the following signature :
    void notification(Measurement[])
    Measurement { long timestamp; double value }
    In my client code, I have my own test.telemetry.Measurement
    class. In the WSDL, the Measurement datastructure's QName is
    http://www.6d.com/Measurement.
    I am thinking that the WL webservices machinery will be able
    to serialize my test.telemetry.Measurement object into the WSDL
    specificed format for the Measurement datastructure. But that
    doesn't seem to be happening - the QName in the serialization
    is java:test.telemetry.Measurement; and hence the external
    endpoint doesn't recogonize it.
    I guess my above assumption is wrong ? (WHY ?)
    Any workarounds ? Note that I have to use the dynamic client
    mode, not the static mode.
    thanx
    -john

  • Webservice invocation

    Need help in invoking these webservices..
    There are two webservices that I am trying to invoke one
    after the other:-
    1) first web service "setupwebsession" sets a session. Here I
    have setup the session.webuserUI to a component.
    2) second service tries to get a profile but displays an
    error
    Here is the webservice consuming:-
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="setUpWebUserSession"
    returnVariable="soo">
    <cfinvokeargument name="userName"
    value="[email protected]">
    <cfinvokeargument name="applicationToLogIn"
    value="atccWeb">
    </cfinvoke>
    <cfoutput> #soo# </cfoutput>
    <cfdump var="#Session.SessionID#">
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="getProfileHTML" returnvariable="profilehtml">
    </cfinvoke>
    <cfoutput>#getProfileHTML#</cfoutput>
    I am trying to consume both these webservices but it displays
    a following error.
    Cannot perform web service invocation getProfileHTML.
    The fault returned when invoking the web service operation
    is:
    AxisFault
    faultCode: {
    http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString:
    [line 1, column 8] [--Catch Data--]
    type: Application
    tagname: CFOUTPUT
    template:
    C:/jboss-eap-4.3/jboss-as/server/atcc/tmp/deploy/tmp48291CTiWebServicesAPI.ear-contents/C TiWebServicesAPI-exp.war/CTiWebServicesAPI.cfc
    Line: 75; Column: 3
    ErrorCode:
    message: session.WebUserUI.getWebProfileHTML() doesn't exist.
    detail: Error at line 1, column 8
    faultActor:
    faultNode:
    faultDetail:
    http://xml.apache.org/axis/}hostname:124426-SECOM1
    The error occurred in
    C:\ColdFusion8\wwwroot\selfprojects\webservices1.cfm: line 10
    8 : <cfdump var="#Session.SessionID#">
    9 : <cfinvoke webservice="
    http://localhost:8050/webervices.cfc?wsdl"
    10 : method="getProfileHTML" returnvariable="profilehtml">
    11 : </cfinvoke>
    12 : <cfoutput>#getProfileHTML#</cfoutput>
    Resources:
    Check the ColdFusion documentation to verify that you are
    using the correct syntax.
    Search the Knowledge Base to find a solution to your problem.
    Browser Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1;
    .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET
    CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
    Remote Address 127.0.0.1
    Referrer
    http://localhost:8500/selfprojects/
    Date/Time 19-Mar-09 04:27 PM
    Stack Trace (click to expand)
    at
    cfwebservices12ecfm1268558828.runPage(C:\ColdFusion8\wwwroot\selfprojects\webservices1.cf m:10)
    coldfusion.xml.rpc.ServiceProxy$ServiceInvocationException:
    Cannot perform web service invocation getProfileHTML.
    at
    coldfusion.xml.rpc.ServiceProxy.invokeImpl(ServiceProxy.java:230)
    at
    coldfusion.xml.rpc.ServiceProxy.invoke(ServiceProxy.java:143)
    at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2222)
    at
    coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:417)
    at
    cfwebservices12ecfm1268558828.runPage(C:\ColdFusion8\wwwroot\selfprojects\webservices1.cf m:10)
    at coldfusion.runtime.CfJspPage.invoke(CfJspPage.java:196)
    at
    coldfusion.tagext.lang.IncludeTag.doStartTag(IncludeTag.java:370)
    at
    coldfusion.filter.CfincludeFilter.invoke(CfincludeFilter.java:65)
    at
    coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:279)
    at
    coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:48)
    at
    coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40)
    at coldfusion.filter.PathFilter.invoke(PathFilter.java:86)
    at
    coldfusion.filter.LicenseFilter.invoke(LicenseFilter.java:27)
    at
    coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:70)
    at
    coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:2 8)
    at
    coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38)
    at
    coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:46)
    at
    coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38)
    at
    coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22)
    at coldfusion.CfmServlet.service(CfmServlet.java:175)
    at
    coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:86)
    at
    coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42 )
    at
    coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46)
    at jrun.servlet.FilterChain.doFilter(FilterChain.java:94)
    at jrun.servlet.FilterChain.service(FilterChain.java:101)
    at
    jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106)
    at
    jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42)
    at
    jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:286)
    at
    jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543)
    at
    jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
    at
    jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:320)
    at
    jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428)
    at
    jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:266)
    at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)

    quote:
    Originally posted by:
    shafiur
    Need help in invoking these webservices..
    There are two webservices that I am trying to invoke one
    after the other:-
    1) first web service "setupwebsession" sets a session. Here I
    have setup the session.webuserUI to a component.
    2) second service tries to get a profile but displays an
    error
    Here is the webservice consuming:-
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="setUpWebUserSession"
    returnVariable="soo">
    <cfinvokeargument name="userName"
    value="[email protected]">
    <cfinvokeargument name="applicationToLogIn"
    value="atccWeb">
    </cfinvoke>
    <cfoutput> #soo# </cfoutput>
    <cfdump var="#Session.SessionID#">
    <cfinvoke webservice="
    http://localhost:8050/WebServices.cfc?wsdl"
    method="getProfileHTML" returnvariable="profilehtml">
    </cfinvoke>
    <cfoutput>#getProfileHTML#</cfoutput>
    You are trying to output the function name instead of the
    returnvariable.

  • RESTful webservices invocation from OSB.

    Can some one please explain the best way to develop the OSB service to invoke the Restful services.
    1. Only proxy service is enough to handle the request, no need of business service?
    2. when moving the code from one env to other, we use a business service to update endpoint url which is the common approach we generally follow, to make the osb service loosely coupled. how to use the business service when invoking the restservice? does we have the base uri value in the transport url and will get appended with the relative-uri value which we frame as part of the request in the outbound variable in the proxy settings?
    3. when invoking the rest service do we need to append all the request message to the url itself or the request can be passed separately as request body and the main rest uri will have only the key fields as part of the relative-uri?
    4. If we receive huge request message does the URL support the entire request?
    5. how the response/error will be returned when calling the Restful webservice?
    I am assuming this appraoch. Can some one please confirm does this approach works with RESTful service invocation from OSB.
    Request processing:
    Source System request-> Proxy Service -> Transformation to end system specific -> Business service (with base-uri -> http://mainappl.com/web/cmr/{relative-uri from outbound transport}) -> endsystem
    Response processing:
    endsystem Response/Error -> Business Service -> Proxy Service -> transformation to source system specific -> source system.
    Please advice which is the best approach to follow while invoking the RESTful webservices from OSB.
    Thanks..
    Edited by: user12679330 on May 5, 2010 4:33 AM
    Edited by: user12679330 on May 5, 2010 5:00 AM

    Hi,
    Thanks for the update. Can you please explain the above mentioned approach works or how it should be?
    I have one requirement, can some one explain the implementation for this:
    I have one element which is of type unbound. I need to map this element to a single enelement value by separating each element value with a ;, before that I need to check wheteher this element(s) are present in the request then need to appened all these element values to a single element and the end of this element need to append default values.
    Scenario:
    <student>
    <name>asd</name>
    <address>
    <street>street1</street>
    <street>street2</street>
    <street>street3</street>
    ||
    ||
    </address>
    to be mapped it to:
    <student>
    <field name="NAME">asd</field>
    <field name="ADDRESS">street1;street2;street3;default1;default2;default3</field>
    </student>
    Here need to check if street names are present in the request xml, if yes ned to assign it to ADDRESS as mentioned above if street names present or not need to append the default values at the end to the ADDRESS field.
    Thanks in advance.

  • SWF in SAP BSP Pages - Dynamic webservice connection

    Hi,
    We are using webservice connections in xcelisus to connect to webservices on R3.
    In the webservice connection , we have imported the wsdl from sap and generated the connection.
    Then we have the Hostname and port of SAP server in the webservice connection.
    Once the development is completed and swf is generated , we have created a bsp application and placed the swf file in it on our SAP Dev system.
    So now when we access the bsp application on Dev, the Dev webservice is called in the swf and data is retrieved.
    Once the bsp is transported to QA system , as the webservice in swf is still pointing to Dev system, the data is retrieved from the Dev system only.
    Is there a way to use falsh variables and dynamically call the webservice on the SAP system , based on the system it is called from, so that when we call the bsp application on QA system , it call the webservice on QA system instead of the one on Dev system.
    Thanks,
    Tanuj

    Hi Tanuj,
    unfortunately this is not possible within Xcelsius, take a look at following thread:
    Re: Dynamic WSDL URL
    Regards
    Victor

  • Trouble in dynamic method invocation

    hai forum,
    Your previous responses on this topic 'method invocation' has greatly helped me in writing a code to invoke method dynamically.As some experts pointed out,the parameters had to be type casted.
    Please help me out of my latest trouble.I invoke only a particular method 'methodName' of a particular calss instance 'instance'.But when i run the code Exceptions are thrown for all the methods of that class whereas i require exceptions connected with "methodName" only.
    I just could not figure out my mistake, so please help me out.
    Thank you.
        private class MethodInvoke implements ActionListener
            private String methodName=""; //name of the method
            Object instance;                          //instance of the class
            private int paraNum=0;             //num of parameters
            public void setParameters(String methodName,Object instance,int paraNum)
                this.methodName = methodName;
                this.instance=instance;
                this.paraNum=paraNum;
            public void actionPerformed(ActionEvent e)
                 try
                           //TAKE PARAMETERS FROM USER USING TEXTFIELDS INTO AN ARRAY LIST
                        Component[] cList = textfieldPanel.getComponents();
                        ArrayList parameterList = new ArrayList(paraNum);
                        Object[] parameters = new Object[parameterList.size()];
                         for (int x = 0; x < paraNum; x++)
                                if (cList[x] instanceof JTextField)
                                    String value = ((JTextField) cList[x]).getText(); 
                                    parameterList.add(value);
                        Method[] allMethods = instance.getClass().getMethods();
                        Method method = null;
                        for (int i = 0; i < allMethods.length; i++)
                                if (allMethods.getName().equals(methodName))
    method = allMethods[i];
    break;
    if (method == null)
    throw new RuntimeException("Method not found");
    Class[] types = method.getParameterTypes();
    for (int i = 0; i < paraNum; i++)
    String values = (String)parameterList.get(i);
    if (types[i].equals(Integer.class))
    parameters[i] = new Integer(values);
    else if (types[i].equals(Long.class))
    parameters[i] = new Long(values);
    else if (types[i].equals(String.class))
    parameters[i] = values;
    else if (types[i].equals(Float.class))
    parameters[i]=new Float(values);
    else if (types[i].equals(Boolean.class))
    parameters[i]=new Boolean(values);
    else
    System.out.println("Do not support the data type");
    Object result = method.invoke(instance, parameters);
    System.out.println("Invoked result: " + result);
    catch(Exception e3)
    System.out.println(e3);

    This is the Emp class which iam calling.Hope this will help you.
    import java.io.*;
    public class Emp
         private String designation;
         private int salary;
         private int id;
         private String name;
         public Emp()
         public void setId(int i)
              id=i;
         public int getId()
              return id;
         public void setDesignation(String d)
              designation=d;
         public void setName(String d)
              name=d;
         public void setSalary(int s)
              salary=s;
         public String getDesignation()
              return designation;
         public int getSalary()
              return salary;
         public String getName()
              return name;
         public void setAll()
              try
                   System.out.println("Enter name:");
                   BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
                   String n=br.readLine();
                   setName(n);
                   System.out.println("Enter ID:");
                   setId(Integer.parseInt(br.readLine()));
                   System.out.println("Enter Designation:");
                   n=br.readLine();
                   setDesignation(n);
                   //System.out.println("Enter Salary:");
                   //setSalary(Integer.parseInt(br.readLine()));
              catch(Exception e)
         public void getAll()
              System.out.println("Name: "+getName()+"\n ID: "+getId()+
                        "\n Designation: "+getDesignation());
         public void pay(int w)
              getAll();
              System.out.println("Name: "+name+"\nAmount to be paid : "+w);
         /*public static void main(String[] args)
              Emp e=new Emp();
              e.setAll();
              e.getAll();
    }

Maybe you are looking for

  • Checkbox derived column in report

    I added an HTML checkbox that has the same name for every row and a value of the pk for that row to a report. I also added a submit button. The submit button branches back to the same page. If I don't check ANY checkbox buttons the submit button just

  • How to update old records of LIPS used user exit MV50AFZ1

    To All Experts, I have used User Exit MV50AFZ1 and in this user exit i updated the fields USEREXIT_MOVE_FIELD_TO_LIPS. LIPS-ETENR = VBEP-ETENR. Its working fine for new VL0N1 t-code, but what about old recods of LIPS table ? How to update old records

  • Purchase Req to Purchase Order

    Is there a transaction in SAP where a user can both release a purchase requisition AND create a purchase order from that same req without having to leave that transaction and go into another?

  • How downgrade to ios5 due to ios6 is poor?

    i have 4s and just upgraded to ios6 through wifi a couple days ago. i found that ios6 is poor esspcial apple map. i've got lost today because i followed the map that it suggested to me. (~1mile far away) Further more, i found that ios6 consumpts more

  • I need to purchase a new laptop and wondered what was recommended when using lightroom?

    Ehich laptop is most compatible with Lightroom?