IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
      
     Home      Products      Services & solutions      Support & downloads      My account     

developerWorks > Sample IT projects >
developerWorks
WebSphere Business Components and Web services architectures

Return to article

Listing 3. Functional interface schema


   <?xml version="1.0"?>
   <xsd:schema
   targetNamespace="http://www.ibm.com/software/components/examples/schemas/WSBCExchangeRate"
   xmlns:xsd="http://www.w3.org/1999/XMLSchema">
     <xsd:annotation>
       <xsd:documentation>
                    WSBC Exchange Rate Schema template.
                    Copyright 2000 IBM. All rights reserved.
       </xsd:documentation>
     </xsd:annotation>
     <xsd:element name="ConvertRequest">
       <xsd:complexType>
         <xsd:element name="ValueToConvert" type="CurrencyValue" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="TargetCurrency" type="CurrencyCode" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="RequestDate" type="DateValue" minOccurs="1" maxOccurs="1"/>
       </xsd:complexType>
     </xsd:element>
     <xsd:element name="ConvertResponse">
       <xsd:complexType>
         <xsd:element name="ConvertedValue" type="CurrencyValue" minOccurs="1" maxOccurs="1"/>
       </xsd:complexType>
     </xsd:element>
     <xsd:element name="SetExchangeRateRequest">
       <xsd:complexType>
         <xsd:element name="StartingDate" type="DateValue" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="EndingDate" type="DateValue" minOccurs="1" maxOccurs="1"/>
         <xsd:element name="ExchangeRate" type="ExchangeRate" minOccurs="1" maxOccurs="unbounded"/> 
       </xsd:complexType>
     </xsd:element>
     <xsd:complexType name="DateValue">
       <xsd:element name="Year" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Month" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Date" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Hours" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Minutes" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Seconds" type="xsd:integer" minOccurs="1" maxOccurs="1"/>
     </xsd:complexType>
     <xsd:complexType name="ExchangeRate">
       <xsd:element name="SourceCurrencyCode" type="CurrencyCode" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="TargetCurrencyCode" type="CurrencyCode" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Value" type="xsd:float" minOccurs="1" maxOccurs="1"/>
     </xsd:complexType>
     <xsd:complexType name="CurrencyValue">
       <xsd:element name="CurrencyCode" type="CurrencyCode" minOccurs="1" maxOccurs="1"/>
       <xsd:element name="Value" type="xsd:float" minOccurs="1" maxOccurs="1"/>
     </xsd:complexType>
     <xsd:simpleType name="CurrencyCode" base="xsd:string"/>
   </xsd:schema>
   

Return to article




developerWorks > Sample IT projects >
developerWorks
  About IBM  |  Privacy  |  Terms of use  |  Contact