Topic
7 replies Latest Post - ‏2012-12-03T11:28:37Z by SystemAdmin
alexge
alexge
1 Post
ACCEPTED ANSWER

Pinned topic UnsupportedEncodingException: "utf-8" when using web service thin client an

‏2008-04-21T10:02:59Z |
Hi, every one, I'm using Sun application server and IBM websphere thin client, when my client application(using websphere thin client V6.1) try to invoke a deployed simple hello world web service, I got following exception:

Place 1a
17/04/2008 10:19:22 com.ibm.ws.ssl.config.SSLConfigManager
INFO: ssl.disable.url.hostname.verification.CWPKI0027I
Place 1b
Place 1c
javax.xml.ws.WebServiceException: javax.xml.stream.XMLStreamException: java.io.UnsupportedEncodingException: "utf-8"
at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:180)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:79)
at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:134)
at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:587)
at org.apache.axis2.jaxws.core.controller.AxisInvocationController.doInvoke(AxisInvocationController.java:111)
at org.apache.axis2.jaxws.core.controller.InvocationController.invoke(InvocationController.java:110)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:275)
at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:147)
at $Proxy7.sayHello(Unknown Source)
at asb.client.Main.main(Main.java:12)
Caused by: javax.xml.stream.XMLStreamException: java.io.UnsupportedEncodingException: "utf-8"
at com.ibm.xml.xlxp.api.stax.msg.StAXMessageProvider.throwXMLStreamException(StAXMessageProvider.java:63)
at com.ibm.xml.xlxp.api.stax.XMLStreamReaderImpl.setDocumentEntity(XMLStreamReaderImpl.java:313)
at com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:993)
at com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl.createXMLStreamReaderInternal(XMLInputFactoryImpl.java:1115)
at com.ibm.xml.xlxp.api.stax.XMLInputFactoryImpl.createXMLStreamReader(XMLInputFactoryImpl.java:1182)
at org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:159)
at org.apache.axis2.builder.SOAPBuilder.processDocument(SOAPBuilder.java:49)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:146)
at org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUtils.java:86)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:373)
at org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:299)
at org.apache.axis2.jaxws.core.controller.AxisInvocationController.execute(AxisInvocationController.java:582)
... 6 more
Caused by: java.io.UnsupportedEncodingException: "utf-8"
at sun.io.Converters.getConverterClass(Converters.java:306)
at sun.io.Converters.newConverter(Converters.java:339)
at sun.io.ByteToCharConverter.getConverter(ByteToCharConverter.java:113)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:290)
at sun.nio.cs.StreamDecoder$ConverterSD.<init>(StreamDecoder.java:276)
at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:138)
at java.io.InputStreamReader.<init>(InputStreamReader.java:125)
at com.ibm.xml.xlxp.api.util.encoding.PlatformEncodingSupport.loadFromByteStream(PlatformEncodingSupport.java:56)

From respone, I think this exeception is caused by a double quote placed in encoding in soap response like following:

text/xml; charset="utf-8"

It seems WAS V5.1 has such problem but was fixed, does some one have same problem and is there a solution for this?
Updated on 2012-12-03T11:28:37Z at 2012-12-03T11:28:37Z by SystemAdmin