Hey Jim ----- Original Message ----- From: "Brain, Jim" <[EMAIL PROTECTED]> > I am ready for SOAP for my stuff. > > Herein lies a problem: > > The XML I am working with is more document based than RPC based, but I need > to send it in a RPC manner (request, reply). What I wanted to do is: > > <soap> > ... > <body> > insert my XML here, with my namespace > </body> > </soap> > > So, I checked out JAXM, since it uses dom4j, and I thought that was the > focus of Dom4j. > > Problem, there is no API that says "Build SOAP body with the XML string." I > can add a text node, or a element node, and it looks like if I spit out my > XML string as a DOM, I can include it, but I already have it as text. > > Anyone else have an idea? Am I just missing an API that does what I need? > > If nothing surfaces, does someone have a SOAP implementation written with > dom4j they'd be willing to share?
Actually the JAXM reference implementation is a SOAP implementation written with dom4j that we can all share ;-) If you already have the SOAP request as text you can do something like this - using the JAXM API... Source source = new StreamSource( "mySoapRequest.xml" ); SOAPMessage message = new SOAPMessage(); SOAPPart soapPart = message.getSOAPPart(); soapPart.setContent( source ); Where the first line is using JAXP (javax.xml.transform.Source) to create the XML SOAP message source. The first line could be like this if you had access to the text of the soap request... String myText = ...; Source source = new StreamSource( new StringReader( myText ) ); Does that help? James _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user
