xml-soap-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pavel Ausianik <Pavel_Ausia...@epam.com>
Subject RE: Extra line appearing in Apache Response
Date Thu, 03 Oct 2002 09:27:26 GMT
Scott,

I have parsed SOAP XML document produced by Apache SOAP toolkit with Xerces
samples DocumentTracer.  All newlines appears as characters, not ignorable
white space (see below).

The Sun's class caused incompatibility is
com.sun.xml.messaging.soap.dom4j.BodyElementFactory.class . The code on the
server, which leads to the problem looks like

        msg = MessageFactory.createMessage ();
        SOAPPart soapPart = msg.getSOAPPart ();
        SOAPEnvelope envelope = soapPart.getEnvelope ();  // The problem
appears here
        SOAPBody body = envelope.getBody ();

The most describing text for exception looks like 

java.lang.Exception: Unable to create envelope from given source: Error on
line 3 of document  : Text nodes can't be immediate children of SOAP Body
Nested exception: Text nodes can't be immediate children of SOAP Body

Best regards,
Pavel


setDocumentLocator(locator=org.apache.xerces.parsers.AbstractSAXParser$Locat
orProxy@5b7986)
startDocument()
 startPrefixMapping(prefix="xsi",uri="xsi")
 startPrefixMapping(prefix="xsd",uri="http://www.w3.org/2001/XMLSchema")
 
startPrefixMapping(prefix="SOAP-ENV",uri="http://schemas.xmlsoap.org/soap/en
velope/")
 
startElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Enve
lope",qname="SOAP-ENV:Envelope",attributes={})
  characters(text="\n")
 
startElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Body
",qname="SOAP-ENV:Body",attributes={})
   characters(text="\n")
 
startPrefixMapping(prefix="ns1",uri="urn:xxx-com:document:xxx:rfc:functions"
)
 
startElement(uri="urn:xxx:com:document:xxx:rfc:functions",localName="CMW_PIF
_QLOGON",qname="ns1:CMW_PIF_QLOGON",attributes={{uri="http://schemas.xmlsoap
.org/soap/envelope/",localName="encodingStyle",qname="SOAP-ENV:encodingStyle
",type="CDATA",value="http://schemas.xmlsoap.org/soap/encoding/"}})
    characters(text="\n")
 
startPrefixMapping(prefix="ns2",uri="http://www.w3.org/2001/XMLSchema-instan
ce")
 
startElement(uri="",localName="MODE",qname="MODE",attributes={{uri="http://w
ww.w3.org/2001/XMLSchema-instance",localName="type",qname="ns2:type",type="C
DATA",value="xsd:int"}})
     characters(text="2")
    endElement(uri="",localName="MODE",qname="MODE")
    endPrefixMapping(prefix="ns2")
    characters(text="\n")
 
startPrefixMapping(prefix="ns3",uri="http://www.w3.org/2001/XMLSchema-instan
ce")
 
startElement(uri="",localName="QNAME",qname="QNAME",attributes={{uri="http:/
/www.w3.org/2001/XMLSchema-instance",localName="type",qname="ns3:type",type=
"CDATA",value="xsd:string"}})
     characters(text="CMW_PIF_PROTOCOL_QUEUE_IN")
    endElement(uri="",localName="QNAME",qname="QNAME")
    endPrefixMapping(prefix="ns3")
    characters(text="\n")
 
startPrefixMapping(prefix="ns4",uri="http://www.w3.org/2001/XMLSchema-instan
ce")
 
startElement(uri="",localName="SITETYPE",qname="SITETYPE",attributes={{uri="
http://www.w3.org/2001/XMLSchema-instance",localName="type",qname="ns4:type"
,type="CDATA",value="xsd:string"}})
     characters(text="GWA_01")
    endElement(uri="",localName="SITETYPE",qname="SITETYPE")
    endPrefixMapping(prefix="ns4")
    characters(text="\n")
 
endElement(uri="urn:xxx-com:document:xxx:rfc:functions",localName="CMW_PIF_Q
LOGON",qname="ns1:CMW_PIF_QLOGON")
   endPrefixMapping(prefix="ns1")
   characters(text="\n")
 
endElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Body",
qname="SOAP-ENV:Body")
  characters(text="\n")
 
endElement(uri="http://schemas.xmlsoap.org/soap/envelope/",localName="Envelo
pe",qname="SOAP-ENV:Envelope")
 endPrefixMapping(prefix="SOAP-ENV")
 endPrefixMapping(prefix="xsd")
 endPrefixMapping(prefix="xsi")
endDocument()



> -----Original Message-----
> From: Scott Nichol [mailto:snicholnews@scottnichol.com]
> Sent: Wednesday, October 02, 2002 8:10 PM
> To: soap-dev@xml.apache.org
> Subject: Re: Extra line appearing in Apache Response
> 
> 
> I will have to look into Sun's implementation further.
> 
> In reviewing the interop tests for Apache SOAP clients
> (http://www.apache.org/~rubys/ApacheClientInterop.html), I see that
> Apache SOAP works successfully with the server Sun supplies 
> for interop
> testing.  Further, while some implementations eschew line separation
> (e.g. ASP.NET, Sun), many others use it.  Given this, it's 
> hard to view
> the use of line separators in Apache SOAP as an interop 
> issue.  I do see
> it as a performance issue, as they make the payload heavier and have
> some non-zero CPU cost as well.
> 
> Scott Nichol

--
To unsubscribe, e-mail:   <mailto:soap-dev-unsubscribe@xml.apache.org>
For additional commands, e-mail: <mailto:soap-dev-help@xml.apache.org>


Mime
View raw message