Sample getter/setter take 2

// this is the attribute

<xs:schema targetNamespace="Attributes">
   <xs:element name="YYY">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="a" type="xsd:int"/>
         <xs:element name="b" type="xsd:float"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
</xs:schema>

// these are the request and response messages for the getter

<xs:schema targetNamespace="Wrappers"
            xmlns:attrs="Attributes">

   <xs:element name="get_XXX">
   </xs:element>

   <xs:element name="get_XXXResponse">
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="attrs:YYY"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>

   <xs:element name="set_XXX">
     <xs:complexType>
       <xs:sequence>
         <xs:element ref="attrs:XXX"/>
       </xs:sequence>
     </xs:complexType>
   </xs:element>

   <xs:element name="set_XXXResponse">
   </xs:element>
</xs:schema>

// these are the operations

<ws:definitions targetNamespace="MyService">

   <ws:interface name="MyInterface"
            xmlns:wrappers="Wrappers">

     <ws:operation name="get_XXX"
               style="http://www.w3.org/@@@@/@@/wsdl/style/get-attribute"
               pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">
       <ws:input name="in" body="wrappers:get_XXX"/>
       <ws:output name="out" body="wrappers:get_XXXResponse"/>
     </ws:operation>

     <ws:operation name="set_XXX"
               style="http://www.w3.org/@@@@/@@/wsdl/style/set-attribute"
               pattern="http://www.w3.org/@@@@/@@/wsdl/in-out">
       <ws:input name="in" body="wrappers:set_XXX"/>
       <ws:output name="out" body="wrappers:set_XXX"/>
     </ws:operation>

   </ws:interface>
</ws:definitions>

Received on Monday, 6 October 2003 13:53:41 UTC