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

Similar Messages

  • Return complex type

    Hi, i have a web service that takes two double numbers and returns complex type
    @WebService( name="Complex",serviceName="ComplexService")
    public class Complex {
        private double real;
        private double img;
    @WebMethod(operationName = "add")
        public Complex add(Complex complex) {
            double realResult=real+complex.real;
            double imgResult=img+complex.img;
            return new Complex(realResult,imgResult);
    }Can you suggest any ideas how to return this as a string so the client can read it?
    Thanks a lot,
    Geo

    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

  • Web Dynpro and CAF (BOs, Application Services, returning Complex Types)

    Hi All,
    I am trying to develop an application using Web Dynpro and CAF for days now and did not get it running.. I need some help here.
    What I am trying to do / have done is the following:
    - Design a Business Object (BO) in CAF
    - Implement an Application Service that has a method called getAllBOs that calls the findAll method of the BO
    - call this method using AWS model or EJB model in Web Dnypro, show the result in a table.
    My getAllBOs returns a set of BOs (Data Type is the Complex Type of my BO in CAF). I was able to design the Application Service so that it returns a collection of BOs (using a Wrapper Comple Type), but I was never able to call the generated Web Service successfully in Web Dynpro. The WebService worked fine when testing it in wsnavigator...
    However, i never got it running.. is there anybody out there who is able to explain what to do to import a AWS model or an EJB model in Werb Dynpro and particularily how to implement the stuff so that it returns a set of BOs successfully...
    Thanks in advance.. Useful help is highly appreciated
    Please note: THIS IS ABOUT Netweaver CE 7.1 - do not post stuff about 7.0!

    Hi,
    You have to return a single object from caf layer to webdynpro layer.
    Since you are returning a list of BOs, create a wrapper in caf which contains the list of your BOs.
    Your application service should return this wrapper.
    Creating Wrapper:
    1. Create a complex data type.
    2. Include your BO as one of the properties in it. and set the cardinality to 0..n.
    In Application service invoke your findAll() of BO and use the returned list to populate the wrapper's BO list.
    Return this wrapper.
    Hope it helps.
    Regards,
    Fazal

  • Returning complex types with arrays (Java / EJB via WSIF)

    Hi all,
    I'm writing some WSIF bindings for existing EJBs, and I've struck a bit of a problem. Basically I've got complex types that contain arrays, and while instances of these types can be passed to the EJBs, return variables typed similarly cause the following fault:
    org.collaxa.thirdparty.apache.wsif.WSIFException: com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@1a372e0 : Could not invoke 'concatString'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ejbinterfacetest.StringReturnArray' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
         at com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB.executeRequestResponseOperation(WSIFOperation_EJB.java:1305)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:431)
         at com.collaxa.cube.ws.WSInvocationManager.invoke2(WSInvocationManager.java:416)
    The Java class StringReturnArray is a serializable JavaBean with one property, a String[] called strings. The corresponding complexType (that works when used as a method parameter type) is stringReturnArrayType:
    <complexType name="stringArrayType">
    <sequence>
    <element name="str" type="string" maxOccurs="unbounded" />
    </sequence>
    </complexType>
    <complexType name="stringReturnArrayType">
    <sequence>
    <element name="strings" type="tns:stringArrayType" />
    </sequence>
    </complexType>
    and I've type mapped in the binding with
    <format:typeMap typeName="typens:stringReturnArrayType" formatType="ejbinterfacetest.StringReturnArray" />
    Anyone know why this would be? Is there any way I can get more information out of BPEL or OC4J regarding the fault? (I've already turned the BPEL domain logging to All)
    Cheers,
    Chris.

    Any luck with this? I am running into the same error. Apparently, this is not an issue with Java binding, but when invoking remote EJBs, we run into this. I am running 10.1.3.1 and the error is:
    <fault>
    <bindingFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="summary">
    <summary>
    com.collaxa.cube.ws.wsif.providers.ejb.WSIFOperation_EJB@e26dbf : Could not invoke 'getIdentityInfo'; nested exception is:
         org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </summary>
    </part>
    <part name="detail">
    <detail>
    org.collaxa.thirdparty.apache.wsif.WSIFException: Class 'ca.bc.gov.pssg.c3.webservices.identitymanagement.Identity' is not compatible; nested exception is:
         oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    </detail>
    </part>
    </bindingFault>
    </fault

  • Complex type return.

    Hi guys;
    I have this simple class
    //This class is implemented as webservice which return complex type of World.
    public class HelloWorld {
         public World sayHelloWorld(World world,String countryCode) {
              if(new World().isValidWorld(world))return world;
              else return null;          
    public class World {
         private String world1 = "us";
         private String world2 = "uk";
         public boolean isValidWorld(World world){
              System.out.println("client passed: world1 "+world.getWorld1()+" world2: "+world.getWorld2());
              if(world.getWorld1().equalsIgnoreCase(this.getWorld1()) && world.getWorld2().equalsIgnoreCase(this.getWorld2()))return true;
              else
                   return false;
         //getter and setter for world1 and world2
    Now in weblogic test page.I have
    parameter as world ,type as World and value as follows:
    <world xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:n1="java:com.util"
    xsi:type="n1:World">
    <world1 href="#ID_2">
    </world1>
    <world2 href="#ID_2">
    </world2>
    <xsd:string xsi:type="xsd:string"
    id="ID_2">sample string</xsd:string>
    </world>
    and for next i have parameter as string,type as string and value as text box to input.
    But i don't understand or don't know why there is only one input value to put ie. <xsd:string xsi:type="xsd:string"
    id="ID_2">sample string</xsd:string> .there should be 2 to input world1 and world2.and now if i input value abc instead of sample string it will pass
    the same value(abc) for both world1 and world2 to server.Is that i did sth. wrong in build or there is more.I shall appreciate if somebody
    has answer onto this.Basically for complex type i need like this automatically..
    <world xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:n1="java:com.util"
    xsi:type="n1:World">
    <world1 href="#ID_1">
    </world1>
    <world2 href="#ID_2">
    </world2>
    <xsd:string xsi:type="xsd:string"
    id="ID_1">sample string</xsd:string>
    <xsd:string xsi:type="xsd:string"
    id="ID_2">sample string</xsd:string>
    </world>
    any suggestion??

    Hi there,
    Can you explain what you mean by this :
    I have an entry like :
    <xs:element name="retrieveDetailsResponse">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element minOccurs="0" name="return" nillable="true" type="ax21:Details"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>Do you mean changing the name element to retrieveDetailsReturn - i.e
    <xs:element minOccurs="0" name="retrieveDetailsReturn" nillable="true" type="ax21:Details"/>or just
    <xs:element minOccurs="0" name="retrieveDetails" nillable="true" type="ax21:Details"/>I can't get any of these to work....
    Edited by: uefa_celt on Feb 27, 2009 8:23 AM

  • Web Services Complex Types

    I am developing a Web Service in Netbeans 5.5 running on Sun Application Server 9.0UR1. The web service and client work fine if I use simple types like "String" as a return type. However, I need to return complex types, such as a user defined class. I setup the web service to define a user defined class, SimpleBean, and I setup my client to accept it. The client successfully connects and gets back the object but I do not have access to the any of the getters/setters in the object. How do I setup it up so that I get access to the returned object's getters/setters?
    Luke Mauldin

    JAXB can be used to solve your problem. Rather than trying return your own types directly use JAXB to explain your return types in a schema;
    Example:
    public class MyType {
    int id=-1;
    int noOfObjects=0;
    String something;
    @XmlElement(nillable = true) //Java annotation to return list
    List<String> participant;
    public Interaction() {
    participant= new ArrayList<String>();
    something=�hi�;
    public List<String> get() { return participant; }
    public void set(String newpart) {participant.add(newpart);}
    public String getCrux() { return �OK�; }
    public void setCrux(String something) { this. something = something; }
    @XmlAttribute
    public int getId() { return 0; }
    public void setId(int id) {  }
    @XmlAttribute
    public int getNoOfObjects() { return noOfObjects; }
    public void setNoOfObjects(int id) { this.noOfObjects =noOfObjects; }
    @WebService()
    public class MyService {
    @WebMethod
    public Results MyType (@WebParam(name = "id") String id) {
    return new MyType();
    When defining your own class make sure you have "get" and "set" methods for all types.(JAXB needs this)

  • How to use Adaptive WebService Model with CAF WebService and Complex Type

    Hi All,
    I am trying to use the Adaptive Web Service Model and call a WebService generated by the CAF. The return type of the WebService is a Complex Type.. I receive an exception when trying to instantiate the Model Node.
    Does anybody know how to use the Adpative Web Service Model with CAF WebServices and Complex Types as return type?
    Help is appreciated..
    Thanks, Johannes

    Thanks Mukesh.
    It is not possible to apply the Service Controller Template on Enterprise Java Bean Models as described in the Document. When I try to aply the template on the EJB Model, NWDS says: Only Webservice Models and RFC Models are supported...???
    I did not find any information about how to return complex types in AWS.. in this document???
    Is there such information available? Has anybody ever done that? There must be a way to do that.. Is is the standard approach, isn't it...? Please help me out there.. I need to get this running..
    Thanks, Johannes

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

  • Assign error with complex type return message

    Dear all,
    I have an axis web service with complex type return message. When I invoke the web service, and try to assign one element of the result to other variable, it fails with following error message(BPEL Fault:{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure{}
    The invoking web service and assignment BPEL source is as follows:
    <invoke name="registerConference" partnerLink="conferenceCenter" portType="tns:ConfArrangementPort" operation="Conference_Register" inputVariable="registerInput" outputVariable="registerOutput"/>
    <copy>
    <from variable="registerOutput" part="Conference_RegisterReturn" query="/Conference_RegisterReturn/confcity"></from>
    <to variable="bookHotelInput" part="si" query="/si/city"/>
    </copy>
    I tunneled the response SOAP message:
    ==== Response ====
    HTTP/1.1 200 OK
    Content-Type: text/xml; charset=utf-8
    Date: Sun, 31 Oct 2004 08:28:27 GMT
    Server: Apache Coyote/1.0
    Connection: close
    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <soapenv:Body>
    <ns1:Conference_RegisterResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://conference.sjtu.edu">
    <ns1:Conference_RegisterReturn href="#id0"/>
    </ns1:Conference_RegisterResponse>
    <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:ConfInfo" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="http://conference.sjtu.edu">
    <confcity xsi:type="xsd:string">star</confcity>
    <confend xsi:type="xsd:string">20041120</confend>
    <confstart xsi:type="xsd:string">20041116</confstart>
    </multiRef>
    </soapenv:Body>
    </soapenv:Envelope>
    ==============
    However, when i check the invoke activity audit trail, it return the following info:
    <messages>
    <registerInput>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="gi">
    <gi xmlns="http://conference.sjtu.edu">
    <attendeename xmlns="">ss</attendeename>
    <confname xmlns="">hh</confname>
    </gi>
    </part>
    </registerInput>
    <registerOutput>
    <part xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" name="Conference_RegisterReturn">
    <ns1:Conference_RegisterReturn xmlns:ns1="http://conference.sjtu.edu" href="#id0" />
    </part>
    </registerOutput>
    </messages>
    The detailed value of the return message lost, only leaving the href. Can I find the desired value again? should I try another XPATH expression? should I parse the result from the SOAP message directly? Or it's a problem of the system itself?
    Hope you can do me a favor, thanks.

    From Axis's user guide: RPC services default to the soap section 5 encoding rules, objects will be encoded via "multi-ref" serialization. Document services do not use any encoding (so in particular, you won't see multiref object serialization or SOAP-style arrays on the wire)
    May be I should try document service style instead of RPC. Thanks for your reply.

  • Complex types returned from web services

    I'm having problems getting values from a complex type from a
    CFC web service. Are there any tutorials that show you how this is
    done? The only tutorials I've seen have been returning simple
    types.
    I have tried everything I know, which is not a lot I must
    admit, I'm just a beginner! *L*
    Thanks in advance.

    I'm having problems getting values from a complex type from a
    CFC web service. Are there any tutorials that show you how this is
    done? The only tutorials I've seen have been returning simple
    types.
    I have tried everything I know, which is not a lot I must
    admit, I'm just a beginner! *L*
    Thanks in advance.

  • 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

  • Dynamic client in weblogic 9

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

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

  • Dynamic client problem

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

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

  • Pl Help......Web services with complex types

    Hi,
    I have deployed a web service on OC4J (9.02) having a complex type input and a complex type return. The web service is implemented as a stateless session bean and
    the relevant web.xml for the deployment is:
    <servlet>
    <servlet-name>ZipLookupManager</servlet-name>
    <servlet-class>oracle.j2ee.ws.SessionBeanWebService</servlet-class>
    <init-param>
    <param-name>jndi-name</param-name>
    <param-value>ZipLookupManagerBean</param-value>
    </init-param>
    <init-param>
    <param-name>class-name</param-name>
    <param-value>com.indus.banner.components.cdyne.ZipLookupManagerBean</param-va
    lue>
    </init-param>
    <init-param>
    <param-name>interface-name</param-name>
    <param-value>com.indus.banner.components.cdyne.IZipLookupManager</param-value
    >
    </init-param>
    <init-param>
    <param-name>custom-bean-qname</param-name>
    <param-value>
    com.indus.banner.components.cdyne.LatLongReturn,
    http://cdyne.components.banner.indus.com,
    LatLongReturn,
    org.apache.soap.encoding.soapenc.BeanSerializer,
    org.apache.soap.encoding.soapenc.BeanSerializer
    </param-value>
    </init-param>
    <init-param>
    <param-name>custom-bean-qname</param-name>
    <param-value>
    com.indus.banner.components.cdyne.ZipState,
    http://cdyne.components.banner.indus.com,
    ZipState,
    org.apache.soap.encoding.soapenc.BeanSerializer,
    org.apache.soap.encoding.soapenc.BeanSerializer
    </param-value>
    </init-param>
    </servlet>
    The web service deploys correct. I have all the relevant jars in the %J2EE_HOME%\lib folder. However, when I call the web service from a standalone client I get the following error:
    java.lang.ClassNotFoundException:
    org.apache.soap.encoding.soapenc.BeanSerializer
    at
    oracle.j2ee.ws.GeneratedClassLoader.findClass(GeneratedClassLoader.ja
    va:48)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
    at oracle.j2ee.ws.BaseWebService.initQnameMap(BaseWebService.java:602)
    at oracle.j2ee.ws.RpcWebService.init(RpcWebService.java:453)
    at
    oracle.j2ee.ws.SessionBeanRpcWebService.init(SessionBeanRpcWebService
    .java:54)
    at javax.servlet.GenericServlet.init(GenericServlet.java:258)
    at
    com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.
    java:1956)
    at
    com.evermind.server.http.HttpApplication.findServlet(HttpApplication.
    java:4355)
    at
    com.evermind.server.http.HttpApplication.getRequestDispatcher(HttpApp
    lication.java:2484)
    Please advise!
    Rizwan

    Hi all,
    I haven't heard back from anyone. Is this forum alive still? I have entered a TAR on metalink on this issue but they say that apparently this was a defect under 9.02 and has been fixed under 9.04.
    Please help.
    Many thanks in advance.
    Rizwan

  • Complex Type as prameter

    I am exposing session beans as web services. My question is how can I use a
    user defined object as a parameter in the client.
    The scenario is like this.
    I invoke a method on an EJB through Webservice A and and it returns me an
    object of type let's say MYType
    On the client it will be packageA.generated.MYType (originally on server it
    is packageA.MYType)
    I want to call another EJB through Web Service B with MYType as parameter.
    But it expects the pramaeter type to be
    packageB.generated.MyType on the client
    Is there way Ican do this automatically rather than me doing a manul
    tranlation?
    I looked at faq on webservice.bea.com for "How do you use user-defined
    complex datatypes as parameters of the method?". It says the following:
    A) You need to register your "custom" data types with the typemapper. Your
    Main.java class should have some lines in it that look something like these:
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( SOAPElement.class,
    new
    QName("http://localhost:7001/CVCProxy/CVCProxy/WSDL/eVisharad.BEMEE.Client.E
    EService.CVCProxy",
    "CVCRequestToken" ),
    new SOAPElementCodec(),
    new SOAPElementCodec()
    But is is not clear what to do after that (to map the retunred type to it's
    original server side type or another client type). Please help.
    Thanks,
    Vish

    Hi Vish,
    I'd say the easiest way to go about this, is to create a "ReuseableTypes" web
    service that contains "echo" operations for each reuseable complex type. For
    example:
    package com.acme.webservices.datatypes;
    public MyTypeOne echoMyTypeOn(MyTypeOne mto)
    return mto;
    public MyTypeTwo echoMyTypeTwo(MyTypeTwo mtt)
    return mtt;
    The "service implementation" can just be a POJO (plain old Java object). Then
    use the <servicegen><service> and <servicegen><client> Ant tasks to do all the
    "hard stuff" (i.e. generating type mappings, serializers, deserializers) for you.
    Make sure you make the targetNamespace equal to the Java package you want all
    the reuseable types to be in. It can start with "http://", but the next part should
    match the Java package name you want (i.e. com.acme.webservices, etc). Afterwards,
    you can just unzip the client jar that's created to see what the client-side type
    mapping needs to looks like. There will be a MyService.xml file in the client
    jar that contains this.
    Regards,
    Mike Wooten
    "Vish Magapu" <vm> wrote:
    Hi Michael,
    Thanks for your response. That is what I want to do: "reuse user-defined
    complex types across web services"
    I was hoping to use my EJB knowledge and use web services as a transport
    in
    place of RMI and wanted to avoid lerning about JAX-RPC. It seems I have
    to
    take a plunge. I will work on you pointer about defining XSD schema.
    Please
    let me know if you know resources about that.
    Vish
    "Michael Wooten" <[email protected]> wrote in message
    news:[email protected]...
    Hi Vish,
    If you want to reuse "user-defined" complex types across web services,you
    probably
    want to define then in a seperate XSD schema, and include this in theweb-services.xml.
    Thay way the WSDL will be generated using the same complex types forboth.
    I'm
    not sure if there is a way to do this without manually editing theweb-services.xml
    (the Web Service Deployment Descriptor).
    Knowing a little about how to code XML schema from scratch, is a goodand
    powerful
    thing :-)
    Regards,
    Mike Wooten
    "Vish Magapu" <vm> wrote:
    I am exposing session beans as web services. My question is how can
    I
    use a
    user defined object as a parameter in the client.
    The scenario is like this.
    I invoke a method on an EJB through Webservice A and and it returns
    me an
    object of type let's say MYType
    On the client it will be packageA.generated.MYType (originally onserver
    it
    is packageA.MYType)
    I want to call another EJB through Web Service B with MYType asparameter.
    But it expects the pramaeter type to be
    packageB.generated.MyType on the client
    Is there way Ican do this automatically rather than me doing a manul
    tranlation?
    I looked at faq on webservice.bea.com for "How do you use user-defined
    complex datatypes as parameters of the method?". It says the following:
    A) You need to register your "custom" data types with the typemapper.
    Your
    Main.java class should have some lines in it that look something like
    these:
    TypeMappingRegistry registry = service.getTypeMappingRegistry();
    TypeMapping mapping = registry.getTypeMapping(
    SOAPConstants.URI_NS_SOAP_ENCODING );
    mapping.register( SOAPElement.class,
    new
    QName("http://localhost:7001/CVCProxy/CVCProxy/WSDL/eVisharad.BEMEE.Client.
    E
    EService.CVCProxy",
    "CVCRequestToken" ),
    new SOAPElementCodec(),
    new SOAPElementCodec()
    But is is not clear what to do after that (to map the retunred typeto
    it's
    original server side type or another client type). Please help.
    Thanks,
    Vish

Maybe you are looking for

  • APACHE FOP  LOGGER NOT SET

    In this day I have one issue and I was not able to resolve. Basically I found many post that speak of something similar. But don´t found one particular solution. I have one installation of APEX 3.1 and installed APache FOP 10.1.3.2.0, but this instal

  • 5.6.2 and Bursting

    Dear Gurus, Env details : XML Publisher Enterprise 5.6.2 standalone. In Xml publisher, created a report using datatemplate. which does create a XML file with right data. one of the tag in data file has email address of the Customer. How I can send em

  • Gnome mouse pointer theme in kde apps

    i use gnome as DE and i wish to see the pointer theme i use in GTK apps in QT apps as well. Actually when my pointer goes on an QT app like digikam it switches to default mouse pointer which is so ugly..

  • Fixed operation Quantity- Execution factor

    Dear All SAP NOTE: Use of Execution Factor Use the execution factor to indicate how many times an operation or sub-operation is to be carried out during processing of an order. The execution factor refers to the work, the operation duration, the oper

  • Passing data from one page to another page using form bean

    hi, refer to above question, i had follow the sample found at weblogic sample application ,but unfortunately when i create my own application. The following error occur: [Caught exception when evaluating expression '{actionForm.note}' with available