[
https://issues.apache.org/jira/browse/AXIS2-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12508103
]
Chris Jones commented on AXIS2-2718:
------------------------------------
I downloaded the 25-Jun-07 nightly build, and this still seems to be an issue.
The problem is when an service returns a response that does not use a prefix
within the soap body.
The problem is related to the SAAJ implementation in Axis2 only, as the same
service will work when not using the Axis2 SAAJ classes (i.e. AXIOM only). It
also works fine when using the Sun SAAJ implementation.
Example response which will cause the failure...
<?xml version='1.0' encoding='UTF-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing">
<soapenv:Header>
</soapenv:Header>
<soapenv:Body>
<getCurrencyDescriptionResponse
xmlns="http://schemas.xyz.net/CurrencyService/getCurrencyDescription">
<currency>
<Description>USA Dollar</Description>
</currency>
</getCurrencyDescriptionResponse>
</soapenv:Body>
</soapenv:Envelope>
> Empty namespace causes INVALID_CHARACTER_ERR Exception
> ------------------------------------------------------
>
> Key: AXIS2-2718
> URL: https://issues.apache.org/jira/browse/AXIS2-2718
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: client-api
> Affects Versions: 1.2
> Environment: Windows XP, IBM JDK
> Reporter: Vasyl Zhabko
> Assignee: sumedha rubasinghe
> Fix For: nightly
>
>
> Server implementation is .NET, SOAP protocol 1.1. Response sent is (actual
> server response):
> HTTP/1.1 200 OK
> Content-Type: text/xml; charset=utf-8
> Content-Length:
> <?xml version="1.0" encoding="utf-8"?>
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <Insert xmlns="https://localhost">
> <InsertResult>int</InsertResult>
> <ResponseMsg>string</ResponseMsg>
> <ResponseText>string</ResponseText>
> </Insert>
> </soap:Body>
> </soap:Envelope>
> Two issues here:
> First: Document header (<?xml version="1.0" encoding="utf-8"?>) raises
> exception:
> Caused by: javax.xml.soap.SOAPException:
> com.ctc.wstx.exc.WstxParsingException: Illegal processing instruction target
> ("xml"); xml (case insensitive) is reserved by the specs.
> at [row,col {unknown-source}]: [2,5]
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:154)
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:117)
> Second: Remove header from response: Exception raised is:
> Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or
> illegal XML character is specified.
> at
> org.apache.axiom.om.impl.dom.DocumentImpl.checkQName(DocumentImpl.java:460)
> at
> org.apache.axiom.om.impl.dom.DocumentImpl.createElementNS(DocumentImpl.java:200)
> at
> org.apache.axis2.saaj.SOAPBodyImpl.addChildElement(SOAPBodyImpl.java:141)
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.toSAAJElement(SOAPConnectionImpl.java:261)
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.getSOAPMessage(SOAPConnectionImpl.java:204)
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.handleSOAPMessage(SOAPConnectionImpl.java:152)
> at
> org.apache.axis2.saaj.SOAPConnectionImpl.call(SOAPConnectionImpl.java:117)
> Fix: build response like this (that I cannot do in production environment) :
> HTTP/1.1 200 OK
> Content-Type: text/xml; charset=utf-8
> Content-Length:
> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> <soap:Body>
> <a:Insert xmlns:a="https://localhost">
> <a:InsertResult>int</a:InsertResult>
> <a:ResponseMsg>string</a:ResponseMsg>
> <a:ResponseText>string</a:ResponseText>
> </a:Insert>
> </soap:Body>
> </soap:Envelope>
> Everything starts working OK.
> I have no control over server responses. I have responded to Axis with custom
> HTTP daemon.
> Similar problem exists when we are building soap request messages by
> providing XML inside input stream (XSLT generated content).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]