NonStop SOAP User's Manual
Using NonStop SOAP with a TS/MP Application and
NonStop Processes
NonStop SOAP User’s Manual—520501-012
6-43
Controlling the Output Encoding
•
To specify that all responses from a service should have a particular encoding, you
specify the encoding as the value of the RspEncoding attribute in the definition of
the service in the SDL file.
•
To specify that the response to a particular request should have a particular
encoding, you use the Encoding element in the NonStop SOAP header, as
described in Exposing a Subset of DDL as a Web Service on page 4-18.
If you specify an output encoding for a service or a request, when the target TS/MP
service sends a response to the SOAP server, the server converts the data into the
encoding you specified.
An encoding that you specify in the NonStop SOAP header takes precedence over an
encoding you specify in the SDL file.
If you do not specify an output encoding in the header or the SDL file, the response
has the same encoding as the request message.
A request or response message with an encoding other than UTF-8 has an XML
declaration node (<?xml version="1.0" encoding="encoding-name"?> ) as the first
node in the SOAP/XML document.
The sample SOAP request file generated for each TS/MP service by the SOAP Admin
tool assumes UTF-8 encoding and does not have a XML declaration node.
Example 7: Controlling the Output Encoding
These are two possible requests for the Bookdata service defined in Example 2:
Multiple Services, Transaction Support on page 6-10. The service has ISO-8859-2
specified as its default output encoding.