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

Similar Messages

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

  • RMI dynamic classloading problems

    I wanted to know if you could help me answer this particular case,
    which i still haven't been able to solve in days:
    1>RMI Client and Server are on different hosts.
    2>the Client makes a RMI method call to a Server who has to execute
    dynamically a particular classfile specified by the client itself and
    return the result to the client
    PROBLEM IS:
    at the beginning only the client has the classfile to be executed by
    server and needs to transfer him the information in order to have its
    RMI method executed,and no ohter protocols except for RMI are
    allowed.
    QUESTION IS:
    how could i solve this case with the use of codebases and
    URLClassLoader Objects?
    hoping i've clearly made the point,thanXalot
    nicholas

    The client can set its own codebase. The client class that the server will call needs to implement an interface the server knows. Then the client will pass this object to the server, and the server will make its call on that object. Since this object is not exported it will be serialized to the server, and the call will run on the server.
    Quite insecure. But it should work just that simply I do believe.
    You do know how to use codebase?

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

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

  • 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

  • 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

  • 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) });

  • Dynamic Link Problem beim Batchencoden???

    Habe seit kurzem folgendes Problem: Exportiere ich mehrere Videos über den Media Encoder, habe ich bei fast der Hälfte der Filme "kaputte Videos" entweder nur an den Effekten oder beim kompletten Video. Rechne ich die Filme einzeln raus, ist alles ok. Das stinkt sehr nach Dynamic Link Problem. Ich kennen das z.T. schon in der Zusammenarbeit mit After Effects. Hier rechne ich meine Projekte erst, bevor ich sie in Premiere reinhole. Aber auf das Batchencoden kann ich nicht verzichten, da ich teilweise 30 und mehr Clips in verschiedenen Formaten rausrechnen muss und das wirklich nicht einzeln erledigen will.
    Frage: Hat jemand ne Idee (das Problem existiert erst seit kurzer Zeit), ob da irgendwelche caches vollaufen, kann man dynamic link irgendwie "resetten" oder muß ich das ganze Production Premium Paket CS5.5 neu installieren (wollte ich eigentlci vermeiden!!!!!)?
    Ach ja, System Windows 7 64Bit mit CS5.5
    Gruß
    Stefan

    Operator error. Answered my own question. I haven't used Dynamic Link much. It works fine. I was momentarily confusing the import of a PP project vs. a Dynamic Linked Sequence.  

  • CS4 Dynamic Link Problem

    Is anybody having trouble keeping the source files linked in After Effects after using dynamic link from Premiere?
    Please refer to this link:
    cwrig, "CS4 Dynamic Link Problem" #1, 26 Oct 2008 1:02 pm
    This is very frustrating.
    Thanks for your time!

    Did some more tests and here is what does and doesn't work for me.
    Losing footage -
    Yes I was having the issue (and the topic is in the premiere forum also)
    Here is what seems to solve it.
    It loses the footage if I use the original folder which has spaces in the name. Not sure if that is the culprit but both methods proved consistent in every test I did.
    it worked when I used a new folder called "Test" at the root of my editing drive.
    Crashing-
    Not sure if other have the issue but when I close AE, PPro will just sit there with an hour glass and show as not responding.
    If I close PPro first and then AE and reopen PPro then all seems to work as it is supposed to.
    This was also consistent in every test I did.

  • 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

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

Maybe you are looking for