Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 18856 invoked from network); 1 Sep 2007 12:45:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Sep 2007 12:45:33 -0000 Received: (qmail 4886 invoked by uid 500); 1 Sep 2007 12:45:21 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 4863 invoked by uid 500); 1 Sep 2007 12:45:20 -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: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 4852 invoked by uid 99); 1 Sep 2007 12:45:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2007 05:45:20 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 01 Sep 2007 12:45:16 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IRSLP-0002hx-Iy for axis-user@ws.apache.org; Sat, 01 Sep 2007 05:44:55 -0700 Message-ID: <12440052.post@talk.nabble.com> Date: Sat, 1 Sep 2007 05:44:55 -0700 (PDT) From: marcello To: axis-user@ws.apache.org Subject: handler: manipulating messages with DOM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: m.desantis@storming.it X-Virus-Checked: Checked by ClamAV on apache.org I'm trying to manipulate a response message using DOM on Axis 1.1, but I'm not sure about the flow I should follow. I've tried the following: Message response = msgContext.getResponseMessage(); SOAPEnvelope responseEnvelope = response.getSOAPEnvelope(); SOAPBodyElement sbe = (SOAPBodyElement) responseEnvelope.getFirstBody(); doc = sbe.getAsDOM(); ... manipulate doc responseEnvelope.removeBodyElement(sbe); SOAPBodyElement newBody = new SOAPBodyElement(doc.getDocumentElement()); responseEnvelope.addBodyElement(newBody); As a test, I've tried to run the code above without doing any modification to the DOM document, just to see if it gave me the result I expected (a modified message identical to the original), but it didn't. I get an invalid message which brings to a casting exception in the following phases. What I'm I doing wrong? Thanks in advance. Marcello Desantis Storming Sas -- View this message in context: http://www.nabble.com/handler%3A-manipulating-messages-with-DOM-tf4364463.html#a12440052 Sent from the Axis - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org