0 Replies Latest reply on Apr 12, 2012 12:27 PM by rhpt

    Content Type UnsupportedEncodingException

    rhpt

      When I attempt to consume a webservice running on JBoss 4.0.2, it returns the following error

       

      org.apache.axis2.AxisFault: java.io.UnsupportedEncodingException: utf-8,text/xml

          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)

          at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:83)

          at org.apache.axis2.transport.http.CommonsHTTPTransportSender.sendUsingOutputStream(CommonsHTTPTransportSender.java:330)

          at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:213)

          at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:530)

          at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:414)

          at org.apache.axis2.transport.http.AxisServlet.processAxisFault(AxisServlet.java:377)

          at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:165)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

          at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

          ...

      Caused by: javax.xml.stream.XMLStreamException: java.io.UnsupportedEncodingException: utf-8,text/xml

          at com.ctc.wstx.stax.WstxOutputFactory.createSW(WstxOutputFactory.java:257)

          at com.ctc.wstx.stax.WstxOutputFactory.createXMLStreamWriter(WstxOutputFactory.java:124)

          at org.apache.axiom.om.util.StAXUtils$5.run(StAXUtils.java:252)

          at java.security.AccessController.doPrivileged(Native Method)

          at org.apache.axiom.om.util.StAXUtils.createXMLStreamWriter(StAXUtils.java:248)

          at org.apache.axiom.om.impl.MTOMXMLStreamWriter.<init>(MTOMXMLStreamWriter.java:94)

          at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:470)

          at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)

          ... 30 more

      Caused by: java.io.UnsupportedEncodingException: utf-8,text/xml

          at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:42)

          at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:83)

          at com.ctc.wstx.stax.WstxOutputFactory.createSW(WstxOutputFactory.java:253)

       

      Searching around, it seems to be an issue with JAX-WS.  Here are a couple of bug reports that support this conclusion

      http://java.net/jira/browse/JAX_WS-793

      http://java.net/jira/browse/WSIT-285

       

      Is there a workaround to this issue with JBoss, or does it require a different version of JAX-WS? I am not familiar at all with JBoss, so I don't know if I could just swap out the JAR with a newer version.