[ 
http://jira.codehaus.org/browse/XFIRE-536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_117391
 ] 

Marcos Toledo commented on XFIRE-536:
-------------------------------------

Hi folks,

We are using XFire and we've recently run into the same issue with a customer 
sending ISO-8859-1 encoded XMLs through UTF-8 requests.

On version 2.0.6 of wstx we have this issue, and later on we found out that it 
was due to the request being sent  with the charset UTF-8 and encoding 
ISO-8859-1 on the document's encoding declaration.

The latest version, 3.9.0 of wstx doesn't have this problem, but it messes up 
any character being used which is not standard ascii, so it's really no use.

Given the following, I don't think we should support UTF-8 requests being sent 
with a soap document declared as ISO-8859-1. We'll write a handler to validate 
this and inform the web service client.

Given the following, I think this bug can be closed. Or maybe you can add this 
validation into Xfire, rather than have we do it through a handler.

Regards,
Toledo

> java.lang.NullPointerException when xml encoding is specified in SOAP Message
> -----------------------------------------------------------------------------
>
>                 Key: XFIRE-536
>                 URL: http://jira.codehaus.org/browse/XFIRE-536
>             Project: XFire
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.1.1
>            Reporter: Karthikeyan M.
>            Assignee: Dan Diephouse
>            Priority: Minor
>         Attachments: actual.txt, expected.txt
>
>
> If there is an encoding specified in the xml preprocessor element 
> (encoding="ISO-8859-1"), the following exception is generated:
> root cause java.lang.NullPointerException
> com.ctc.wstx.io.ReaderBootstrapper.verifyXmlEncoding(ReaderBootstrapper.java:198)
> com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:143)
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:533)
> com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:521)
> com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:278)
> org.codehaus.xfire.util.STAXUtils.createXMLStreamReader(STAXUtils.java:673)
> org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:271)
> org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:144)
> org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:114)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
> SOAP Message:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <SOAP-ENV:Envelope
>         xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>         xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>         xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";>
>     <SOAP-ENV:Body>
>         <getXXXX xmlns="http://mycompany.com";></getXXXX>
>     </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> The soap message was originally generated by the php nusoap package.
> The ideal behaviour would be:
> a) Try processing the encoding correctly.
> b) If encoding is invalid, throw a specific exception that can be use to 
> handle the error, instead of NPE.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to