Just a thought - maybe one day in the future the JAXM reference
implementation could expose the dom4j DocumentFactory it uses, so that dom4j
users who know they are using the JAXM RI could use dom4j to create the SOAP
message, then just cast it to a JAXM SOAPEnvelope. If its not an instanceof
SOAPEnvelope then it could be piped in using the JAXP Source interface
(org.dom4j.io.DocumentSource) via the SOAPPart.setContent() method instead..

This wouldn't affect the JAXM API at all but would offer a nice little hook
for dom4j users to pass in their documents to JAXM.

James
----- Original Message -----
From: "Brain, Jim" <[EMAIL PROTECTED]>
To: "DOM4J Mailing List (E-mail)" <[EMAIL PROTECTED]>
Sent: Monday, November 26, 2001 5:26 PM
Subject: RE: [dom4j-user] A little off topic, but maybe not:


> Just a  quick followup:
>
> Dom4j suffers from it's own ease of use.
>
> On a couple folks suggestion, instead of rolling my own SOAP wrapper,
> dloaded JAXM and gave it a whirl.  I got the code to work, but...
>
> Currently, as I discussed with James, JAXM doesn't have a way to set a
> "body" or "header" with a Dom4J or w3c element.  You either need to build
> the whole SOAP content yourself, Envelope and all, or build the message
via
> JAXM.  I hope it will include this feature at some point, and I plan to
send
> a request to JAXM to this effect.
>
> In any case, after getting JAXM to work, I went back and rewrote the SOAP
> wrapper to be straight dom4j.  Why?:
>
> * Less code.  In effect, I was only using the transport part of JAXM
anyway,
> and I just don't need all the profiles and such.
> * Easy to get things going with dom4j.  Need I say more.
> * Server implementation of jaxm leave a bit to be desired (hitting the
> servlet with GET just produces an error.  I know it won't do the work on
> GET, but a nice message to that effect, or a WSDL or description of the
> service would be nice.
> * JAXM is in prerelease (beta/alpha), dom4j is released and in 1.1.
> * Ability to have Get request do something useful in servlet, or use JSP
if
> you want.
>
> I think JAXM is the long term solution, but it needs to get a bit easier
to
> use it, and handle GETs better.
>
> Jim
>
>
> Jim Brain, [EMAIL PROTECTED]
> "Researching tomorrow's decisions today."
> (319) 369-2070 (work)
> SYSTEMS ARCHITECT, INDIVIDUAL ITS, LIFE INVESTORS INSURANCE COMPANY OF
> AMERICA
>
>  -----Original Message-----
> From: James Strachan [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, November 21, 2001 12:24 PM
> To: Brain, Jim; DOM4J Mailing List (E-mail)
> Subject: Re: [dom4j-user] A little off topic, but maybe not:
>
> 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
>


_________________________________________________________
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

Reply via email to