IDL & WSDL

Ivan R. Judson judson at mcs.anl.gov
Thu May 8 15:46:44 CDT 2003


This is pretty cool looking, but definitely not something we need to deal
with before 2.0 is out the door. We could also chat with Keith/Josh about
tools they have experience with --

How's the cert mgmt stuff going?

--Ivan

> -----Original Message-----
> From: owner-ag-dev at mcs.anl.gov 
> [mailto:owner-ag-dev at mcs.anl.gov] On Behalf Of Robert Olson
> Sent: Wednesday, May 07, 2003 10:29 AM
> To: ag-dev at mcs.anl.gov
> Subject: IDL & WSDL
> 
> 
> My curiosity got the best of me and I had to try this.
> 
> The following IDL:
> 
> module AG
> {
>      enum userType { person, node };
>      struct user {
> 	string name;
> 	userType type;
>      };
> 
>      struct entryReturn {
> 	boolean success;
> 	long privateId;
> 	sequence<user> users;
>      };
> 
>      interface VenueServer
>      {
> 	entryReturn Enter(in string profile);
>      };
> };
> 	
> translates to the WSDL at the end of this message.
> 
> I find the IDL formulation of that made-up interface quite 
> readable and 
> reasonably self-documenting.
> 
> --bob
> 
> <?xml version="1.0"?>
> 
> <!-- root element definitions defines set of related services -->
> 
> <definitions name="vc.wsdl"
>      targetNamespace="vc"
>      xmlns:wsdlns   ="vc"
>      xmlns:typens   ="vc"
>      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>      xmlns:xsd      ="http://www.w3.org/2001/XMLSchema"
>      xmlns          ="http://schemas.xmlsoap.org/wsdl/"
>  >
> <!-- types encapsulates schema types; here using xsd --> <types>
> <!-- all type declarations are in a chunk of xsd -->
> <schema targetNamespace="vc"
>      xmlns              ="http://www.w3.org/2001/XMLSchema"
>      elementFormDefault = "qualified"
>      xmlns:xsd          ="http://www.w3.org/2001/XMLSchema"
>      xmlns:soap         ="http://schemas.xmlsoap.org/wsdl/soap/"
>      xmlns:soapenc      ="http://schemas.xmlsoap.org/soap/encoding/"
>       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>  >
> 
> <!-- define enum AG_userType-->
> 
> <xsd:simpleType name="AG_userType">
> <xsd:restriction base="xsd:string">
>     <xsd:enumeration value ="person" />
>     <xsd:enumeration value ="node" />
> </xsd:restriction>
> </xsd:simpleType>
> 
> 
> <!-- define struct AG_user-->
> 
> <complexType name="AG_user">
> <xsd:sequence>
>     <xsd:element name="name" minOccurs="1" maxOccurs="1" 
> type="xsd:string" />
>     <xsd:element name="type" minOccurs="1" maxOccurs="1" 
> type="typens:AG_userType" />
> </xsd:sequence>
> </complexType>
> 
> 
> <!-- define struct AG_entryReturn-->
> 
> <complexType name="AG_entryReturn">
> <xsd:sequence>
>     <xsd:element name="success" minOccurs="1" maxOccurs="1" 
> type="xsd:boolean" />
>     <xsd:element name="privateId" minOccurs="1" maxOccurs="1" 
> type="xsd:long" />
>     <xsd:element name="users" minOccurs="1" maxOccurs="1" 
> type="typens:SequenceOf_AG_user" />
> </xsd:sequence>
> </complexType>
> 
> 
> 
> <complexType name="SequenceOf_AG_user">
>    <xsd:complexContent>
>      <xsd:restriction base="soapenc:Array">
>        <xsd:sequence>
>          <xsd:element type="typens:AG_user" name="item" 
> minOccurs="0"/>
>        </xsd:sequence>
>        <xsd:attribute ref="soapenc:arrayType" 
> wsdl:arrayType="typens:AG_user[]"/>
>      </xsd:restriction>
>    </xsd:complexContent>
> </complexType>
> 
> </schema>
> 
> </types>
> 
> 
> 
> <!-- define operation: AG_VenueServer_Enter-->
> <message name="AG_VenueServer_EnterRequest" >
>     <part name="profile" type="xsd:string" />
> </message>
> 
> <message name="AG_VenueServer_EnterResponse" >
>     <part name="return" type="typens:AG_entryReturn" /> </message>
> 
> 
> <portType name="AG_VenueServerPortType">
> 
>    <operation name="AG_VenueServer_Enter">
>      <input message="wsdlns:AG_VenueServer_EnterRequest" />
>      <output message="wsdlns:AG_VenueServer_EnterResponse" />
>    </operation>
> 
> </portType>
> 
> 
> 
> <binding  name="AG_VenueServerBinding"  
> type="wsdlns:AG_VenueServerPortType">
> 
>    <soap:binding  style="rpc" 
> transport="http://schemas.xmlsoap.org/soap/http" />
> 
>    <operation name="AG_VenueServer_Enter" >
>     <soap:operation soapAction="AG_VenueServer_Enter" />
>     <input>
>       <soap:body use="encoded" namespace="vc" 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>     </input>
>     <output>
>       <soap:body use="encoded" namespace="vc" 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>     </output>
>     <fault>
>       <soap:body use="encoded" namespace="vc" 
> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
>     </fault>
>    </operation>
> 
> </binding>
> 
> 
> 
> 
> <service  name="AG_VenueServerService" >
>   <port name="AG_VenueServerPort" 
> binding="wsdlns:AG_VenueServerBinding" >
>       <soap:address location="foo" />
>   </port>
> </service>
> 
> 
> </definitions> 
> 




More information about the ag-dev mailing list