Thanks very much Chirs. :o)m
-----Original Message----- From: Chris Haddad [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 24, 2004 10:43 AM To: [EMAIL PROTECTED] Subject: RE: basic questions before start using Axis... Hi Om - The Axis users guide is a good place to start for learning more about handlers. A search for 'axis.handlers' in the /test and /samples codebase yields a significant number of examples. Of particular note may be /test/session/TestSimpleSession and /samples/stock/ and /samples/userguide/example4 To obtain a specific header, use the following code where HEADER_NS is the namespace of the target element and HEADER_REQNAME is the element name: public static final String HEADER_NS = "http://soapinterop.org/echoheader/"; public static final String HEADER_REQNAME = "echoMeStringRequest"; Message msg = context.getResponseMessage(); // or Message msg = context.getRequestMessage(); SOAPEnvelope env = msg.getSOAPEnvelope(); SOAPHeaderElement header = env.getHeaderByName(HEADER_NS, HEADER_REQNAME); cheers, /Chris The O'Reilly "Programming Apache Axis" book has an entire chapter dedicated to handlers...... http://cvs.apache.org/~haddadc ---------- Original Message ---------------------------------- From: [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] Date: Wed, 24 Mar 2004 10:31:14 -0800 >Appreciate if anybody can give some light on the below email... > >Cheers! > :o)m > >-----Original Message----- >From: [EMAIL PROTECTED] >[mailto:[EMAIL PROTECTED] >Sent: Tuesday, March 23, 2004 1:06 PM >To: [EMAIL PROTECTED] >Subject: RE: basic questions before start using Axis... > > >Hi Anne, thanks very much for the pointers and I'm convinced by the answers. >But I got another couple of questions from your answers, >- Is there any out-of-the-box sample or document which allows me to >write/add handler to handler chain. >- You are right, typically header blocks are intended for handlers, all I >need to know is what I should be doing if I want to see some specific >information from 'request-header block' and also set some values for >'response-header block'. > >thanks and regards > Om > >-----Original Message----- >From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] >Sent: Tuesday, March 23, 2004 5:24 AM >To: [EMAIL PROTECTED] >Subject: Re: basic questions before start using Axis... > > >1. If you use the "wrapped" convention, the Axis will automatically marshal >the method parameters for you. In the wrapped still you must define a >wrapper element for your input message. The name of the input message must >be the same as the operation name. The wrapper element must be structured >as a sequence; each parameter defined as a child element. If you don't use >the wrapped convention, then Axis will marshal the message into an object. > >Axis doesn't perform automatic validation of the message. If you want to >perform validation , then you can add a handler in your handler chain to do >it. The marshalling is done based on the WSDL, so if the message isn't >valid, you're likely to receive a serialization exception. > >2. Typically header blocks are intended for handlers rather than the >service implementation. > >Anne > >At 04:04 AM 3/23/2004, you wrote: >>Hi all, I'm new to Axis 1.1 and if any type of document or samples or any >>pointers will be appreciated if you can help me understanding the below >>problems with Axis... >> >>Assumption: Service is of "Document" Style and uses java binding classes >> >>1. I understand if we use wsdl2java, we get the Java binding classes, but >>does it guarantees the marshaling being done and adhere to associated WSDL? >>or how does the incoming messages to service gets validated as per the >>defined schema in WSDL. >> >>2. If an incoming request to service contains the header & body blocks, >then >>how does the service implementation capture the header portion? Or is this >>also covered under the Java binding classes? >> >>thanks very much >> :o)m > >~~~~~~~~~~~~~~~~~~ >Anne Thomas Manes >VP & Research Director >Burton Group >