You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by Pavlovic Petar <pp...@ptt.yu> on 2001/10/04 21:24:13 UTC
XML dump
I need a little help. I'm fairly new to Java and SOAP. I need
this example for my graduate assigment.
I'm having trouble to find the right classes and methods
for the job.
What I need is u chunk of JAVA code (from Apache SOAP toolkit) that
will display SOAP message (XML formatted). Some sort of debug
information, just for purpose of demonstration.
Thanks in advance.
Regards,
coyote
Re: XML dump
Posted by k young <yo...@yahoo.com>.
I had the same problem but with complex return types.
What I ended up doing was extending the
org.apache.soap.rpc.Call class and overloading the
invoke(url, actionURI) method with some code that
captures the soap payload before it was marshalled
into the target object.
Or if you are dealing with the usual supported types
(ie int, double, boolean, and string) you could do:
StringWriter sw = new StringWriter();
response.buildEnvelope().marshall(new PrintWriter(sw),
call.getSOAPMappingRegistry());
String soapBody = sw.toString();
--- Pavlovic Petar <pp...@ptt.yu> wrote:
> I need a little help. I'm fairly new to Java
> and SOAP. I need
> this example for my graduate assigment.
>
> I'm having trouble to find the right classes and
> methods
> for the job.
>
> What I need is u chunk of JAVA code (from
> Apache SOAP toolkit) that
> will display SOAP message (XML formatted). Some sort
> of debug
> information, just for purpose of demonstration.
>
> Thanks in advance.
> Regards,
> coyote
>
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1
Re: XML dump
Posted by k young <yo...@yahoo.com>.
I had the same problem but with complex return types.
What I ended up doing was extending the
org.apache.soap.rpc.Call class and overloading the
invoke(url, actionURI) method with some code that
captures the soap payload before it was marshalled
into the target object.
Or if you are dealing with the usual supported types
(ie int, double, boolean, and string) you could do:
StringWriter sw = new StringWriter();
response.buildEnvelope().marshall(new PrintWriter(sw),
call.getSOAPMappingRegistry());
String soapBody = sw.toString();
--- Pavlovic Petar <pp...@ptt.yu> wrote:
> I need a little help. I'm fairly new to Java
> and SOAP. I need
> this example for my graduate assigment.
>
> I'm having trouble to find the right classes and
> methods
> for the job.
>
> What I need is u chunk of JAVA code (from
> Apache SOAP toolkit) that
> will display SOAP message (XML formatted). Some sort
> of debug
> information, just for purpose of demonstration.
>
> Thanks in advance.
> Regards,
> coyote
>
__________________________________________________
Do You Yahoo!?
NEW from Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1