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

Similar Messages

  • Out parameters and a dynamic client

    In the 7.0 manuals for web services (http://e-docs.bea.com/wls/docs70/webServices/client.html#1011066)
    there are two examples, one for dynamic client, the other for out parameters. My
    question is there a way to use out parameters WITH the dynamic client or do you need
    a stub for it?
    Larry

    sachin
    1) make sure there is no Optional Redirect defined on the OK button. That is, make sure the page is really submitted.
    2) in the PL/SQL body generating the query, print out the query using htp.p() so you get to see it and test it.
    3) use the session state link in the developer toolbar in conjunction with the technique in step 2) to debug your query
    Maybe the report region is refreshing, but it just isn't returning any results.
    Sergio

  • Return code for dynamic client by-pass

    hi,
    i wonder if 302 ( move temporaily) for return code in dynamic client by-pass. but it said 200 in the Cisco web page, why?
    thanks
    difei

    hi,
    my question is what's the return code from CE if the client ip addr. authentication failed? in cisco web page, it said 200. i guess it be 302, redirect to the original server.
    difei

  • Web service dynamic client property for Call

    Hi, Hope this is the right forum for web service questions. The oracle document (6 Developing JAX-RPC Web Service Clients) on web service client only shows the stub and properties can be set in stub. I would like to use dynamic client. Can Call object have some properties? what are they?
    Thanks

    Can any one please help :-(

  • Invoking a web service from dynamic client in weblogic 7

    Is it possible to invoke a webservice from dynamic client in weblogic 7. Because i tried and it doesn't work. But it works with WL 8.1
    I don't see any samples on the net for weblogic 7.

    Hello rss,
    If you want to invoke a web service from a JCD you will have to build the SOAP message using JAX-RPC or AXIS and then programmatically creat an HTTP connection.
    Or you can leverage the HTTP(S) eWay and then you only have to build the SOAP message.
    Or use eInsight. You can import a WSDL into eInsight and eInsight will offer you a business process Activity to invoke the web service operations defined in the WSDL.

  • Dynamic client in weblogic 9

    I have created a dynamic client to invoke a Web Service that uses non-built-in data types as parameter and return type in weblogic8.1 using ant task autotype and JAX-RPC. Now we are moving toward weblogic 9.0 but i could find equivalent way of creating dynamic client. So how can we create dynamic client in weblogic 9.0? I would also like to mention that our clients are standalone client. Thanks in advance for your help.

    Thanks for your response.My requirement is, if we change interface means return object or parameters then we don't want to do redeployment of client jar. we want if there is any changes to the interface then it should be taken automatically.

  • Dynamic client problem

    I modified the EchoDom example (http://webservice.bea.com/dom.zip) client to be
    dynamic (with WSDL) and deployed the service as a document type service. The ear
    file is deployed correctly and I am able to execute the service from the URL without
    any errors. However when I run the dynamic client, I see the following exception
    trace. I see a similar error (serialization fails on class weblogic.apache.xerces.dom.DocumentImpl)
    when I deploy the service as rpc. What am I doing incorrectly? Please help.
    Sriram
    run:
    [java] javax.xml.rpc.JAXRPCException: failed to invoke operation 'echoDom
    ' due to an error in the soap layer (SAAJ); nested exception is: Message[ failed
    to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.Se
    rializationException: mapping lookup failure. class=interface javax.xml.soap.SOA
    PElement class context=TypedClassContext{schemaType=['http://examples.org']:echo
    Dom}]StackTrace[
    [java]
    [java] javax.xml.soap.SOAPException: failed to serialize interface javax.x
    ml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping
    l
    ookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedCla
    ssContext{schemaType=['http://examples.org']:echoDom}
    [java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
    Part.java:328)
    [java] at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:2
    97)
    [java] at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.
    java:619)
    [java] at weblogic.webservice.core.ClientDispatcher.send(ClientDispatch
    er.java:206)
    [java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
    atcher.java:143)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:444)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:430)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at examples.dom.Client.diiCall(Client.java:132)
    [java] at examples.dom.Client.main(Client.java:164)
    [java] Caused by: weblogic.xml.schema.binding.SerializationException: mappi
    ng lookup failure. class=interface javax.xml.soap.SOAPElement class context=Type
    dClassContext{schemaType=['http://examples.org']:echoDom}
    [java] at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(Ru
    ntimeUtils.java:151)
    [java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
    ntimeUtils.java:187)
    [java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
    ntimeUtils.java:174)
    [java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
    Part.java:324)
    [java] ... 10 more
    [java] ]
    [java]
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at examples.dom.Client.diiCall(Client.java:132)
    [java] at examples.dom.Client.main(Client.java:164)
    [java] Exception in thread "main"
    [java] Java Result: 1

    Hi Bruce,
    I made the changes that you suggested. It didn't work. I still see the same deserialization
    exception.
    Sriram
    Bruce Stephens <[email protected]> wrote:
    Hi,
    Try this format in your dynamic client:
    call.setProperty("javax.xml.rpc.security.auth.username", "username");
    call.setProperty("javax.xml.rpc.security.auth.password", "password");
    HTHs,
    Bruce
    Sriram Chavali wrote:
    If I had a weblogic security role enforcement in place for my WS EJB,how do I
    pass the user credentials from a dynamic client? I set the USERNAME_PROPERTYand
    PASSWORD_PROPERTY properties on the Call, but I see a deserializationerror on
    the response and the SOAPElement interface.
    A static client works fine when I pass the user credentials from thegetMyWSPort(String,
    String) call.
    Please help,
    Sriram
    "Sriram Chavali" <[email protected]> wrote:
    Hi Bruce,
    It worked perfectly.
    Thanks for your help
    Sriram
    Bruce Stephens <[email protected]> wrote:
    Hi Sriram,
    OK, we are getting close. It looks like the problem is with the
    helloComplexWorldResponse so looking at the client, I would change
    the
    invoke to look something like this:
    String result = (String) call.invoke(new Object[] {doc});
    If that still has problems, then try it without the return, i.e.make
    it
    a void return in the HelloWorldServiceEJB.java and go from there.
    Regards,
    Bruce
    Sriram Chavali wrote:
    Hi Brue,
    Your example works fine for me. I am building an EJB implementationthat follows
    your example where I see the error. The attached zip file has the
    server
    and client
    (dynamic, which follows your example). The build file is build1.xml.
    Thanks
    Sriram
    Bruce Stephens <[email protected]> wrote:
    Hi Sriram,
    hmmm...the sample I provided sends a Document with a dynamic client,
    so
    I'm confused as to where/why you are still seeing the same failure
    as
    the original post. Would you go back and look carefully at the
    client
    code (ClientHotelDyn.java) and note two important features:
    1) adding the call.setProperty(Call.OPERATION_STYLE_PROPERTY,
    "document");
    2) adding the typemapping for the Document
    If you are still experiencing problems, please post your codeand/or
    open a dialog with our super support team: http://support.bea.com
    or
    [email protected]
    Thanks,
    Bruce
    Hi Bruce,
    The consumers for the service that I am building will be non-java
    clients.
    I wish
    to demonstrate a reference implementation for them without using
    the
    generated
    client side classes and hence the dynamic client.
    Thanks for your example code. It worked fine. Just to add a
    twist
    to
    your latest
    example, I modified sample10 from Manoj's website (an EJB example)to accept an
    org.w3c.dom.Document. I took your build file and tailored it
    to
    building
    the sample10
    and it worked fine for a static client, however when I modified
    the
    client to
    be dynamic, I see the trace pasted at the end of this message.
    Any
    suggestions
    run:
    [java] javax.xml.rpc.JAXRPCException: failed to invoke
    operation
    'helloComp
    lexWorld' due to an error in the soap layer (SAAJ); nested exceptionis: Message
    [failed to deserialize xml:weblogic.xml.schema.binding.DeserializationException:
    mapping lookup failure for xml type ['http://www.bea.com/servers/wls70/samples/
    examples/webservices/basic/javaclass']:helloComplexWorldResponse
    and
    java interf
    ace javax.xml.soap.SOAPElement]StackTrace[
    [java]
    [java] javax.xml.soap.SOAPException: failed to deserialize
    xml:weblogic.xml
    schema.binding.DeserializationException: mapping lookup failurefor
    xml type
    http://www.bea.com/servers/wls70/samples/examples/webservices/basic/javaclass']:
    helloComplexWorldResponse and java interface javax.xml.soap.SOAPElement
    [java] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:
    389)
    [java] at weblogic.webservice.core.DefaultMessage.toJava(DefaultMessage
    java:458)
    [java] at weblogic.webservice.core.ClientDispatcher.receive(ClientDispa
    tcher.java:297)
    [java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
    atcher.java:144)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:444)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:430)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at tutorial.sample10.client.Main.<init>(Main.java:105)
    [java] at tutorial.sample10.client.Main.main(Main.java:40)
    [java] Caused by: weblogic.xml.schema.binding.DeserializationException:map
    ping lookup failure for xml type ['http://www.bea.com/servers/wls70/samples/exam
    ples/webservices/basic/javaclass']:helloComplexWorldResponse
    and
    java
    interface
    javax.xml.soap.SOAPElement
    [java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_deserializer(
    RuntimeUtils.java:325)
    [java] at weblogic.webservice.core.DefaultPart.toJava(DefaultPart.java:
    384)
    [java] ... 9 more
    [java] ]
    [java]
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at tutorial.sample10.client.Main.<init>(Main.java:105)
    [java] at tutorial.sample10.client.Main.main(Main.java:40)
    BUILD SUCCESSFUL
    Thanks
    Sriram
    Bruce Stephens <[email protected]> wrote:
    Hi Sriram,
    Give this example a spin and see if it fits your needs.
    Just curious, why do you need to have a dynamic client?
    Thanks,
    Bruce
    Sriram Chavali wrote:
    I am using WLS 8.1 on Windows XP.
    Sriram
    "Sriram Chavali" <[email protected]> wrote:
    I modified the EchoDom example (http://webservice.bea.com/dom.zip)
    client
    to be
    dynamic (with WSDL) and deployed the service as a document
    type
    service.
    The ear
    file is deployed correctly and I am able to execute the
    service
    from
    the URL without
    any errors. However when I run the dynamic client, I see
    the
    following
    exception
    trace. I see a similar error (serialization fails on class
    weblogic.apache.xerces.dom.DocumentImpl)
    when I deploy the service as rpc. What am I doing incorrectly?Please
    help.
    Sriram
    run:
    [java] javax.xml.rpc.JAXRPCException: failed to invoke
    operation
    'echoDom
    ' due to an error in the soap layer (SAAJ); nested exceptionis:
    Message[
    failed
    to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.Se
    rializationException: mapping lookup failure. class=interface
    javax.xml.soap.SOA
    PElement class context=TypedClassContext{schemaType=['http://examples.org']:echo
    Dom}]StackTrace[
    [java]
    [java] javax.xml.soap.SOAPException: failed to serializeinterface
    javax.x
    ml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
    mapping
    l
    ookup failure. class=interface javax.xml.soap.SOAPElement
    class
    context=TypedCla
    ssContext{schemaType=['http://examples.org']:echoDom}
    [java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
    Part.java:328)
    [java] at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:2
    97)
    [java] at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.
    java:619)
    [java] at weblogic.webservice.core.ClientDispatcher.send(ClientDispatch
    er.java:206)
    [java] at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDisp
    atcher.java:143)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:444)
    [java] at weblogic.webservice.core.DefaultOperation.invoke(DefaultOpera
    tion.java:430)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:53
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at examples.dom.Client.diiCall(Client.java:132)
    [java] at examples.dom.Client.main(Client.java:164)
    [java] Caused by: weblogic.xml.schema.binding.SerializationException:
    mappi
    ng lookup failure. class=interface javax.xml.soap.SOAPElement
    class
    context=Type
    dClassContext{schemaType=['http://examples.org']:echoDom}
    [java] at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(Ru
    ntimeUtils.java:151)
    [java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
    ntimeUtils.java:187)
    [java] at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(Ru
    ntimeUtils.java:174)
    [java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
    Part.java:324)
    [java] ... 10 more
    [java] ]
    [java]
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:55
    9)
    [java] at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:39
    2)
    [java] at examples.dom.Client.diiCall(Client.java:132)
    [java] at examples.dom.Client.main(Client.java:164)
    [java] Exception in thread "main"
    [java] Java Result: 1
    Name: sample10.zip
    sample10.zip Type: Zip Compressed Data (application/x-zip-compressed)
    Encoding: base64

  • Workshop : webservices : Dynamic Client

    I am using WebLogic Workshop 8.1 to crate a test Web Service.
    I have created a webservice with two methods to support
    1. SOAP RPC call
    2. SOAP document call
    This is working fine with the test harness provided by workshop.
    I have written two Dynamic clients to test this web service (one for soap RPC
    type call and another for soap "document" type call).
    The SOAP RPC type call dynamic client is working fine.
    The SOAP "document" type call dynamic client is throwing the following exception
    javax.xml.rpc.JAXRPCException: failed to invoke operation 'ReservationRQ' due
    to an error in the soap layer (SAAJ); nested exception is: Message[ failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
    mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}]StackTrace[
    javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
    mapping lookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
    at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:328)
    at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
    at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:619)
    at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:444)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:430)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:539)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
    at TestWSClientDoc.main(TestWSClientDoc.java:74)
    Caused by: weblogic.xml.schema.binding.SerializationException: mapping lookup
    failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
    at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUtils.java:151)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:187)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
    at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:324)
    ... 9 more
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:559)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
    at TestWSClientDoc.main(TestWSClientDoc.java:74)
    Failed to send doc.
    I have attached a zip file conatining the following files with this.
    TestWebService.jws - web service code
    TestWSClientDoc.java - dynamic client to test "document" type call
    TestWSClientRpc.java - dynamic client to test "rpc" type call
    test.xml – test document.
    Could you please let me know here am I doing wrong?
    Thanks
    Purna
    [webservice.zip]

    Hi Mike,
    Your code worked for me. I will go from here.
    Thanks,
    Purna
    "Michael Wooten" <[email protected]> wrote:
    >
    >
    >
    Hi Purna,
    I have attached the source for a DII client that I think may work for
    you.
    It contains comments that describe what I think is causing the problem
    you are
    having in WLW 8.1, because I was having the same problem in WLW 7.0 :-)
    You'll need to have %WL_HOME%\server\lib\webservices.jar in the client's
    CLASSPATH,
    because that's where the ElementCodec (and DocumentCodec) is. Let me
    know if it
    works.
    Regards,
    Mike Wooten
    "Purna" <[email protected]> wrote:
    Hi Bruce,
    The example you provided is working fine. In fact I had used your example
    to write
    the Dynamic client.
    Background on my requirement:
    I had created a web service out of my application, which has set ofenterprise
    java beans. The web service is working fine with WLW test harness and
    static client.
    I want to write a Dynamic Cient for this web service. Inside this web
    service
    the methods are expecting a document object. I am getting the exceptions
    for
    the Dynamic Client.
    Please find the attached zip file containg the wsdl files.
    It would be great if you can provide a working document style web service
    (*.jws
    file - generated from WL workshop) and Dynamic Client code.
    Thanks,
    Purna
    Bruce Stephens <[email protected]> wrote:
    Hi,
    I would suggest trying to narrow down the problem. I suspect that there
    are server side issues. Try going back to this example and making
    sure
    it works OK.
    http://newsgroups.bea.com/cgi-bin/dnewsweb/domdocdyn.zip?cmd=article&group=weblogic.developer.interest.webservices&item=4127&part=2&utag=&/domdocdyn.zip
    Spin up WLW and compare the two WSDLs. I suspect there will be some
    differences that could be causing your problem.
    Could you tell us a bit about your goal?
    Thanks,
    Bruce
    Purna wrote:
    Hi Bruce,
    I have removed the "rpc" style method and now I have only "document"style method,
    but still I am getting the same exception with Dynamic Client.
    Do you have any suggetions?.
    Thanks,
    Purna
    Bruce Stephens <[email protected]> wrote:
    Hello,
    Take a look at "style" attribute:
    http://edocs.bea.com/wls/docs81/webserv/wsp.html#1015120 in the
    web-service element, it states the "style" attribute applies to
    an
    entire Web Service, all operations specified in a single <web-service>
    element must be either RPC-oriented or documented-oriented; WebLogic
    Server does not support mixing the two styles within the same Web
    Service.
    Hope this helps,
    Bruce
    purna wrote:
    I am using WebLogic Workshop 8.1 to crate a test Web Service.
    I have created a webservice with two methods to support
    1. SOAP RPC call
    2. SOAP document call
    This is working fine with the test harness provided by workshop.
    I have written two Dynamic clients to test this web service (one
    for
    soap RPC
    type call and another for soap "document" type call).
    The SOAP RPC type call dynamic client is working fine.
    The SOAP "document" type call dynamic client is throwing the followingexception
    javax.xml.rpc.JAXRPCException: failed to invoke operation 'ReservationRQ'due
    to an error in the soap layer (SAAJ); nested exception is: Message[failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
    mapping lookup failure. class=interface javax.xml.soap.SOAPElement
    class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}]StackTrace[
    javax.xml.soap.SOAPException: failed to serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException:
    mapping lookup failure. class=interface javax.xml.soap.SOAPElement
    class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
    at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:328)
    at weblogic.webservice.core.DefaultPart.toXML(DefaultPart.java:297)
    at weblogic.webservice.core.DefaultMessage.toXML(DefaultMessage.java:619)
    at weblogic.webservice.core.ClientDispatcher.send(ClientDispatcher.java:206)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:143)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:444)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:430)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:539)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
    at TestWSClientDoc.main(TestWSClientDoc.java:74)
    Caused by: weblogic.xml.schema.binding.SerializationException:
    mapping
    lookup
    failure. class=interface javax.xml.soap.SOAPElement class context=TypedClassContext{schemaType=['http://www.openuri.org/']:ReservationRQ}
    at weblogic.xml.schema.binding.RuntimeUtils.lookup_serializer(RuntimeUtils.java:151)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:187)
    at weblogic.xml.schema.binding.RuntimeUtils.invoke_serializer(RuntimeUtils.java:174)
    at weblogic.webservice.core.DefaultPart.invokeSerializer(DefaultPart.java:324)
    ... 9 more
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:559)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:392)
    at TestWSClientDoc.main(TestWSClientDoc.java:74)
    Failed to send doc.
    I have attached a zip file conatining the following files with
    this.
    TestWebService.jws - web service code
    TestWSClientDoc.java - dynamic client to test "document" type
    call
    TestWSClientRpc.java - dynamic client to test "rpc" type call
    test.xml – test document.
    Could you please let me know here am I doing wrong?
    Thanks
    Purna
    Name: webservice.zip
    webservice.zip Type: Zip Compressed Data (application/x-zip-compressed)
    Encoding: base64

  • How to pass in complex data to a web service using dynamic client

    I wrote to dynamic client to access the complex example in weblogic 7.000, I would
    like to know how I passed in a complex type to a dynamic client.

    An example of using dynamic client is attached:
    regards,
    -manoj
    "fkeita" <[email protected]> wrote in message
    news:3d051775$[email protected]..
    >
    I wrote to dynamic client to access the complex example in weblogic 7.000,I would
    like to know how I passed in a complex type to a dynamic client.[call4.jar]

  • How to use wsdl in dynamic client

    In wls 700, I want to know how to write a dynamic client to invoke a webservice by
    passing wsdl?
    In the example directory, there is an example, but I would like to know how I can
    customize to use my own wsdl? clientgen puts wsdl in client jar file why is that?

    Hi fkeita,
    If you haven't already done so, you should check out the following link in the BEA
    product documentation:
    http://edocs.bea.com/wls/docs70/webServices/client.html#1049007
    Outside of that, you can always stayed tuned to the "dev2dev" page :-)
    Regards,
    Mike Wooten
    "fkeita" <[email protected]> wrote:
    >
    Hi Mike,
    Can you elaborate more how I can find the url of wsdl?
    Do you know any documentation which explains the process of using dynamic
    clinet?
    Thanks.
    "Michael Wooten" <[email protected]> wrote:
    Hi fkeita,
    The client.jar contains a "static" WSDL, because some folks like to avoid
    making
    a network (or internet) call to retrieve the "dynamic" one :-)
    If you try to use "user-defined" types, with a WSDL and a "dynamic" client,
    you will
    experience "difficulties". This is due to the way the JAX-RPC defines the
    createService()
    method on the ServiceFactory class. Normally, this is the method you pass
    the URL
    to the WSDL you want to use. Currently, we call the WSDL parser in this
    method, which
    has a "side-effect" of needing to have the type mappings for your "user-defined"
    types, already registered when it is called. With "stub-style" clients,
    this is not
    a problem (because the plumbing does this for you), but with "dynamic"ones
    it doesn't.
    Right now, the only real workaround is to have your client class extend
    our weblogic.webservice.core.soap.SOAPElementImpl
    class, as in the following code fragment:
    #### START OF EXTRACT #####
    import javax.xml.rpc.Call;
    import javax.xml.rpc.namespace.QName;
    import weblogic.webservice.core.rpc.ServiceImpl;
    public class ServiceClient extends ServiceImpl
         public ServiceClient(String schemeHostPort) throws Exception
    // We pass the URL for the "dynamic" WSDL in the
    // first argument. The second argument is the
    // path to the XML file that the <clientgen> Ant
    // task recorded your typemapping info in. It is
    // in your client.jar, along with the "static"
    // WSDL I mentioned :-)
              super(
                   (schemeHostPort == null ? "http://localhost:7001" : schemeHostPort)
    +
    "/mea/gateway?WSDL",
                   "examples/webservices/jaxrpc/consumer/anamitra/dii/MEAGatewayService"
              //define qnames
              String targetNamespace = "http://www.bea.com/examples/MEAGateway";
              QName serviceName = new QName( targetNamespace, "MEAGatewayService" );
              QName portName = new QName( targetNamespace, "MEAGatewayServicePort");
              //create call
              Call call = super.createCall(
                   portName,
                   new QName(targetNamespace, "processExternalDataBatch")
              ArrayList alist = new ArrayList();
              alist.add(new String("One"));
              alist.add(new String("Two"));
              alist.add(new String("Three"));
              alist.add(new String("Four"));
              alist.add(new String("Five"));
              String result = (String)call.invoke( new Object[]{ alist } );
              System.out.println("result=" + result);
         public static void main( String[] args ) throws Exception
              System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
              System.setProperty("javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
              new ServiceClient(args[0]);
    //private:
         private final static boolean debug = false;
    ### END OF EXTRACT ###
    Happy coding :-)
    Regards,
    Mike Wooten
    "fkeita" <[email protected]> wrote:
    In wls 700, I want to know how to write a dynamic client to invoke a webservice
    by
    passing wsdl?
    In the example directory, there is an example, but I would like to know
    how I can
    customize to use my own wsdl? clientgen puts wsdl in client jar file why
    is that?

  • Dynamic client return complex type

    How do write a dynamic client that returns a complex data type?

    I had the same problem and was never able to solve it. I just gave up and went to static clients. From what I saw here in the forums in the last 4 months, this is a recurring problem that sun has given no solution to.
    Hugo

  • Dynamic Client Exception - Need help

    Hi,
    Need help.......
    I am getting following exception, when I run
    my dynamic client.
    Attached below is my code as well as WSDL.
    Thanks in advance..
    Regards
    -Shakeel
    [java] javax.xml.rpc.JAXRPCException: failed to invoke operation 'Print' du
    e to an error in the soap layer (SAAJ); nested exception is: Message[ failed to
    serialize interface javax.xml.soap.SOAPElementweblogic.xml.schema.binding.Serial
    izationException: mapping lookup failure. class=interface javax.xml.soap.SOAPEle
    ment class context=TypedClassContext{schemaType=['http://learn.technologies.com/
    WS']:PrintRequest}]StackTrace[
    [java] javax.xml.soap.SOAPException: failed to serialize interface javax.x
    ml.soap.SOAPElementweblogic.xml.schema.binding.SerializationException: mapping l
    ookup failure. class=interface javax.xml.soap.SOAPElement class context=TypedCla
    ssContext{schemaType=['http://learn.technologies.com/WS']:PrintRequest}
    [java] at weblogic.webservice.core.DefaultPart.invokeSerializer(Default
    Part.java:328)
    CODE
    // Setup the global SAAJ message factory
    System.setProperty("javax.xml.soap.MessageFactory", "weblogic.webservice.core.soap.MessageFactoryImpl");
    // Setup the global JAX-RPC service factory
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory serviceFactory = ServiceFactory.newInstance();
    // define qnames
    String targetNamespace = "http://learn.technologies.com/WS";
    QName serviceName = new QName(targetNamespace, "PersonalDataService");
    QName portName = new QName(targetNamespace, "PersonalDataInterface");
    QName operationName = new QName(targetNamespace, "Print");
    URL wsdlLocation = new URL("http://localhost:7001/simpleexample/PersonalDataInterface?WSDL");
    // create service
    Service service = serviceFactory.createService(wsdlLocation, serviceName);
    // create call
    Call call = service.createCall(portName, operationName);
    WSDL
    <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="http://learn.technologies.com/WS"
    targetNamespace="http://learn.technologies.com/WS">
    <types>
    <schema targetNamespace="http://learn.technologies.com/WS"
    xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
    <element name="PrintRequest">
    <complexType>
    <sequence>
    <element name="firstName" type="string"/>
    <element name="age" type="int"/>
    <element name="salary" type="double"/>
    </sequence>
    </complexType>
    </element>
    <element name="PrintResponse">
    <complexType>
    <sequence/>
    </complexType>
    </element>
    <element name="QueryRequest">
    <complexType>
    <sequence>
    <element name="id" type="double"/>
    </sequence>
    </complexType>
    </element>
    <element name="QueryResponse">
    <complexType>
    <sequence>
    <element name="return" type="tns:ArrayOfPersonalData"/>
    </sequence>
    </complexType>
    </element>
    <complexType name="PersonalData">
              <sequence>
              <element name="name" type="string"/>
              <element name="age" type="int"/>
              <element name="salary" type="double"/>
              </sequence>
    </complexType>
    <complexType name="ArrayOfPersonalData">
              <sequence>
              <element maxOccurs="unbounded" minOccurs="0" name="Item" type="tns:PersonalData"/>
              </sequence>
    </complexType>
    </schema>
    </types>
         <message name="PrintRequestMessage">
         <part name="PrintRequest" element="tns:PrintRequest"/>
         </message>
         <message name="PrintResponseMessage">
         <part name="PrintResponse" element="tns:PrintResponse"/>
         </message>
         <message name="QueryRequestMessage">
         <part name="QueryRequest" element="tns:QueryRequest"/>
         </message>
         <message name="QueryResponseMessage">
         <part name="QueryResponse" element="tns:QueryResponse"/>
         </message>
         <portType name="PersonalDataInterface">
              <operation name="Print">
                   <input name="PrintRequestMessage" message="tns:PrintRequestMessage"/>
              <output name="PrintResponseMessage" message="tns:PrintResponseMessage"/>
              </operation>
              <operation name="Query">
                   <input name="QueryRequestMessage" message="tns:QueryRequestMessage"/>
                   <output name="QueryResponseMessage" message="tns:QueryResponseMessage"/>
              </operation>
         </portType>
         <binding name="PersonalDataIntfBinding" type="tns:PersonalDataInterface">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
         <operation name="Print">
              <soap:operation/>
              <input> <soap:body use="literal"/> </input>
              <output> <soap:body use="literal"/> </output>
         </operation>
         <operation name="Query">
              <soap:operation/>
              <input> <soap:body use="literal"/> </input>
              <output> <soap:body use="literal"/> </output>
         </operation>
         </binding>
         <service name="PersonalDataService">
         <port name="PersonalDataInterface" binding="tns:PersonalDataIntfBinding">
              <soap:address location="http://localhost:7001/simpleexample/PersonalDataInterface"/>
         </port>
         </service>
    </definitions>

    Exception is coming on following line (forgot
    to paste in first post)
         Object result = call.invoke(new Object[] { "Shakeel", new Integer (30), new Double(2000) });

  • Exception while invoking webservices using Dynamic client without WSDL

    Hi All,
    I am getting the below exception while invoking webservices using Dynamic client without WSDL.
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
    at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
    Exception in thread "main"
    Please find my source file below....
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    public class TestWSWithoutWSDL {
    public static void main(String[] args) {
    try{
    String address = "<WSDL's SOAP Address>";
    String namespaceURI = "<namespaceURI>";
    String serviceName = "<serviceName>";
    String portName = "<portName>";
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
    String agencyID = "AGN00533";
    String fileName = "testWS";
    String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory factory = ServiceFactory.newInstance();
    * Create an instance of the Service with the given service QName
    Service service = factory.createService(new QName(serviceName));
    Call call = service.createCall(new QName(portName));
    call.setTargetEndpointAddress(address);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
    QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
    * Set operation name to invoke.
    call.setOperationName(new QName(namespaceURI,"<operationName>"));
    * Add parameters definitions in the call object.
    call.addParameter("string", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
    * Set definition of the return type.
    call.setReturnType(stringQName);
    Object[] inParams = new Object[3];
    inParams[0] = new String(agencyID);
    inParams[1] = new String(fileName);
    inParams[2] = new String(xmlString);
    String result = ((String)call.invoke(inParams)).toString();
    System.out.println(result);
    }catch (Exception e){
    e.printStackTrace();
    Please give your suggestions for the above said exception....
    Thanks & Regards....

    Hi All,
    I am getting the below exception while invoking webservices using Dynamic client without WSDL.
    javax.xml.rpc.soap.SOAPFaultException: Exception during processing: java.lang.RuntimeException: Missing license file for: WebLogic Platform 8.1 (see Fault Detail for stacktrace)
    at weblogic.webservice.core.ClientDispatcher.receive(ClientDispatcher.java:313)
    at weblogic.webservice.core.ClientDispatcher.dispatch(ClientDispatcher.java:144)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:457)
    at weblogic.webservice.core.DefaultOperation.invoke(DefaultOperation.java:443)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:558)
    at weblogic.webservice.core.rpc.CallImpl.invoke(CallImpl.java:411)
    at atthi.webservice.TestWSWithWSDL.main(TestWSWithWSDL.java:41)
    Exception in thread "main"
    Please find my source file below....
    import javax.xml.rpc.ServiceFactory;
    import javax.xml.rpc.Service;
    import javax.xml.rpc.Call;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    public class TestWSWithoutWSDL {
    public static void main(String[] args) {
    try{
    String address = "<WSDL's SOAP Address>";
    String namespaceURI = "<namespaceURI>";
    String serviceName = "<serviceName>";
    String portName = "<portName>";
    String ENCODING_STYLE_PROPERTY = "javax.xml.rpc.encodingstyle.namespace.uri";
    String URI_ENCODING = "http://schemas.xmlsoap.org/soap/encoding/";
    String agencyID = "AGN00533";
    String fileName = "testWS";
    String xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><web-services>Sample Application</web-services>";
    System.setProperty( "javax.xml.rpc.ServiceFactory", "weblogic.webservice.core.rpc.ServiceFactoryImpl");
    ServiceFactory factory = ServiceFactory.newInstance();
    * Create an instance of the Service with the given service QName
    Service service = factory.createService(new QName(serviceName));
    Call call = service.createCall(new QName(portName));
    call.setTargetEndpointAddress(address);
    call.setProperty(Call.SOAPACTION_USE_PROPERTY, new Boolean(true));
    call.setProperty(Call.SOAPACTION_URI_PROPERTY, "");
    call.setProperty(ENCODING_STYLE_PROPERTY, URI_ENCODING);
    QName stringQName = new QName("http://www.w3.org/2001/XMLSchema", "string");
    * Set operation name to invoke.
    call.setOperationName(new QName(namespaceURI,"<operationName>"));
    * Add parameters definitions in the call object.
    call.addParameter("string", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string0", stringQName, String.class, ParameterMode.IN);
    call.addParameter("string1", stringQName, String.class, ParameterMode.IN);
    * Set definition of the return type.
    call.setReturnType(stringQName);
    Object[] inParams = new Object[3];
    inParams[0] = new String(agencyID);
    inParams[1] = new String(fileName);
    inParams[2] = new String(xmlString);
    String result = ((String)call.invoke(inParams)).toString();
    System.out.println(result);
    }catch (Exception e){
    e.printStackTrace();
    Please give your suggestions for the above said exception....
    Thanks & Regards....

  • 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

  • JSF Tomahawk Dynamic Menu jsCookMenu Param Passing Question .. Help Please!

    Hello everyone,
    Thank you again for your help. Let me explain what my issue is.
    I am currently developing a JSF 1.2 application using WDSC 7 (RAD 7). I am trying to
    develop a shopping cart application. The part I am stuck on is the menu.
    I need to draw a menu with drop downs with multiple levels. The first level is the category
    and the second level is the item name. The menu must be dynamically built from a Database table.
    After searching high and low I came across jsCookMenu component which requires Tomahawk to be installed.
    I installed this ontop of my IBM JSF implementation and it seems to be working fine.
    I currently have a MenuBean which calls a database and populates a NavigationMenuItems array and passes
    that to the jsCookMenu component which then renders that to the client.
    This works fine.
    Here is my question. When the user selects the first level of the menu, I want to call a page called
    GetCategory.jsp?catID=num num being the category id selected. When they select the second level of the
    menu, I want it to then call GetItem.jsp?itemID=num. I know I can use the action attribute of the menu
    item or a direct URL (which pops it up in a new window).
    Basically, I need to pass a parameter to an action (again I am somewhat new to JSF) or I need
    to call the page directly passing the request parameter.
    Am I going about this the wrong way, and if so, what way should I be going?
    Secondly, is there a better, cleaner implementation or component I can use instead.
    I'm using Tomahawk just for the one component.. That's it.
    Any help anyone can provide I would greatly appreciate it.
    Thanks so much!
    Matt

    That is correct.
    I have the menu populating dynamically built from a JavaBean.
    It works beautifully.
    Level 1 is the Category - the action is DisplayCategory
    Level 2 is the Item - the action is DisplayItem
    Level 3 is the Style - the action is DisplayStyle
    My problem is, on each page, DisplayCategory/DisplayItem/etc how do I know which menu item was clicked?
    Anyone have any idea?
    Thanks,
    Matt

Maybe you are looking for

  • How to upgrade from os x 10.6.8 to Lion os 10.7.2

    How to upgrade from os x 10.6.8 to Lion os 10.7.2?

  • Folder file structure

    On my hard drive, I put all my images in the My Pictures folder. Under that is a folder called Digital Photos and in that folder are folders by year. Within each year folder, each shoot is labeled as such: 01-27-08 Flowers, etc. I can not figure how

  • FILE- WEBSERVICE- JDBC Sceanrio

    Hi All, have file  to webserivce sceanario i am using this Webserice to insert the records into the oracle databse.(not using the JDBC recievr adapter because of some size limitations)..so i can only use websrivce for this to insert Now the table has

  • I have a Mac OS X 10.5.8 what can i upgrade to?

    i have a Mac OS X 10.5.8 what can i upgrade to?

  • Can't restore backup files.

    Not long ago my mbp HD broke and I had to change it. Now I am trying to restore some backup files from it but it seems that I have no permission to access those files therefore I cannot restore them. Is there a way I can access those files again? NOT