Return-Path: Delivered-To: apmail-xml-axis-user-archive@xml.apache.org Received: (qmail 56615 invoked by uid 500); 9 Sep 2002 16:56:34 -0000 Mailing-List: contact axis-user-help@xml.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@xml.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@xml.apache.org Received: (qmail 56606 invoked from network); 9 Sep 2002 16:56:34 -0000 Reply-To: From: "Allegar Robert" To: Subject: RE: can handlers in a chain mutate the message? (newbie) Date: Mon, 9 Sep 2002 12:55:20 -0500 Message-ID: <002101c2582a$111206e0$d982a8c0@allegarc600> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 In-Reply-To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Status: O X-Status: X-Keywords: James, A handler can do pretty much anything it wants to the entire message. If you want to change the body, you can. Same goes with the header. You can even pass an entirely different message along if you want. The LogHandler that's distributed as the example just shows how to read the content of the message. As you said, you could very easily do some XSLT or other processing in the handler, set the changes on the message and then the changed message would be passed along to the next handler in the chain (if one exists). You don't need to explicitly call the next handler in the chain (as you do in servlet chains) as the axis container will do that for you. In general, you should probably try and keep your handlers as discrete and independent as possible. Look back a few days on this list and you'll see some code posted that shows you how to modify the headers in the soap message in the body of a handler. Regards, Rob -----Original Message----- From: James Carlyle [mailto:james.carlyle@fableflow.com] Sent: Sunday, September 01, 2002 2:52 PM To: axis-user@xml.apache.org Subject: can handlers in a chain mutate the message? (newbie) Hi Just getting started with Axis. I read in the example code that the log handler (java:samples.userguide.example4.LogHandler) implements the 'invoke' method of the BasicHandler class but does not change the content of the message in it's context. Can handlers change the Body payload of the message? Could I do some XSLT transformation on the payload in one handler before passing the context and changed message on to the next handler in the chain? Or can this only happen in a handler which is the sole pivot point of the service? Although the Architecture guide states "a message is processed by passing through the appropriate Chains. A message context is used to pass the message and associated environment through the sequence of Handlers" it is not clear what the intermediate handlers can do. Many thanks if you can help. James Carlyle FableFlow : MMS templating and delivery Multimedia Messaging commentary : http://www.fableflow.com/weblog/