Hi I am upgrading to Axis2.  I have an app that uses JAXM via Axis 1.
So I do the normal SOAPEnvelope/Factory/etc stuff in the original app.
A wrinkle is that the WSDL for the web service (which I don't control)
is poorly specified (and rpc/encoded).  Basically it has a single
operation that accepts and returns an Any.  So I have to explicitly set
the SOAPAction to correspond to the XML document I send over.

I am trying to figure out how to do something similar with Axis 2.  I've
been playing with the ServiceClient with one of the Xmethods demo
services, trying to do a Dynamic invocation which I think I will need to
do for my service: 

--
ServiceClient serviceClient = new ServiceClient(null,
                                        new
URL("http://ws.strikeiron.com/InnerGears/ForecastByZip2?WSDL";),
                                        new
QName("http://innergears.com/WebServices3/ForecastByZip","ForecastByZip";
),
                                        null);
                        AxisService axisService =
serviceClient.getAxisService();
                        AxisOperation forecastOperation =
axisService.getOperation(new
QName("http://innergears.com/WebServices3/ForecastByZip","GetForecastByZ
ip"));
                        AxisMessage inputMessage =
forecastOperation.getMessage(WSDLConstants.MESSAGE_LABEL_IN_VALUE);
                        //OMElement response =
serviceClient.sendReceive(new
QName("http://innergears.com/WebServices3/ForecastByZip","GetForecastByZ
ip"));
--

Even in this case, I'm not sure how to get/create the proper OMElement
for the sendReceive() call?  Any help or a point to some examples of
ServiceClient usage in this context would be apprecicated.

I did find the AxisOperation.setSoapAction() which I think I can use to
do the 'dynamic' update of the SOAP action I need for each call.


Thanks!


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to