Example: Representing internationalization context in a SOAP header

This code example illustrates how internationalization context is represented within the SOAP header of a Web service request.

<InternationalizationContext>
   <Locales>
      <Locale>
         <LanguageCode>ja</LanguageCode>
         <CountryCode>JP</CountryCode>
         <VariantCode>Nihonbushi</VariantCode>
      </Locale>
      <Locale>
         <LanguageCode>fr</LanguageCode>
         <CountryCode>FR</CountryCode>
      </Locale>
      <Locale>
         <LanguageCode>en</LanguageCode>
         <CountryCode>US</CountryCode>
      </Locale>
   </Locales>
   <TimeZoneID>JST</TimeZoneID>
</InternationalizationContext>
This representation is valid against the following schema:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:element name="InternationalizationContext" 
                 type="InternationalizationContextType"> 
    </xsd:element>

    <xsd:complexType name="InternationalizationContextType">
        <xsd:sequence> 
            <xsd:element name="Locales" 
                         type="LocalesType">
            </xsd:element>
            <xsd:element name="TimeZoneID" 
                         type="xsd:string">
            </xsd:element>
        </xsd:sequence> 
    </xsd:complexType>

    <xsd:complexType name="LocalesType">
        <xsd:sequence> 
            <xsd:element name="Locale" 
                         type="LocaleType" 
                         minOccurs="0" 
                         maxOccurs="unbounded"> 
            </xsd:element>
        </xsd:sequence> 
    </xsd:complexType>

    <xsd:complexType name="LocaleType"> 
        <xsd:sequence> 
            <xsd:element name="LanguageCode" 
                         type="xsd:string" 
                         minOccurs="0" 
                         maxOccurs="1"> 
            </xsd:element> 
            <xsd:element name="CountryCode" 
                         type="xsd:string" 
                         minOccurs="0" 
                         maxOccurs="1"> 
            </xsd:element>
            <xsd:element name="VariantCode" 
                         type="xsd:string" 
                         minOccurs="0" 
                         maxOccurs="1"> 
            </xsd:element>
         </xsd:sequence>
    </xsd:complexType>
    
</xsd:schema>



Related concepts
Internationalization context: Propagation and scope
Internationalization context
Related tasks
Using the internationalization context API
Reference topic Reference topic    

Terms and conditions for information centers | Feedback

Last updatedLast updated: Aug 31, 2013 1:23:07 AM CDT
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=pix&product=was-nd-dist&topic=xin_soapheader
File name: xin_soapheader.html