Re: encoding problem
| Newsgroups | gmane.comp.apache.webservices.wsif.user |
|---|---|
| Message-ID | <OFE7B4E83B.E0CF4F4A-ON0525707E.00589358-0525707E.00589361@assist.com.co> |
Hello Alek, can you please tell me if there is any way to deal with encodings in WSIF, I’m using too much WSIF but I’m having problems with different encodings than "UTF-8" How can I set in the request a header like this: <?xml version="1.0" encoding="ISO-8859-1"?> It is possible to set a different encoding in wsif than the one declared in the header for the content of a response? Thank you ___________________________________ Juan David Pérez Assist -----Juan David Perez Echeverri/assist wrote: ----- To: [email protected] From: Juan David Perez Echeverri/assist Date: 09/13/2005 06:54PM Subject: encoding problem 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