diff options
author | pab <devnull@localhost> | 2009-05-10 01:01:41 +0000 |
---|---|---|
committer | pab <devnull@localhost> | 2009-05-10 01:01:41 +0000 |
commit | 0e9be4e2a9960c2cab6e22be8dc96045f6a5a017 (patch) | |
tree | 9fc1fad485d10e1e6447538d4f96fdc823771ce6 /examples/dictionary | |
parent | ba557511b0c5315a01c0e724138e3a4f032baaa6 (diff) |
Add in examples, still in work
Diffstat (limited to 'examples/dictionary')
-rw-r--r-- | examples/dictionary/dictservice.wsdl | 824 | ||||
-rw-r--r-- | examples/dictionary/gensvcbind.py | 27 | ||||
-rw-r--r-- | examples/dictionary/w3.py | 38 |
3 files changed, 889 insertions, 0 deletions
diff --git a/examples/dictionary/dictservice.wsdl b/examples/dictionary/dictservice.wsdl new file mode 100644 index 0000000..0e567b6 --- /dev/null +++ b/examples/dictionary/dictservice.wsdl @@ -0,0 +1,824 @@ +<?xml version="1.0" encoding="utf-8"?>
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://services.aonaware.com/webservices/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://services.aonaware.com/webservices/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Word Dictionary Web Service</wsdl:documentation>
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://services.aonaware.com/webservices/">
+ <s:element name="ServerInfo">
+ <s:complexType />
+ </s:element>
+ <s:element name="ServerInfoResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="ServerInfoResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DictionaryList">
+ <s:complexType />
+ </s:element>
+ <s:element name="DictionaryListResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DictionaryListResult" type="tns:ArrayOfDictionary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfDictionary">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Dictionary" nillable="true" type="tns:Dictionary" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Dictionary">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Id" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Name" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="DictionaryListExtended">
+ <s:complexType />
+ </s:element>
+ <s:element name="DictionaryListExtendedResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DictionaryListExtendedResult" type="tns:ArrayOfDictionary" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DictionaryInfo">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="dictId" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DictionaryInfoResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DictionaryInfoResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="Define">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="word" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DefineResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DefineResult" type="tns:WordDefinition" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="WordDefinition">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Word" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Definitions" type="tns:ArrayOfDefinition" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="ArrayOfDefinition">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Definition" nillable="true" type="tns:Definition" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Definition">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Word" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Dictionary" type="tns:Dictionary" />
+ <s:element minOccurs="0" maxOccurs="1" name="WordDefinition" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="DefineInDict">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="dictId" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="word" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="DefineInDictResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DefineInDictResult" type="tns:WordDefinition" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="StrategyList">
+ <s:complexType />
+ </s:element>
+ <s:element name="StrategyListResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="StrategyListResult" type="tns:ArrayOfStrategy" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfStrategy">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="Strategy" nillable="true" type="tns:Strategy" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Strategy">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="Id" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Description" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="Match">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="word" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="strategy" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="MatchResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="MatchResult" type="tns:ArrayOfDictionaryWord" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfDictionaryWord">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded" name="DictionaryWord" nillable="true" type="tns:DictionaryWord" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="DictionaryWord">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="DictionaryId" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Word" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="MatchInDict">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="dictId" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="word" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="strategy" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="MatchInDictResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="MatchInDictResult" type="tns:ArrayOfDictionaryWord" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="string" nillable="true" type="s:string" />
+ <s:element name="ArrayOfDictionary" nillable="true" type="tns:ArrayOfDictionary" />
+ <s:element name="WordDefinition" nillable="true" type="tns:WordDefinition" />
+ <s:element name="ArrayOfStrategy" nillable="true" type="tns:ArrayOfStrategy" />
+ <s:element name="ArrayOfDictionaryWord" nillable="true" type="tns:ArrayOfDictionaryWord" />
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="ServerInfoSoapIn">
+ <wsdl:part name="parameters" element="tns:ServerInfo" />
+ </wsdl:message>
+ <wsdl:message name="ServerInfoSoapOut">
+ <wsdl:part name="parameters" element="tns:ServerInfoResponse" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListSoapIn">
+ <wsdl:part name="parameters" element="tns:DictionaryList" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListSoapOut">
+ <wsdl:part name="parameters" element="tns:DictionaryListResponse" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListExtendedSoapIn">
+ <wsdl:part name="parameters" element="tns:DictionaryListExtended" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListExtendedSoapOut">
+ <wsdl:part name="parameters" element="tns:DictionaryListExtendedResponse" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoSoapIn">
+ <wsdl:part name="parameters" element="tns:DictionaryInfo" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoSoapOut">
+ <wsdl:part name="parameters" element="tns:DictionaryInfoResponse" />
+ </wsdl:message>
+ <wsdl:message name="DefineSoapIn">
+ <wsdl:part name="parameters" element="tns:Define" />
+ </wsdl:message>
+ <wsdl:message name="DefineSoapOut">
+ <wsdl:part name="parameters" element="tns:DefineResponse" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictSoapIn">
+ <wsdl:part name="parameters" element="tns:DefineInDict" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictSoapOut">
+ <wsdl:part name="parameters" element="tns:DefineInDictResponse" />
+ </wsdl:message>
+ <wsdl:message name="StrategyListSoapIn">
+ <wsdl:part name="parameters" element="tns:StrategyList" />
+ </wsdl:message>
+ <wsdl:message name="StrategyListSoapOut">
+ <wsdl:part name="parameters" element="tns:StrategyListResponse" />
+ </wsdl:message>
+ <wsdl:message name="MatchSoapIn">
+ <wsdl:part name="parameters" element="tns:Match" />
+ </wsdl:message>
+ <wsdl:message name="MatchSoapOut">
+ <wsdl:part name="parameters" element="tns:MatchResponse" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictSoapIn">
+ <wsdl:part name="parameters" element="tns:MatchInDict" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictSoapOut">
+ <wsdl:part name="parameters" element="tns:MatchInDictResponse" />
+ </wsdl:message>
+ <wsdl:message name="ServerInfoHttpGetIn" />
+ <wsdl:message name="ServerInfoHttpGetOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListHttpGetIn" />
+ <wsdl:message name="DictionaryListHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionary" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListExtendedHttpGetIn" />
+ <wsdl:message name="DictionaryListExtendedHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionary" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoHttpGetIn">
+ <wsdl:part name="dictId" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoHttpGetOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineHttpGetIn">
+ <wsdl:part name="word" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineHttpGetOut">
+ <wsdl:part name="Body" element="tns:WordDefinition" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictHttpGetIn">
+ <wsdl:part name="dictId" type="s:string" />
+ <wsdl:part name="word" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictHttpGetOut">
+ <wsdl:part name="Body" element="tns:WordDefinition" />
+ </wsdl:message>
+ <wsdl:message name="StrategyListHttpGetIn" />
+ <wsdl:message name="StrategyListHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfStrategy" />
+ </wsdl:message>
+ <wsdl:message name="MatchHttpGetIn">
+ <wsdl:part name="word" type="s:string" />
+ <wsdl:part name="strategy" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="MatchHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionaryWord" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictHttpGetIn">
+ <wsdl:part name="dictId" type="s:string" />
+ <wsdl:part name="word" type="s:string" />
+ <wsdl:part name="strategy" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictHttpGetOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionaryWord" />
+ </wsdl:message>
+ <wsdl:message name="ServerInfoHttpPostIn" />
+ <wsdl:message name="ServerInfoHttpPostOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListHttpPostIn" />
+ <wsdl:message name="DictionaryListHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionary" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryListExtendedHttpPostIn" />
+ <wsdl:message name="DictionaryListExtendedHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionary" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoHttpPostIn">
+ <wsdl:part name="dictId" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DictionaryInfoHttpPostOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineHttpPostIn">
+ <wsdl:part name="word" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineHttpPostOut">
+ <wsdl:part name="Body" element="tns:WordDefinition" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictHttpPostIn">
+ <wsdl:part name="dictId" type="s:string" />
+ <wsdl:part name="word" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="DefineInDictHttpPostOut">
+ <wsdl:part name="Body" element="tns:WordDefinition" />
+ </wsdl:message>
+ <wsdl:message name="StrategyListHttpPostIn" />
+ <wsdl:message name="StrategyListHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfStrategy" />
+ </wsdl:message>
+ <wsdl:message name="MatchHttpPostIn">
+ <wsdl:part name="word" type="s:string" />
+ <wsdl:part name="strategy" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="MatchHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionaryWord" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictHttpPostIn">
+ <wsdl:part name="dictId" type="s:string" />
+ <wsdl:part name="word" type="s:string" />
+ <wsdl:part name="strategy" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="MatchInDictHttpPostOut">
+ <wsdl:part name="Body" element="tns:ArrayOfDictionaryWord" />
+ </wsdl:message>
+ <wsdl:portType name="DictServiceSoap">
+ <wsdl:operation name="ServerInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show remote server information</wsdl:documentation>
+ <wsdl:input message="tns:ServerInfoSoapIn" />
+ <wsdl:output message="tns:ServerInfoSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of available dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListSoapIn" />
+ <wsdl:output message="tns:DictionaryListSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of advanced dictionaries (e.g. translating dictionaries)</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListExtendedSoapIn" />
+ <wsdl:output message="tns:DictionaryListExtendedSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show information about the specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryInfoSoapIn" />
+ <wsdl:output message="tns:DictionaryInfoSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from all dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DefineSoapIn" />
+ <wsdl:output message="tns:DefineSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DefineInDictSoapIn" />
+ <wsdl:output message="tns:DefineInDictSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Return list of all available strategies on the server</wsdl:documentation>
+ <wsdl:input message="tns:StrategyListSoapIn" />
+ <wsdl:output message="tns:StrategyListSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in all dictionaries using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchSoapIn" />
+ <wsdl:output message="tns:MatchSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in the specified dictionary using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchInDictSoapIn" />
+ <wsdl:output message="tns:MatchInDictSoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="DictServiceHttpGet">
+ <wsdl:operation name="ServerInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show remote server information</wsdl:documentation>
+ <wsdl:input message="tns:ServerInfoHttpGetIn" />
+ <wsdl:output message="tns:ServerInfoHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of available dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListHttpGetIn" />
+ <wsdl:output message="tns:DictionaryListHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of advanced dictionaries (e.g. translating dictionaries)</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListExtendedHttpGetIn" />
+ <wsdl:output message="tns:DictionaryListExtendedHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show information about the specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryInfoHttpGetIn" />
+ <wsdl:output message="tns:DictionaryInfoHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from all dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DefineHttpGetIn" />
+ <wsdl:output message="tns:DefineHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DefineInDictHttpGetIn" />
+ <wsdl:output message="tns:DefineInDictHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Return list of all available strategies on the server</wsdl:documentation>
+ <wsdl:input message="tns:StrategyListHttpGetIn" />
+ <wsdl:output message="tns:StrategyListHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in all dictionaries using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchHttpGetIn" />
+ <wsdl:output message="tns:MatchHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in the specified dictionary using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchInDictHttpGetIn" />
+ <wsdl:output message="tns:MatchInDictHttpGetOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="DictServiceHttpPost">
+ <wsdl:operation name="ServerInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show remote server information</wsdl:documentation>
+ <wsdl:input message="tns:ServerInfoHttpPostIn" />
+ <wsdl:output message="tns:ServerInfoHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of available dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListHttpPostIn" />
+ <wsdl:output message="tns:DictionaryListHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Returns a list of advanced dictionaries (e.g. translating dictionaries)</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryListExtendedHttpPostIn" />
+ <wsdl:output message="tns:DictionaryListExtendedHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Show information about the specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DictionaryInfoHttpPostIn" />
+ <wsdl:output message="tns:DictionaryInfoHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from all dictionaries</wsdl:documentation>
+ <wsdl:input message="tns:DefineHttpPostIn" />
+ <wsdl:output message="tns:DefineHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Define given word, returning definitions from specified dictionary</wsdl:documentation>
+ <wsdl:input message="tns:DefineInDictHttpPostIn" />
+ <wsdl:output message="tns:DefineInDictHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Return list of all available strategies on the server</wsdl:documentation>
+ <wsdl:input message="tns:StrategyListHttpPostIn" />
+ <wsdl:output message="tns:StrategyListHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in all dictionaries using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchHttpPostIn" />
+ <wsdl:output message="tns:MatchHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Look for matching words in the specified dictionary using the given strategy</wsdl:documentation>
+ <wsdl:input message="tns:MatchInDictHttpPostIn" />
+ <wsdl:output message="tns:MatchInDictHttpPostOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="DictServiceSoap" type="tns:DictServiceSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="ServerInfo">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/ServerInfo" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/DictionaryList" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/DictionaryListExtended" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/DictionaryInfo" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/Define" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/DefineInDict" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/StrategyList" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/Match" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <soap:operation soapAction="http://services.aonaware.com/webservices/MatchInDict" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="DictServiceSoap12" type="tns:DictServiceSoap">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="ServerInfo">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/ServerInfo" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/DictionaryList" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/DictionaryListExtended" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/DictionaryInfo" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/Define" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/DefineInDict" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/StrategyList" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/Match" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <soap12:operation soapAction="http://services.aonaware.com/webservices/MatchInDict" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="DictServiceHttpGet" type="tns:DictServiceHttpGet">
+ <http:binding verb="GET" />
+ <wsdl:operation name="ServerInfo">
+ <http:operation location="/ServerInfo" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <http:operation location="/DictionaryList" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <http:operation location="/DictionaryListExtended" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <http:operation location="/DictionaryInfo" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <http:operation location="/Define" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <http:operation location="/DefineInDict" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <http:operation location="/StrategyList" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <http:operation location="/Match" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <http:operation location="/MatchInDict" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="DictServiceHttpPost" type="tns:DictServiceHttpPost">
+ <http:binding verb="POST" />
+ <wsdl:operation name="ServerInfo">
+ <http:operation location="/ServerInfo" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryList">
+ <http:operation location="/DictionaryList" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryListExtended">
+ <http:operation location="/DictionaryListExtended" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DictionaryInfo">
+ <http:operation location="/DictionaryInfo" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Define">
+ <http:operation location="/Define" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="DefineInDict">
+ <http:operation location="/DefineInDict" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="StrategyList">
+ <http:operation location="/StrategyList" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="Match">
+ <http:operation location="/Match" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="MatchInDict">
+ <http:operation location="/MatchInDict" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="DictService">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Word Dictionary Web Service</wsdl:documentation>
+ <wsdl:port name="DictServiceSoap" binding="tns:DictServiceSoap">
+ <soap:address location="http://services.aonaware.com/DictService/DictService.asmx" />
+ </wsdl:port>
+ <wsdl:port name="DictServiceSoap12" binding="tns:DictServiceSoap12">
+ <soap12:address location="http://services.aonaware.com/DictService/DictService.asmx" />
+ </wsdl:port>
+ <wsdl:port name="DictServiceHttpGet" binding="tns:DictServiceHttpGet">
+ <http:address location="http://services.aonaware.com/DictService/DictService.asmx" />
+ </wsdl:port>
+ <wsdl:port name="DictServiceHttpPost" binding="tns:DictServiceHttpPost">
+ <http:address location="http://services.aonaware.com/DictService/DictService.asmx" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file diff --git a/examples/dictionary/gensvcbind.py b/examples/dictionary/gensvcbind.py new file mode 100644 index 0000000..09f741f --- /dev/null +++ b/examples/dictionary/gensvcbind.py @@ -0,0 +1,27 @@ +import pyxb.Namespace +import pyxb.xmlschema as xs +import sys +import urllib2 + +WSDL_uri = 'http://services.aonaware.com/DictService/DictService.asmx?WSDL' + +import pyxb.standard.bindings.wsdl as wsdl +from xml.dom import Node +from xml.dom import minidom +import pyxb.binding.generate +import pyxb.utils.domutils as domutils + +wsdl_xml = urllib2.urlopen(WSDL_uri).read() + +doc = minidom.parseString(wsdl_xml) +root = doc.documentElement + +attribute_map = domutils.AttributeMap(root) + +try: + spec = wsdl.definitions.CreateFromDOM(doc.documentElement, process_schema=True) +except Exception, e: + print 'ERROR building schema: %s' % (e,) + sys.exit(1) + +open('raw_dictservice.py', 'w').write(pyxb.binding.generate.GeneratePython(schema=spec.schema())) diff --git a/examples/dictionary/w3.py b/examples/dictionary/w3.py new file mode 100644 index 0000000..e523d30 --- /dev/null +++ b/examples/dictionary/w3.py @@ -0,0 +1,38 @@ +import pyxb.Namespace +import pyxb.xmlschema as xs +import sys + +import pyxb.standard.bindings.wsdl as wsdl +import pyxb.standard.bindings.http as http +import pyxb.utils.domutils as domutils +from xml.dom import Node +from xml.dom import minidom +import pyxb.binding.generate + +import urllib2 +WSDL_uri = 'http://services.aonaware.com/DictService/DictService.asmx?WSDL' +uri_src = urllib2.urlopen(WSDL_uri) +uri_src = open('dictservice.wsdl') +doc = minidom.parseString(uri_src.read()) + +#for ai in range(0, root.attributes.length): +# attr = root.attributes.item(ai) +# print '%s = %s [%s]' % (attr.name, attr.value, attr.namespaceURI) + +spec = wsdl.definitions.CreateFromDOM(doc.documentElement, process_schema=True) + +for s in spec.service(): + print 'Service: %s' % (s.name(),) + if s.documentation(): + print s.documentation() + for p in s.port(): + print ' Port %s at %s' % (p.name(), p.addressReference().location()) + ptr = p.bindingReference().portTypeReference() + for op in p.bindingReference().operation(): + pt_op = ptr.operationMap()[op.name()] + if op.operationReference() is not None: + print ' %s (at %s)' % (op.name(), op.operationReference().locationInformation()) + else: + print ' %s' % (op.name(),) + print ' %s' % (pt_op.documentation(),) + |