Title: Message
And if you are trying to access only the raw SOAP body, you can do it with the "message" style supported by Axis. The user's manual has more details, but essentially your service would have to expose a method with one of 4 signatures as described in the manual. Here is some sample code:
 
    public SOAPBodyElement[] processMessage(SOAPBodyElement[] requestElements)
    throws RemoteException {
       
        try {
            StringWriter writer = new StringWriter();
            SerializationContext serializationContext =
                new SerializationContextImpl(writer);
            requestElements[0].output(serializationContext);
            String messageString = writer.toString();
        }
        catch (Exception e) {
            throw new RemoteException("processMessage caught exception", e);
        }
    }
Naresh
-----Original Message-----
From: WALTERS,EUGENIO (HP-Boise,ex1) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 2:18 PM
To: [EMAIL PROTECTED]
Subject: RE: Accessing 'raw' document body.

You could use a response handler to retrieve the response message.
 
your deploy.wsdd could look something like this:
 
 <service name="test" provider="java:RPC">
  <responseFlow>
   <handler type="java:CustomHandler">
    <parameter name="scope" value="scope"/>
   </handler>
  </responseFlow>
  <parameter name="allowedMethods" value="*"/>
  <parameter name="className" value="ServiceClass"/>
  <parameter name="scope" value="scope"/>
 </service>
 
your handler could look some thing like
 
public class CustomHandler extends BasicHandler
{
    public void invoke (MessageContext messageContext)
   {
        Message responseMessage = messageContext.getResponseMessage();
        ......
   }
}
Eugenio
-----Original Message-----
From: Erich Oliphant [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 12, 2003 12:04 PM
To: [EMAIL PROTECTED]
Subject: Accessing 'raw' document body.

Hello,
I am using Axis to make calls against a SOAP service that uses document style messaging.  The Axis classes make it much easier to send requests and deal w/ the responses.  I have one situation where I need do several request/replies but I need to hand the unparsed response document body off to another program in the last step.  Is there any easy way to do this?
 
Thanks

Reply via email to