W3C home > Mailing lists > Public > public-ws-desc-state@w3.org > October 2003

Sample getter/setter take 2

From: Roberto Chinnici <Roberto.Chinnici@Sun.COM>
Date: Mon, 06 Oct 2003 10:55:01 -0700
To: public-ws-desc-state@w3.org
Message-id: <3F81AC75.8030907@sun.com>


// 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:55 UTC