diff options
-rw-r--r-- | examples/dictionary/dictservice.wsdl | 824 | ||||
-rw-r--r-- | examples/dictionary/gensvcbind.py | 27 | ||||
-rw-r--r-- | examples/dictionary/w3.py | 38 | ||||
-rw-r--r-- | examples/ndfd/DWML.py | 1 | ||||
-rw-r--r-- | examples/ndfd/DWML_ns.xsd | 7 | ||||
-rw-r--r-- | examples/ndfd/gensvcbind.py | 38 | ||||
-rw-r--r-- | examples/ndfd/ndfd.py | 1 | ||||
-rw-r--r-- | examples/ndfd/ndfdXML.wsdl | 567 | ||||
-rw-r--r-- | examples/ndfd/showreq.py | 71 | ||||
-rw-r--r-- | examples/weather/client.py | 33 |
10 files changed, 1605 insertions, 2 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(),) + diff --git a/examples/ndfd/DWML.py b/examples/ndfd/DWML.py new file mode 100644 index 0000000..e2c269c --- /dev/null +++ b/examples/ndfd/DWML.py @@ -0,0 +1 @@ +from raw.DWML import * diff --git a/examples/ndfd/DWML_ns.xsd b/examples/ndfd/DWML_ns.xsd new file mode 100644 index 0000000..921ca3b --- /dev/null +++ b/examples/ndfd/DWML_ns.xsd @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<!-- Wrapper around the DWML schema to give it target and default namespaces --> +<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" + targetNamespace="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd" + xmlns="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd"> + <xsd:include schemaLocation="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd"/> +</xsd:schema> diff --git a/examples/ndfd/gensvcbind.py b/examples/ndfd/gensvcbind.py new file mode 100644 index 0000000..b1594aa --- /dev/null +++ b/examples/ndfd/gensvcbind.py @@ -0,0 +1,38 @@ +import pyxb.Namespace +import pyxb.xmlschema as xs +import traceback +import sys +import urllib2 + +# You'll also need the DWML types +# PYTHONPATH=../.. ../../scripts/genbind DWML_ns.xsd raw DWML + +WSDL_uri = 'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl' +#wsdl_src = urllib2.urlopen(WSDL_uri) +wsdl_src = open('ndfdXML.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 + +#import DWML +#print "Validating DWML %s\n%s" % (DWML.Namespace.uri(), object.__str__(DWML.Namespace),) +#DWML.Namespace.validateSchema() +#print 'Validated DWML: types %s' % ("\n".join(DWML.Namespace.typeDefinitions().keys()),) + +wsdl_xml = wsdl_src.read() + +doc = minidom.parseString(wsdl_xml) +root = doc.documentElement + +attribute_map = domutils.AttributeMap(root) + +try: + spec = wsdl.definitions.CreateFromDOM(doc.documentElement, process_schema=True) + open('raw/ndfd.py', 'w').write(pyxb.binding.generate.GeneratePython(schema=spec.schema())) +except Exception, e: + print 'ERROR building schema: %s' % (e,) + traceback.print_exception(*sys.exc_info()) + diff --git a/examples/ndfd/ndfd.py b/examples/ndfd/ndfd.py new file mode 100644 index 0000000..790a316 --- /dev/null +++ b/examples/ndfd/ndfd.py @@ -0,0 +1 @@ +from raw.ndfd import * diff --git a/examples/ndfd/ndfdXML.wsdl b/examples/ndfd/ndfdXML.wsdl new file mode 100644 index 0000000..4990b17 --- /dev/null +++ b/examples/ndfd/ndfdXML.wsdl @@ -0,0 +1,567 @@ +<?xml version="1.0"?> + +<!-- ********************************************************************** + + ndfdXML.wsdl + + John L. Schattel MDL 4 July 2007 + Aniesha L. Alford + Red Hat Linux Apache Server + + SOURCE CODE CONTROL INFORMATION + + Name: + %PM% + %PID% + + Status: + %PS% + + History: + %PL% + + Change Document History: + %PIRC% + + ************************************************************************* --> + +<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:xsd="http://www.w3.org/2001/XMLSchema" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" + xmlns:si="http://soapinterop.org/xsd" + xmlns:tns="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" + xmlns:typens="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd" + xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" + xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" + xmlns="http://schemas.xmlsoap.org/wsdl/" + targetNamespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"> +<types> + <xsd:schema targetNamespace="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd"> + <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> + <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" /> + + <xsd:simpleType name="sectorType"> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='conus'/> + <xsd:enumeration value='nhemi'/> + <xsd:enumeration value='alaska'/> + <xsd:enumeration value='guam'/> + <xsd:enumeration value='hawaii'/> + <xsd:enumeration value='puertori'/> + <xsd:enumeration value='npacocn'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="formatType"> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='24 hourly'/> + <xsd:enumeration value='12 hourly'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="productType"> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='time-series'/> + <xsd:enumeration value='glance'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="latLonPairType"> + <xsd:restriction base='xsd:string'> + <xsd:pattern value="[\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="listLatLonType"> + <xsd:restriction base='xsd:string'> + <xsd:pattern value="[\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+( [\-]?\d{1,2}\.\d+,[\-]?\d{1,3}\.\d+)*" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="zipCodeType"> + <xsd:restriction base='xsd:string'> + <xsd:pattern value="\d{5}(\-\d{4})?" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="zipCodeListType"> + <xsd:restriction base='xsd:string'> + <xsd:pattern value="\d{5}(\-\d{4})?( \d{5}(\-\d{4})?)*" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="featureTypeType"> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='Forecast_Gml2Point'/> + <xsd:enumeration value='Forecast_Gml2AllWx'/> + <xsd:enumeration value='Forecast_GmlsfPoint'/> + <xsd:enumeration value='Forecast_GmlObs'/> + <xsd:enumeration value='NdfdMultiPointCoverage'/> + <xsd:enumeration value='Ndfd_KmlPoint'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="compTypeType"> + <xsd:restriction base='xsd:string'> + <xsd:enumeration value='IsEqual'/> + <xsd:enumeration value='Between'/> + <xsd:enumeration value='GreaterThan'/> + <xsd:enumeration value='GreaterThanEqualTo'/> + <xsd:enumeration value='LessThan'/> + <xsd:enumeration value='LessThanEqualTo'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="listCityNamesType"> + <xsd:restriction base='xsd:string'> + <xsd:pattern value="[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z](\|[a-zA-Z'\-]*( ?[a-zA-Z'\-]*)*,[A-Z][A-Z])*" /> + </xsd:restriction> + </xsd:simpleType> + + <xsd:simpleType name="displayLevelType"> + <xsd:restriction base='xsd:integer'> + <xsd:enumeration value='1'/> + <xsd:enumeration value='2'/> + <xsd:enumeration value='3'/> + <xsd:enumeration value='4'/> + <xsd:enumeration value='12'/> + <xsd:enumeration value='34'/> + <xsd:enumeration value='1234'/> + </xsd:restriction> + </xsd:simpleType> + + <xsd:complexType name="weatherParametersType"> + <xsd:all> + <xsd:element name="maxt" type="xsd:boolean"/> + <xsd:element name="mint" type="xsd:boolean"/> + <xsd:element name="temp" type="xsd:boolean"/> + <xsd:element name="dew" type="xsd:boolean"/> + <xsd:element name="pop12" type="xsd:boolean"/> + <xsd:element name="qpf" type="xsd:boolean"/> + <xsd:element name="sky" type="xsd:boolean"/> + <xsd:element name="snow" type="xsd:boolean"/> + <xsd:element name="wspd" type="xsd:boolean"/> + <xsd:element name="wdir" type="xsd:boolean"/> + <xsd:element name="wx" type="xsd:boolean"/> + <xsd:element name="waveh" type="xsd:boolean"/> + <xsd:element name="icons" type="xsd:boolean"/> + <xsd:element name="rh" type="xsd:boolean"/> + <xsd:element name="appt" type="xsd:boolean"/> + <xsd:element name="incw34" type="xsd:boolean"/> + <xsd:element name="incw50" type="xsd:boolean"/> + <xsd:element name="incw64" type="xsd:boolean"/> + <xsd:element name="cumw34" type="xsd:boolean"/> + <xsd:element name="cumw50" type="xsd:boolean"/> + <xsd:element name="cumw64" type="xsd:boolean"/> + <xsd:element name="conhazo" type="xsd:boolean"/> + <xsd:element name="ptornado" type="xsd:boolean"/> + <xsd:element name="phail" type="xsd:boolean"/> + <xsd:element name="ptstmwinds" type="xsd:boolean"/> + <xsd:element name="pxtornado" type="xsd:boolean"/> + <xsd:element name="pxhail" type="xsd:boolean"/> + <xsd:element name="pxtstmwinds" type="xsd:boolean"/> + <xsd:element name="ptotsvrtstm" type="xsd:boolean"/> + <xsd:element name="pxtotsvrtstm" type="xsd:boolean"/> + <xsd:element name="tmpabv14d" type="xsd:boolean"/> + <xsd:element name="tmpblw14d" type="xsd:boolean"/> + <xsd:element name="tmpabv30d" type="xsd:boolean"/> + <xsd:element name="tmpblw30d" type="xsd:boolean"/> + <xsd:element name="tmpabv90d" type="xsd:boolean"/> + <xsd:element name="tmpblw90d" type="xsd:boolean"/> + <xsd:element name="prcpabv14d" type="xsd:boolean"/> + <xsd:element name="prcpblw14d" type="xsd:boolean"/> + <xsd:element name="prcpabv30d" type="xsd:boolean"/> + <xsd:element name="prcpblw30d" type="xsd:boolean"/> + <xsd:element name="prcpabv90d" type="xsd:boolean"/> + <xsd:element name="prcpblw90d" type="xsd:boolean"/> + <xsd:element name="precipa_r" type="xsd:boolean"/> + <xsd:element name="sky_r" type="xsd:boolean"/> + <xsd:element name="td_r" type="xsd:boolean"/> + <xsd:element name="temp_r" type="xsd:boolean"/> + <xsd:element name="wdir_r" type="xsd:boolean"/> + <xsd:element name="wspd_r" type="xsd:boolean"/> + <xsd:element name="wwa" type="xsd:boolean"/> + <xsd:element name="wgust" type="xsd:boolean"/> + </xsd:all> + </xsd:complexType> + +</xsd:schema> +</types> + +<message name="NDFDgenRequest"> + <part name="latitude" type="xsd:decimal" /> + <part name="longitude" type="xsd:decimal" /> + <part name="product" type="typens:productType" /> + <part name="startTime" type="xsd:dateTime" /> + <part name="endTime" type="xsd:dateTime" /> + <part name="weatherParameters" type="typens:weatherParametersType" /> +</message> + +<message name="NDFDgenResponse"> + <part name="dwmlOut" type="xsd:string" /> +</message> + +<message name="NDFDgenLatLonListRequest"> + <part name="listLatLon" type="typens:listLatLonType" /> + <part name="product" type="typens:productType" /> + <part name="startTime" type="xsd:dateTime" /> + <part name="endTime" type="xsd:dateTime" /> + <part name="weatherParameters" type="typens:weatherParametersType" /> +</message> + +<message name="NDFDgenLatLonListResponse"> + <part name="dwmlOut" type="xsd:string" /> +</message> + +<message name="LatLonListSubgridRequest"> + <part name="lowerLeftLatitude" type="xsd:decimal" /> + <part name="lowerLeftLongitude" type="xsd:decimal" /> + <part name="upperRightLatitude" type="xsd:decimal" /> + <part name="upperRightLongitude" type="xsd:decimal" /> + <part name="resolution" type="xsd:decimal" /> +</message> + +<message name="LatLonListSubgridResponse"> + <part name="listLatLonOut" type="typens:listLatLonType" /> +</message> + +<message name="LatLonListLineRequest"> + <part name="endPoint1Lat" type="xsd:decimal" /> + <part name="endPoint1Lon" type="xsd:decimal" /> + <part name="endPoint2Lat" type="xsd:decimal" /> + <part name="endPoint2Lon" type="xsd:decimal" /> +</message> + +<message name="LatLonListLineResponse"> + <part name="listLatLonOut" type="typens:listLatLonType" /> +</message> + +<message name="LatLonListZipCodeRequest"> + <part name="zipCodeList" type="typens:zipCodeListType" /> +</message> + +<message name="LatLonListZipCodeResponse"> + <part name="listLatLonOut" type="typens:listLatLonType" /> +</message> + +<message name="LatLonListSquareRequest"> + <part name="centerPointLat" type="xsd:decimal" /> + <part name="centerPointLon" type="xsd:decimal" /> + <part name="distanceLat" type="xsd:decimal" /> + <part name="distanceLon" type="xsd:decimal" /> + <part name="resolution" type="xsd:decimal" /> +</message> + +<message name="LatLonListSquareResponse"> + <part name="listLatLonOut" type="typens:listLatLonType" /> +</message> + +<message name="CornerPointsRequest"> + <part name="sector" type="typens:sectorType" /> +</message> + +<message name="CornerPointsResponse"> + <part name="listLatLonOut" type="typens:listLatLonType" /> +</message> + +<message name="LatLonListCityNamesRequest"> + <part name="displayLevel" type="typens:displayLevelType" /> +</message> + +<message name="LatLonListCityNamesResponse"> + <part name="listCityNamesOut" type="typens:listCityNamesType" /> +</message> + +<message name="NDFDgenByDayRequest"> + <part name="latitude" type="xsd:decimal" /> + <part name="longitude" type="xsd:decimal" /> + <part name="startDate" type="xsd:date" /> + <part name="numDays" type="xsd:integer" /> + <part name="format" type="typens:formatType" /> +</message> + +<message name="NDFDgenByDayResponse"> + <part name="dwmlByDayOut" type="xsd:string" /> +</message> + +<message name="NDFDgenByDayLatLonListRequest"> + <part name="listLatLon" type="typens:listLatLonType" /> + <part name="startDate" type="xsd:date" /> + <part name="numDays" type="xsd:integer" /> + <part name="format" type="typens:formatType" /> +</message> + +<message name="NDFDgenByDayLatLonListResponse"> + <part name="dwmlByDayOut" type="xsd:string" /> +</message> + +<message name="GmlLatLonListRequest"> + <part name="listLatLon" type="typens:listLatLonType" /> + <part name="requestedTime" type="xsd:dateTime" /> + <part name="featureType" type="typens:featureTypeType" /> + <part name="weatherParameters" type="typens:weatherParametersType" /> +</message> + +<message name="GmlLatLonListResponse"> + <part name="dwGmlOut" type="xsd:string" /> +</message> + +<message name="GmlTimeSeriesRequest"> + <part name="listLatLon" type="typens:listLatLonType" /> + <part name="startTime" type="xsd:dateTime" /> + <part name="endTime" type="xsd:dateTime" /> + <part name="compType" type="typens:compTypeType" /> + <part name="featureType" type="typens:featureTypeType" /> + <part name="propertyName" type="xsd:string" /> +</message> + +<message name="GmlTimeSeriesResponse"> + <part name="dwGmlOut" type="xsd:string" /> +</message> + +<portType name="ndfdXMLPortType"> + + <operation name="NDFDgen"> + <documentation>Returns National Weather Service digital weather forecast data</documentation> + <input message="tns:NDFDgenRequest"/> + <output message="tns:NDFDgenResponse"/> + </operation> + + <operation name="NDFDgenByDay"> + <documentation>Returns National Weather Service digital weather forecast data summarized over either 24- or 12-hourly periods</documentation> + <input message="tns:NDFDgenByDayRequest"/> + <output message="tns:NDFDgenByDayResponse"/> + </operation> + + <operation name="NDFDgenLatLonList"> + <documentation>Returns National Weather Service digital weather forecast data</documentation> + <input message="tns:NDFDgenLatLonListRequest"/> + <output message="tns:NDFDgenLatLonListResponse"/> + </operation> + + <operation name="NDFDgenByDayLatLonList"> + <documentation>Returns National Weather Service digital weather forecast data summarized over either 24- or 12-hourly periods</documentation> + <input message="tns:NDFDgenByDayLatLonListRequest"/> + <output message="tns:NDFDgenByDayLatLonListResponse"/> + </operation> + + <operation name="GmlLatLonList"> + <documentation>Returns National Weather Service digital weather forecast data encoded in GML for a single time</documentation> + <input message="tns:GmlLatLonListRequest"/> + <output message="tns:GmlLatLonListResponse"/> + </operation> + + <operation name="GmlTimeSeries"> + <documentation>Returns National Weather Service digital weather forecast data encoded in GML for a time period</documentation> + <input message="tns:GmlTimeSeriesRequest"/> + <output message="tns:GmlTimeSeriesResponse"/> + </operation> + + <operation name="LatLonListSubgrid"> + <documentation>Returns a list of latitude and longitude pairs in a rectangular subgrid defined by the lower left and upper right points</documentation> + <input message="tns:LatLonListSubgridRequest"/> + <output message="tns:LatLonListSubgridResponse"/> + </operation> + + <operation name="LatLonListLine"> + <documentation>Returns a list of latitude and longitude pairs along a line defined by the latitude and longitude of the 2 endpoints</documentation> + <input message="tns:LatLonListLineRequest"/> + <output message="tns:LatLonListLineResponse"/> + </operation> + + <operation name="LatLonListZipCode"> + <documentation>Returns a list of latitude and longitude pairs with each pair corresponding to an input zip code.</documentation> + <input message="tns:LatLonListZipCodeRequest"/> + <output message="tns:LatLonListZipCodeResponse"/> + </operation> + + <operation name="LatLonListSquare"> + <documentation>Returns a list of latitude and longitude pairs in a rectangle defined by a central point and distance from that point in the latitudinal and longitudinal directions</documentation> + <input message="tns:LatLonListSquareRequest"/> + <output message="tns:LatLonListSquareResponse"/> + </operation> + + <operation name="CornerPoints"> + <documentation>Returns four latitude and longitude pairs for corners of an NDFD grid and the minimum resolution that will return the entire grid</documentation> + <input message="tns:CornerPointsRequest"/> + <output message="tns:CornerPointsResponse"/> + </operation> + + <operation name="LatLonListCityNames"> + <documentation>Returns a list of latitude and longitude pairs paired with the city names they correspond to</documentation> + <input message="tns:LatLonListCityNamesRequest"/> + <output message="tns:LatLonListCityNamesResponse"/> + </operation> + +</portType> + +<binding name="ndfdXMLBinding" type="tns:ndfdXMLPortType"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + + <operation name="NDFDgen"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgen" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="NDFDgenByDay"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenByDay" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="NDFDgenLatLonList"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenLatLonList" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="NDFDgenByDayLatLonList"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#NDFDgenByDayLatLonList" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="GmlLatLonList"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#GmlLatLonList" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="GmlTimeSeries"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#GmlTimeSeries" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="LatLonListSubgrid"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListSubgrid" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="LatLonListLine"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListLine" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="LatLonListZipCode"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="LatLonListSquare"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListSquare" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="CornerPoints"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#CornerPoints" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + + <operation name="LatLonListCityNames"> + <soap:operation soapAction="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListCityNames" style="rpc"/> + <input> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </input> + <output> + <soap:body use="encoded" namespace="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> + </output> + </operation> + +</binding> + +<service name="ndfdXML"> + <documentation>The service has 11 exposed functions, NDFDgen, NDFDgenLatLonList, NDFDgenByDay, NDFDgenByDayLatLonList, + LatLonListSubgrid, LatLonListLine, LatLonListZipCode, CornerPoints, LatLonListSquare, GmlLatLonList, and LatLonListCityNames. + For the NDFDgen function, the client needs to provide a latitude and longitude pair and the product type. + The client also needs to provide the start and end time (Local) of the period that it wants data for. For the time-series + product, the client needs to provide an array of boolean values corresponding to which NDFD values are desired. + For the NDFDgenByDay function, the client needs to provide a latitude and longitude pair, the date (Local) it wants to start + retrieving data for and the number of days worth of data. The client also needs to provide the format that is desired. + For the multi point versions, NDFDgenLatLonList and NDFDgenByDayLatLonList a space delimited list of latitude and longitude + pairs are substituted for the single latitude and longitude input. Each latitude and longitude + pair is composed of a latitude and longitude delimited by a comma. + For the LatLonListSubgrid, the user provides a comma delimited latitude and longitude pair for the lower left and for + the upper right corners of a rectangular subgrid. The function can also take a integer + resolution to reduce the number of grid points returned. The service then returns a list of + latitude and longitude pairs for all the grid points contained in the subgrid. + weather values should appear in the time series product. + For the LatLonListLine, The inputs are the same as the function NDFDgen except the latitude and longitude pair is + replaced by two latitude and longitude pairs, one for each end point a line. The two points are delimited with a space. + The service then returns data for all the NDFD points on the line formed by the two points. + For the LatLonListZipCode function, the input is the same as the NDFDgen function except the latitude and longitude values + are relaced by a zip code for the 50 United States and Puerto Rico. + For the LatLonListSquare function, the input is the same as the NDFDgen function except the latitude and longitude values + are relaced by a zip code for the 50 United States and Puerto Rico. + For the CornerPoints function, the service requires a valid NDFD grid name. The function returns a + list of four latitude and longitude pairs, one for each corner of the NDFD grid. The function + also returns the minimum resolution required to return the entire grid below the maximum points + threshold. + For the GmlLatLonList function, the service requires a list of latitude and longitude pairs, the time (UTC) the user + wants data for, the GML feature type and the array of boolean values corresponding to which NDFD values are desired. + For the GmlTimeSeries function, the service requires a list of latitude and longitude pairs, the start and end time (UTC) the user + wants data for, a comparison type (IsEqual, Between, GreaterThan, GreaterThan, GreaterThanEqualTo, LessThan, and + LessThanEqualTo), the GML feature type and The input variable "propertyName" contains a comma delimited string of NDFD element to + indicate which weather parameters are being requested. + For the LatLonListCityNames function, the services requires a detail level that that ranges from 1 to 4. Level 1 generally represents + large main cities. Level 2 represents progressively smaller cities or large cities that are close to another even larger city. Levels + 3 and 4 are part one and two of a list of cities that help increase the areal coverage of the cities dataset. This functions + returns a list of latitude and longitude values along with a seperate list of city name for those point.</documentation> + + <port name="ndfdXMLPort" binding="tns:ndfdXMLBinding"> + <soap:address location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"/> + </port> +</service> + +</definitions> diff --git a/examples/ndfd/showreq.py b/examples/ndfd/showreq.py new file mode 100644 index 0000000..7b3ae7b --- /dev/null +++ b/examples/ndfd/showreq.py @@ -0,0 +1,71 @@ +import pyxb.utils.domutils +import xml.dom +import xml.dom.minidom +import pyxb.Namespace + +# Structure +#import DWML +#print 'Validating DWML' +#DWML.Namespace.validateSchema() +#print 'Validated DWML: types %s' % ("\n".join(DWML.Namespace.typeDefinitions().keys()),) + +xmls = open('NDFDgen.xml').read() +dom = xml.dom.minidom.parseString(xmls) +body_dom = dom.documentElement.firstChild.nextSibling.firstChild.nextSibling +print body_dom + +# Service interface types +import ndfd + +# WSDL +import pyxb.standard.bindings.wsdl as wsdl + +uri_src = open('ndfdXML.wsdl') +doc = xml.dom.minidom.parseString(uri_src.read()) +spec = wsdl.definitions.CreateFromDOM(doc.documentElement, process_schema=True) + +binding = spec.binding()[0] +print binding.name() +port_type = spec.portType()[0] +print port_type.name() +bop = binding.operationMap()[body_dom.localName] +print bop.toxml() +pop = port_type.operationMap()[body_dom.localName] +print pop.toxml() +input = pop.input()[0] +print input.toxml() +print type(input) +print input.message() +im_qname = input._namespaceContext().interpretQName(input.message()) +assert im_qname is not None +(im_ns, im_ln) = im_qname +print '%s %s' % im_qname +msg = im_ns.messages()[im_ln] +print msg +for p in msg.part(): + print p.toxml() +msg_ns = pyxb.Namespace.NamespaceForURI(body_dom.namespaceURI) +print '%s %s' % (body_dom.namespaceURI, msg_ns) + +parts = msg.part() +nodes = body_dom.childNodes + +while parts and nodes: + p = parts.pop(0) + p + while nodes and (not (xml.dom.Node.ELEMENT_NODE == nodes[0].nodeType)): + nodes.pop(0) + assert nodes + n = nodes.pop(0) + print '%s %s' % (p.name(), n.localName) + +#print '%s yielded %s' msg_ns + +#msg = spec.messageMap() +#print msg + +#print req +#dom_support = req.toDOM(pyxb.utils.domutils.BindingDOMSupport()) +#dom_support.finalize() +#print dom_support.document().toxml() + diff --git a/examples/weather/client.py b/examples/weather/client.py index 2e7d2a4..b9501f7 100644 --- a/examples/weather/client.py +++ b/examples/weather/client.py @@ -1,11 +1,40 @@ import weather import time +import pyxb.utils.domutils as domutils +import pyxb.Namespace +import sys + +pyxb.Namespace.AvailableForLoad() from xml.dom import minidom -doc = minidom.parse('85711.xml') +import urllib2 + +#uri = 'http://ws.cdyne.com/WeatherWS/Weather.asmx/GetCityForecastByZIP?ZIP=55108' + +query = weather.GetCityForecastByZIP(ZIP=55414) + +bds = domutils.BindingDOMSupport() +doc = query.toDOM(bds).finalize() +query_xml = doc.documentElement.toxml() + +query_xml = '''<?xml version="1.0" encoding="utf-8"?> +<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> + <soap:Body>%s + </soap:Body> +</soap:Envelope> +''' % (query_xml,) + +host = 'http://ws.cdyne.com' +uri = urllib2.Request(host + '/WeatherWS/Weather.asmx', query_xml, { 'SOAPAction' : "http://ws.cdyne.com/WeatherWS/GetCityForecastByZIP", 'Content-Type': 'text/xml' } ) + +xml = urllib2.urlopen(uri).read() +doc = minidom.parseString(xml) -fc_return = weather.ForecastReturn.CreateFromDOM(doc.documentElement) +body = doc.documentElement.firstChild +body = weather.CreateFromDOM(body.firstChild) +fc_return = body.GetCityForecastByZIPResult() +# weather.ForecastReturn.CreateFromDOM(doc.documentElement) if fc_return.Success(): print 'Got response for %s, %s:' % (fc_return.City(), fc_return.State()) for fc in fc_return.ForecastResult().Forecast(): |