Hi All,

        While deploying my webservice i have specified the provider as
java:MSG. Now does this make my service Message style service? I have the
signature of the method as per the Messaging service signatures. Is there
anything else that makes the service Message oriented?

        I used the -W switch as suggested by Anne and generated the client
java files using WSDL2Java...the
oper.setStyle(org.apache.axis.enum.Style.WRAPPED) was changed to
oper.setStyle(org.apache.axis.enum.Style.DOCUMENT).

        Also i found out 1 flaw in my client code that accessed the
WSDL2Java generated code. I was getting a org.w3c.dom.Document object and
passing it to the XXXSOAPBindingStub.<ServiceMethod>...but after looking at
the Axis Api's Call class i found out that 

        Object invoke( Object[] ) ( which is invoked in the stub ) expects
an array of SOAPBodyElements for a messaging style service. So effectively i
was passing it the wrong type of parameters and hence it was not returning
me the SOAPBodyElements. Now after the correction , it returns the vector
from which i am able to get the Body elements.

        So i am able to write a client to use the WSDL2Java generated stubs
for Messaging style service. Anne had said we dont use WSDL2Java for
Messaging service...i just want to ask if its dont or cant..and if we dont
use then any reasons for not using WSDL2Java generated client stubs for
Message style services.

        I am attaching my client code for your reference.

        Regards,
        Vinod.


         


>  -----Original Message-----
> From:         Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 04, 2004 7:04 PM
> To:   [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject:      RE: How to retrive the SOAPBody of response using a
> WSDL2Java client stub 
> 
> Vinod,
> 
> Your WSDL conforms to the Wrapped convention (the input element name is
> the same as the operation name), therefore WSDL2Java generates the client
> using the Wrapped style. If you don't want it to generate Wrapped style,
> specify the -W switch. 
> 
> But if you want to pass DOM objects, you should use the Message style
> rather than Document style, in which case you don't use WSDL2Java. 
> 
> These "styles" are Axis styles rather than WSDL styles. WSDL styles (RPC
> and Document) refer to the on-the-wire message structure. Axis styles
> (RPC, Wrapped, Document, and Message) refer to the application programming
> model:
> 
> RPC: parameterized method invocation --> produces WSDL RPC/encoded
> Wrapped: parameterized method invocation --> produces WSDL
> Document/Literal
> Document: object method invocation --> produces WSDL Document/Literal
> Message: DOM invocation --> produces WSDL Document/Literal
> 
> Regards,
> Anne
> 
> _____________________________________________
> From: Vinod Patil [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 04, 2004 7:27 AM
> To: [EMAIL PROTECTED]
> Subject: How to retrive the SOAPBody of response using a WSDL2Java client
> stub 
> 
> Hi,
> 
> I have a webservice whose wsdl is attached. I am building client stubs
> using the WSDL2Java tool.
> I have a few questions regarding this
> 
> 1) The binding in the WSDL has Document style but when the
> XXXSoapBindingStub is generated the style is set to WRAPPED in the static
> block as follows
>     oper.setStyle(org.apache.axis.enum.Style.WRAPPED).
> 
> 2) Also i invoke the service using clientStub.getLocationInfoXML((Object)
> requestDoc ) (clientStub is of type XXXSoapBindingStub).
> The method getLocationInfoXML has a signature "object
> getLocationInfoXML(object)". I pass a dom object to it and the dom tree is
> embedded in the SOAP request body. 
> Fine till here
> 
> Now i am getting the output of this invocation as a null object. But i can
> see in tcpmon the SOAP request and response as per my requirements.
> My question : How do i get the SOAPBody of the response in my class that
> invokes this generated client stub?
> 
> Regards,
> Vinod.
> 
> 
>    << File: getTrailerInfo.wsdl >> 
> 

<<attachment: winmail.dat>>

Reply via email to