Character String Encoding |
Top Previous Next |
When SOAP/AM Server copies "string" fields between the SOAP envelope and the server IPM it assumes that the data is stored in the IPM using ISO-8859-1 encoding. The encoding used can be altered on the element, type, or service level using the encoding attribute in the Service Definition File:
The value of the encoding attribute or the -servicedefaultencoding startup option can be any of the value Character Encoding Names.
The encoding can also be altered by the client application during the method call using the SOAP/AM defaultEncoding header. In order to use the header it must first be defined in the Service Definition File. The header is defined as follows:
<method name="myMethod" server="myServer"> <headers> <header name="defaultEncoding" type="defaultEncodingType" namespace="http://soapam.com/types/" direction="in" /> ... other headers ... </headers>
... other method elements ...
</method>
When this header is specified for a method the client application can alter the default encoding for the server IPM request and response by sending the defaultEncoding header. The defaultEndcoding header can specify either the server request encoding, response encoding, or both. The following header instructs SOAP/AM Server to using ISO-8859-7 encoding when executing this method.
<defaultEncoding xmlns="http://soapam.com/types/"> <requestEncoding>ISO-8859-7</requestEncoding> <replyEncoding>ISO-8859-7</replyEncoding> </defaultEncoding>
Note that SOAP/AM Server always uses UTF-8 encoding for the SOAP envelope. |