Ashutosh,

If I answer your second question first; what reaches the actual web service
impl (EchoXML) is the body not the envelop. SO you are right about that. 

Now regarding the changes in the EchoXml class.... There are no significant
changes in this class. I believe you noticed that the parameter that is
passed to the EchoXml is an OMElement. Now if you simply return the
OMElement it gives us a few problems. Reason being this OMElement is not
built as yet. So if we return the unbuilt OMElement then at the provider it
will be added as a child element of the response element of the new outgoing
OM tree (SOAPEnvelop) Now that SOAPEnvelop has two internal OMBuilders so it
gives unprecedented complications in the serialization of the (out)envelop
and our OM cannot handle these complications right now.

So solution is pretty simple. We need to completely build OMElement at the
EchoXML before we return it. So now when it gets returned from the EchoXML
back to the provider and it gets placed inside respoces element  in the
outgoing  OM tree, now since it is built our OM can now serialize it out. 

element.getNextSibling();
This is going to move the stax cursor to the next sibling so the current
element will be get built totally

        element.detach(); 

This will detach our element from the in SOAPEnvelop.


Thanks
Chathura

> Chathura,
> I could not exactly understand the rationale behind the changes made in
> EchoXML.java. Why should one be looking to change the OMElement when u
> want to echo the input?
> Also, what is the XML that reaches the Echo method? Is it soap envelope
> or the contents of the body? I think it should be latter.
> The output is correct this time though.
> 
> Ashutosh
> 
> -----Original Message-----
> From: Chathura Herath [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 24, 2005 2:31 PM
> To: [email protected]
> Cc: 'Ashutosh Shahi'
> Subject: [Axis2] Userguide sample1: eating of the body in the out
> message fixed
> 
> Hi Ashutosh,
> 
> Sorry about the delay in response, couldn't find time to dig into this.
> Yup this is a problem and infact my first impression was that it was a
> bug
> in the Provider. Apparently it was something more than that which runs
> in to
> the Sender and also something to do with the Actual service impl. I have
> fixed it and please take an update and check.
> Think it's a good Candidate for a test case.
> 
> Thanks
> Chathura
> 
> > -----Original Message-----
> > From: Ashutosh Shahi [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, March 22, 2005 6:29 PM
> > To: Chathura Herath
> > Cc: [email protected]
> > Subject: Re: [Axis2]Maven Build broken?
> >
> > Chathura,
> >          Sending the input and output response. As you can see, the
> > content of the node <sample1:echo> is missing in the response.
> > I tried with the latest revision now and the problem still exists.
> >
> >   [java] Sending request...
> >      [java] <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> >
> xmlns:sample1="http://sample1.org/sample1";><soapenv:Header></soapenv:Hea
> de
> > r><soapenv:Body><sample1:echo><sample1:Text>Axis2
> >   Echo
> > String</sample1:Text></sample1:echo></soapenv:Body></soapenv:Envelope>
> >
> >      [java] log4j:WARN No appenders could be found for logger
> > (org.apache.axis.engine.AxisEngine).
> >      [java] log4j:WARN Please initialize the log4j system properly.
> >      [java] Responce received  ...
> >      [java] <soapenv:Envelope
> > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> >
> xmlns:sample1="http://sample1.org/sample1";><soapenv:Header></soapenv:Hea
> de
> >
> r><soapenv:Body><sample1:echo></sample1:echo></soapenv:Body></soapenv:En
> ve
> > lope>
> >
> > Ashutosh
> >
> > On Tue, 22 Mar 2005 16:31:47 +0600, Chathura Herath
> > <[EMAIL PROTECTED]> wrote:
> > > Hi Ashutosh,
> > > I just looked at the useguide/sample1. It worked fine both in the
> > current
> > > revision and the revision 158420. I simply couldn't regenerate the
> > problem
> > > you claimed. When you say the body is disappeared did you mean the
> soap
> > body
> > > element or the whole soap message?
> > >
> > > Still to look at the Build failure.
> > >
> > > Thanks
> > > Chathura
> > >
> > > > -----Original Message-----
> > > > From: Ashutosh Shahi [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, March 22, 2005 3:57 PM
> > > > To: [email protected]
> > > > Subject: [Axis2]Maven Build broken?
> > > >
> > > > Hi all,
> > > >          Trying the latest sources from Axis2 svn, I found that
> maven
> > > > build fails because of some
> > > > tests on addressing handlers that have been added recently. When i
> > > > tried the revision just before that, found that the content of
> body
> > > > disappears in the response received. I tried the sample programs
> from
> > > > userguide/sample1. Can someone look into it?
> > > >
> > > > Ashutosh
> > >
> > >
> 
> 
> 
> 
> 



Reply via email to