[jdom-interest] JDOM Document over SOAP

Frank Cohen fcohen at pushtotest.com
Sun Sep 9 09:53:29 PDT 2001


Most of the SOAP example code uses SOAP's bundled-in marshalling methods to
set the outgoing parameters and values. Unless you're sending something
complicated I found it best to use the Call object and a Vector to set the
parameters.

When SOAP returns a response it gives you a Response object, which is an XML
document.

SAXBuilder responseSAXTree = new SAXBuilder();
Document doc = responseSAXTree.build( response );

will create a JDOM object that you can use to read and manipulate to find
the results of the call.

You may find the SoapObject code in Load, an open-source project I manage,
to be helpful in learning SOAP. Load is at http://www.pushtotest.com.

-Frank

-- 
Frank Cohen, founder, PushToTest, www.pushtotest.com, phone: 408 374 7426
Come to PushToTest for Load, a free open-source tool for performance and
scalability testing and data migration.

> From: Aaron Oathout <aaron at codejunkies.org>
> Date: Sun, 9 Sep 2001 00:34:32 -0500 (CDT)
> To: <mhreynolds at mail.com>
> Cc: <jdom-interest at jdom.org>
> Subject: Re: [jdom-interest] JDOM Document over SOAP
> 
> 
> Look at SAXBuilder's build method. You can build a document from a Reader,
> so if you construct a StringReader from the String you're set.
> 
> Aaron Oathout
> 
> 
> On Sun, 9 Sep 2001 mhreynolds at mail.com wrote:
> 
>> Hello to everyone on the list.
>> 
>> I am trying to encapsulate a JDOM Document within a SOAP client and send it
>> as a parameter to a SOAP server application. Does anyone know the best way to
>> serialize/deserialize a JDOM Document so that it can be used over the wire
>> with SOAP?
>> 
>> I have considered converting the Document to a string (which Apache SOAP
>> supports over the wire) using XMLOutputter.output(Document) but then I
>> couldn't find a way to convert it back to a JDOM Document from the string.
>> 
>> I looked through the archives and found some discussion on JDOM and SOAP, but
>> didn't find anything addressing this specific issue.  Does anyone have any
>> thoughts on this??
>> 
>> Thanks for the help,
>> 
>> Harris Reynolds
>> 
> 
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.
> com




More information about the jdom-interest mailing list