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.

Similar Messages

  • 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.

  • Jax-ws: dynamic proxy-suppress weblogic's default ws-policy handling

    hi all,
    i am writing my own jax-ws client (dynamic proxy) to call a web service, secured by usernametoken profile.
    the wsdl of the web service do include the ws-policy information.
    sample client side code:
    URL url = new URL("path_to_wsdl_file");
    QName serviceQname = new QName("http://model/", "CalculationService");
    Service service = Service.create(url, serviceQname);
    //add resolver and jax-ws handler to add username token SOAPElement fragment to the SOAP message.
    the above code runs fine in J2SE 6.0 environment (without any weblogic-specific library).
    but when i run the above code in a servlet (running in weblogic), the above code fails with the following error:
    Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Unable to add security token for identity, token uri =http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken
    at com.sun.xml.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:196)
    at com.sun.xml.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:122)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:119)
    at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:89)
    at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:118)
    at $Proxy23.add(Unknown Source)
    at client.ServiceLocator.main(ServiceLocator.java:32)
    it seems that the weblogic server will try to handle the ws-policy element (according to those in the wsdl), even though
    i have already added the username-token security header by my own code.
    As i don't add some weblogic-specific code (e.g. weblogic.wsee.security.unt.ClientUNTCredentialProvider), the web service call fails.
    is it possible to disable/suppress such behavior (weblogic runtime handle the ws-policy element) per web service call???
    (i don't want a server scope solution, as there may be other web service client running on the same weblogic server that rely on such behavior).
    i don't want to use weblogic's API (e.g. ClientUNTCredentialProvider) as i want my web service client be portable (username token is easy to be handled by my own code)
    thank you.

    Hi René ,
    i just use plain HTTP, not HTTPS.
    seems don't involve any certificate, am i right?
    in J2SE environment, i can run the webservice client without problem.
    but once i run the client in weblogic, the problem mentioned occurred.
    if i manually delete the ws-policy related tag in the wsdl file (i download it to local filesystem for testing), the client can run in weblogic too.
    so, think there is some setting in weblogic that try to handle the ws-policy by its so-called 'credential provider'(e.g. ClientUNTCredentialProvider ?)
    thank you.

  • 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 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....

  • Steps to deploy an ejb application and running an ejb client in weblogic server6.1

    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet

    Hi.
    Check out the beanManaged example that ships with WLS and read the accompanying docs. This
    is a simple EJB with a servlet that invokes it.
    Michael
    shekhar sachdev wrote:
    steps to deploy an ejb application and steps to run an ejb client in weblogic server6.1
    if the client is an simple java application and if the client is a servlet--
    Michael Young
    Developer Relations Engineer
    BEA Support

  • Dynamic query in weblogic 7.0?

    Hi:
    I tried dynamic query in weblogic 7.0 for almost a month but still failed. So I wish someone can help me .
    I used dynamic query in a session bean.
    QueryHome queryHome = (QueryHome) ctx.lookup("java:comp/env/ejb/BooksEJB");
    But this line always returns null for queryHome. I am sure my JNDI for CMP 2.0 BooksEJB is right.
    I also set <enable-dynamic-queries>True</enable-dynamic-queries>
    in descriptor file followed by instructions in bea documentation.
    Thanks !

    Ace:
    Shall I set this parameter in weblogic descriptor file ? If so, how do I set
    ? Thanks for your information here !
    [email protected] (Ace) wrote:
    The parameter for ctx.lookup() is what you have set the JNDI name for
    QueryHome in weblogic.
    ~Ace.
    Cottonxu <[email protected]> wrote in message news:<[email protected]>...
    Hi:
    I tried dynamic query in weblogic 7.0 for almost a month but stillfailed. So I wish someone can help me .
    I used dynamic query in a session bean.
    QueryHome queryHome = (QueryHome) ctx.lookup("java:comp/env/ejb/BooksEJB");
    But this line always returns null for queryHome. I am sure my JNDIfor CMP 2.0 BooksEJB is right.
    I also set <enable-dynamic-queries>True</enable-dynamic-queries>
    in descriptor file followed by instructions in bea documentation.
    Thanks !

  • Dynamic client for document styled webservice

    Hi ,
    I created a document styled webservice when I try to run it using DII client I am getting the following problem
    Exception in thread "Main Thread" javax.xml.rpc.JAXRPCException: failed to invoke operation 'testOperation' 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.examples.com/types']:testOperation}]StackTrace[
    Can anybody give me a simple example of creating document styled webservice and DII client using weblogic workshop 9.2
    Thanks
    Sksrinu

    What's the question about??

  • 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

  • How to enable dynamic query in weblogic 7.0?

     

    Hi,
    The documentation explains how to enable dynamic queries and set a
    method-permission to control access. If you find the information at the
    following link insufficient, let me know.
    http://e-docs.bea.com/wls/docs70/ejb/cmp.html#1089703
    You enable dynamic queries in your weblogic-ejb-jar.xml file with the following:
    <enable-dynamic-queries>True</enable-dynamic-queries>
    You can set a method permission as follows:
    <security-role>
    <role-name>Admin</role-name>
    </security-role>
    <method-permission>
    <role-name> Admin </role-name>
    <method>
    <ejb-name> EmployeeEJB </ejb-name>
    <method-name> createQuery </method-name>
    </method>
    </method-permission>
    - Matt
    Sanjeev Chopra wrote:
    also posting to EJB newsgroup
    "CottonXu" <[email protected]> wrote in message
    news:[email protected]..
    How to enable dynamic query in weblogic 7.0? The documentation accompanieswith
    Bea doesn't explain it in detail. How to set <method-permission> inejb-jar.xml?
    Thanks in advance.

  • Create dynamic Topics in WebLogic 12c?

    I am new to both JMS and WebLogic, and I can't seem to figure out how to properly run my JMS solution in WebLogic. I have developed my proof-of-concept with Active MQ, but the application will eventually need to run on WebLogic.
    Active MQ allowed me to create Topics dynamically, by simply calling createTopic() on TopicSession. If the Topic doesn't exist, it is created, which is exactly what I need. I can't figure out an easy way to do this in WebLogic. I know that createTopic() won't work as per the documentation:
       Note: The createQueue() and createTopic() methods do not create destinations dynamically; they create only references to destinations that already exist.
       For information about creating destinations dynamically, see Chapter 7, "Using JMS Module Helper to Manage Applications."
    I am aware that there is a `JMSModuleHelper` class, but the javadoc says the following:
       Note: Oracle recommends that the use of the create (distributed)queue/topic methods be strictly limited, as they directly modify the associated
       JMS Module configuration (your-jms.xml) file and provide minimal feedback for detecting success or failure.
    In addition to this warning, the usage of this class involves complex manipulation of MBeans and requires the knowledge of which server my application is running on. This is very inconvenient, since my app will be deployed to multiple servers based on the desired environment (ie. Integration Test, System Test, UAT, Prod, etc).
    Is there really no easy way to use dynamic Destinations in WebLogic?
    This makes me wonder if my entire JMS based design might be misguided... The idea is that I have 5 different applications, but these applications share a large user base among themselves. These users have consistent IDs among the applications. Some events within any of the applications trigger a JMS message that is broadcast to a Topic with a name derived from the currently logged in USER_ID. Every time a user logs into any of the apps, the app subscribes to that USER_ID_Topic, with the application name being the Subscription ID. This way the message is broadcast to all users when they log in to any of the 5 applications, yet there is a well defined, centralized Topic for all applications to push their user events into.
    Is there a way to do this in WebLogic, or is this a bad approach?
    Any advice would be appreciated!
    Val

    I think what your question boils down to is whether you can call Session.createTopic(topicName) to create new topics on-the-fly. The JMS specification doesn't require this to be possible, but many vendors including Glassfish Message Queue do allow this.
    If your JMS provider doesn't allow dynamically-created topics you can achieve the same effect by using a standard topic name and then a message selector to "filter" the topic. A message selector allows the consumer to specify that they want to receive only those messages which match some specified condition based on a message property.
    Nigel

Maybe you are looking for

  • Cisco 1602i + Authenticating users via RADIUS?

                   Hello, Our company recently purchased a Cisco 1602i standalone WAP to replace the WAP4410Ns that we were having issues with.  I am now attempting to configure the RADIUS authentication, as we have a User network and a Guest connection.

  • Class not found only using browser.

    I can not run any of my java programs in my browsers. They work fine using the "java" command in a dos window or using the "appletviewer" command. But when I try to view them in a browser, the page appears to load fine but I get no program and the st

  • 857 Router Dot11Radio0 reset - problem

    Hi all I have just upgraded the IOS in a 857 Router to this: ROUTER#sh version Cisco IOS Software, C850 Software (C850-ADVSECURITYK9-M), Version 12.4(15)T7, RELEASE SOFTWARE (fc3) but now I can't get the dot11radio 0 interface to come up. I just get

  • Project bakup question

    What is best practice when backing up FCP projects/or how do you do it? The reason I ask is that there is your Capture Scratch disk (where all your media resides) but there is also your project folder where everything else is. Is it just a case of Mi

  • Application icon recovery

    Hello, An icon for an application installed on my 9810 has disappeared. When I search for the app, the icon shows in a shaded or half-tone manner. I can activate the app when I click on this subdued icon, but unless I search for the app, it's icon is