Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 94350 invoked from network); 9 Dec 2003 15:14:25 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 9 Dec 2003 15:14:25 -0000 Received: (qmail 32782 invoked by uid 500); 9 Dec 2003 15:14:10 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 32773 invoked by uid 500); 9 Dec 2003 15:14:10 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 32749 invoked from network); 9 Dec 2003 15:14:10 -0000 Message-ID: <3FD5E82B.8020601@dbai.tuwien.ac.at> Date: Tue, 09 Dec 2003 16:20:11 +0100 From: Christoph Tratter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: Re: SOAP to DOM References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Valerie! 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 valerie.bauche@bull.net 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 > >