Jose,
You wont be able to get a SOAPEnvelope at the client
end after the call or before the call .. because before the call there is no
SOAPMessage and after the Call the response is over.
and Call.getMessgaeContext() will return a null value.
So you cant access that Message Context.
How ever you can do one thing.
You can implement a Handler which will be invoked only
in the requestFlow and can then manipulate the SOAPMessage and the Handler end.
To do that you must add a handler in the deploy.wsdd
file and write a Handler class which extends the BasicHandler class of Axis
APIs.
<handler name="AttachmentHandler"
type="java:com.bt.oexgateway.webservices.AttachmentHandler"/>
<service name="TestOAGXMLService" provider="java:RPC" style="rpc" use="encoded"> <requestFlow> <handler type="AttachmentHandler"/> </requestFlow> <responseFlow> <handler type="AttachmentHandler"/> </responseFlow> .... </service>
The handler class will be something like this
import
org.apache.axis.handlers.BasicHandler;
public class AttachmentHandler extends
BasicHandler
{ public void invoke(MessageContext msgContext)
throws AxisFault
{ System.out.println("Hi Hi Handler Invoked !! "); // Gets the Request SOAP Message Message reqMsg = msgContext.getRequestMessage(); // Gets the response SOAP Message Message respMsg = msgContext.getResponseMessage(); ...
....
}
}
During the call from the client the method invoke() of
the declared handler is called . It depends on the declaration in the WSDD file
. If you need it in both requestFlow and responseFlow then give as above
wsdd. if you need only in request then only <requestFlow> is needed..
Depends upon you and ur application.
People, Hope I am right here.
Hope this helps you
Cheers
Dhanush
|
- How to get the SOAP Envelope from msg Context withou... Jose M. Selman
- Re: Re: How to get the SOAP Envelope from msg C... Dhanush Gopinath
- Re: Re: How to get the SOAP Envelope from m... Davanum Srinivas
- Re: Re: How to get the SOAP Envelope fr... Jose M. Selman
- Re: Re: How to get the SOAP Envelop... Davanum Srinivas
- Re: How to get the SOAP Envelope from msg C... Jose M. Selman
- Re: How to get the SOAP Envelope from m... Davanum Srinivas
- Re: How to get the SOAP Envelope from m... Dhanush Gopinath
- RE: How to get the SOAP Envelope from msg Conte... GANDHIRAJAN, AYYAPPAN