encoding problem

[email protected]
Newsgroups gmane.comp.apache.webservices.wsif.user
Message-ID <OFE49EB2C0.D30EAD96-ON0525707B.007DDEEC-0525707B.007DDEF2@assist.com.co>
Hello All,

I have a problem when I try to consume a service that return an object that
uses the charset=ISO-8859-1 in some of fields I get the following error:

AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.userException
 faultString: org.xml.sax.SAXParseException: An invalid XML character
 (Unicode: 0x4) was found in the element content of the document.
 faultActor: null
 faultDetail:
 stackTrace: org.xml.sax.SAXParseException: An invalid XML character
 (Unicode: 0x4) was found in the element content of the document.
 at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
 at javax.xml.parsers.SAXParser.parse(Unknown Source)
 at
 org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:232)

 at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546)
 at org.apache.axis.Message.getSOAPEnvelope(Message.java:377)
 at org.apache.axis.client.Call.invokeEngine(Call.java:2132)
 at org.apache.axis.client.Call.invoke(Call.java:2102)
 at org.apache.axis.client.Call.invoke(Call.java:1851)
 at org.apache.axis.client.Call.invoke(Call.java:1777)
 at
 org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeAXISRPCStyle(WSIFOperation_ApacheAxis.java:1548)

 at
 org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1433)

 at
 org.apache.wsif.providers.soap.apacheaxis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1037)

 at
 ve.com.cantv.common.hera.message.framework.wsif.WSIFInvoker.sendSyncMessage(WSIFInvoker.java:55)

 at
 ve.com.cantv.common.hera.message.framework.wsif.WSIFMessageHandlerSyncImpl.sendSyncMessage(WSIFMessageHandlerSyncImpl.java:50)

 at
 ve.com.cantv.common.hera.message.sync.MessageHandlerSyncManager.sendSyncMessage(MessageHandlerSyncManager.java:68)

 at
 ve.com.cantv.common.hera.message.util.MessageInvokerUtil.executeInvocation(MessageInvokerUtil.java:50)

 at
 ve.com.cantv.ctc.test.SA0030customerCaseDetails.main(SA0030customerCaseDetails.java:40)

If the service do not return any especial characters works just fine.

I used the WS-I monitor and I realized that the request and the response
have the following header:
<?xml version="1.0" encoding="UTF-8"?>

I think that’s where the problem is because the declared encoding is
different that the one used. I asked the services team and they said that
the server will set in the response the same encoding founded in the
request. So I guess I can solve the problem by changing the request content
type, how can I do that in WSIF?
Is there a way to specify the encoding to use for the Deserialization of a
specific object, attribute or request?

Thanks in advance

___________________________________
 Juan David Pérez
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.