[jdom-interest] Qualified names with SAXBuilder.build(Reader reader).....

bob mcwhirter bob at werken.com
Sat Jul 27 07:39:17 PDT 2002


<SOAP-ENV:env xmlns:SOAP-ENV="http:/.../">

The xmlns:SOAP-ENV attribute binds the prefix to the URI.

	-bob


On Sat, 27 Jul 2002, Sanjay Gupta wrote:

> >>> bob mcwhirter <bob at werken.com> 7/27/2002 6:28:40 PM >>>
> On Sat, 27 Jul 2002, Sanjay Gupta wrote:
> 
> > SOAP-ENV is defined at "http://schemas.xmlsoap.org/soap/envelope/"
> 
> >>Yes, but where in -your- document do you bind the two?
> 
> Bob, 
> I guess, my problem is how to bind this in my document. I get the
> exception in processing stage itself. My XML response is from a soap
> envelope which contains elements of type org.w3c.dom.Element which
> requires conversion to org.jdom.Element. To make my self more clear,
> here is the code snippet:-
> 
>             Message soapMessage = new Message();
>             soapMessage.setSOAPTransport(m_shConnection);              
>    
>             soapMessage.send(url, "", sendEnv);
>             
>             Envelope responseEnv = soapMessage.receiveEnvelope();
>             Body responseBody = responseEnv.getBody();
>             element = (org.w3c.dom.Element)
> responseBody.getBodyEntries().firstElement();
>             
>             Reader reader = new StringReader(element.toString());
>             SAXBuilder saxBuilder = new SAXBuilder();
>             org.jdom.Document document = saxBuilder.build(reader);
> ------>
> (I get exception here).
> 
> Regards,
> Sanjay
> 

--
Bob McWhirter        bob at werken.com
The Werken Company   http://werken.com/




More information about the jdom-interest mailing list