Hi,

Thanks for your response.  I've written an interceptor to do it, but was just 
looking at the Dispatch API.  I've got some old Axis code that I'm 
replacing - it does this:

         Service service = new Service();
         Call call = (Call)service.createCall();
         call.setTargetEndpointAddress(new URL(endPoint));
         call.setOperationName(new QName("http://www.xyz.com";, method) );
         if (username != null) call.setUsername(username); 
         if (password != null) call.setPassword(password);
         String ret = (String)call.invoke(new Object[] { message }); 

Is that easy to replace with the jaxws (dispatch?) api?  It did nothing more 
than call a WS method, passing one parameter and assuming a String response.  
No WSDL involved...


John

P.S.  If anyone needs the interceptor then I'm happy to post it.

On Sunday 21 June 2009 13:19:37 you wrote:
> John Baker wrote:
> > Hello,
> >
> > How does one obtain the raw SOAP message returned from a client
> > webservice call?  Ideally, as String or a Document would be nice.
> >
> >
> > John
>
> You can achieve the same in either of two ways:
>
> A. You can use Dispatch API [1] to write your client where you can get
> either Message (Body element) or Payload (entire SOAP Envelope).
> or
> B. You can write and plugin your own interceptor [2] in the interceptor
> chain where you can get the hold of soap message.
>
> With Regards,
> Mayank
>
> [1]. http://cwiki.apache.org/CXF20DOC/jax-ws-dispatch-api.html
> [2].  http://cwiki.apache.org/CXF20DOC/interceptors.html

Reply via email to