You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "sumedha rubasinghe (JIRA)" <ji...@apache.org> on 2007/06/11 08:30:25 UTC

[jira] Commented: (AXIS2-2718) Empty namespace causes INVALID_CHARACTER_ERR Exception

    [ https://issues.apache.org/jira/browse/AXIS2-2718?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503297 ] 

sumedha rubasinghe commented on AXIS2-2718:
-------------------------------------------

Hi,
I tried to re-generate what you have described with latest nightly build. But it is working without any complains. Could you please test this with nightly build & get back?

Thank you.



> 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
>
> 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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org