You can try something like this:
In the method invoke of your handler (as it extends BasicHandler) you have the following signature:
void invoke(MessageContext msgContext)
So you can try something like:
void invoke(MessageContext msgContext) { org.apache.axis.Message testMsg = context.getRequestMessage(); //Or ResponseMessage if getPastPivot() is true
org.apache.axis.SOAPPart soapPart; soapPart = (org.apache.axis.SOAPPart)testMsg.getSOAPPart(); try { org.apache.axis.message.SOAPBody body; body = (org.apache.axis.message.SOAPBody) soapPart.getAsSOAPEnvelope().getBody(); org.w3c.Element element = body.getAsDOM(); //or: org.w3c.Document doc = body.getAsDocument(); } catch ( Exception ex ) { throw new AxisFault("could not get body."); } ... }
regards, Christoph
[EMAIL PROTECTED] wrote:
In a handler (axis BasicHandler type), I need to transform the soap part of the message into a Document object I use the javax.xml.transform.Transformer and I get the Document object. But this Document is full of "\n" and sometimes "\r" or spaces !!! It's not very easy to use : is there any solution to get a "clean" Document object with only the meaningful elements of the SOAPPart ?
Valerie