[jdom-interest] SOAPPart.setContent from jdom source

Koller, Shmuel Shmuel_Koller at bmc.com
Wed Feb 25 03:36:46 PST 2004


Trying to simplfy the help I need :
Given you have a populated SOAP envelope as JDOM Document -
have you succeded to load it into SAAJ message SOAPPart using
SOAPPart.setcontent(jdom-whatever)

If you have some JAXM server code or JAXM client code that buids the SOAP
Envelope using JDOM -
I need the code to put that jdom stuff inside the SAAJ SOAPPart.

This works from me only if I pass the JDOM tree via a transformation to
org.w3c.dom.
Also - it works for me the other way , from SAAJ SOAPPart directly into JDOM
document. 

I just miss building SOAPPart  from JDOM source,
Shmuel 

-----Original Message-----
From: Koller, Shmuel [mailto:Shmuel_Koller at bmc.com]
Sent: Wednesday, February 25, 2004 2:42 AM
To: jdom-interest at jdom.org
Subject: [jdom-interest] SOAPPart.setContent from jdom source


I have a SpmlDoc jdom document, whose content is this XML:


<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><add
Response xmlns="urn:oasis:names:tc:SPML:1:0"><msg0>We are still in
com.bmc.spmlgtw.Chained1</msg0><msg1>We are still in
com.bmc.spmlgtw.Chained2</msg1><msg2>We are still in
com.bmc.spmlgtw.Chained3</msg2></addResponse></soapenv:Body></soapenv:Envelo
pe>

The code below works in putting SpmlDoc in a SOAPPart of SOAPMessage.

 DOMOutputter domout = new DOMOutputter();
 org.w3c.dom.Document domdoc = domout.output(SpmlDoc);
 DOMSource source = new DOMSource(domdoc.getDocumentElement());
 sm.getSOAPPart().setContent(source);

However I am looking for DOM-less code.
I tried this jdom-only  code but it does not work, I mean I get an empty
Body.

Element jenvelope   = SpmlDoc.getRootElement();
JDOMSource source = new JDOMSource(jenvelope); /* I tried also
JDOMSource(SpmlDoc) */
sm.getSOAPPart().setContent(source);

I will like a JDOM only code to load the SOAPMessage sm,

thanks, Shmuel 
_______________________________________________
To control your jdom-interest membership:
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhos
t.com



More information about the jdom-interest mailing list