|
Home > Archive > BizTalk Server Orchestration > March 2006 > Newbie Question: Consuming Webservice / WSDL Problems
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Newbie Question: Consuming Webservice / WSDL Problems
|
|
| Andreas 2006-03-01, 7:55 am |
| Hi,
Im trying to consume a webservice described by the WSDL below, however
When i try to add the WSDL it does not work, tried to run it through WSDL.EXE
It validates in XMLSpy, but WSDL.exe pukes on it, as does when i try to
use it in a Vs.Net project... Any ideas how to go forward with this?
Are there (not suprisingly) specific Microsoft rules on how WSDL should
be defined? (This wsdl is generated by webMethods)
- Andreas
--------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPoller"
targetNamespace="TEST.com/"
xmlns:wsdns1="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="TEST.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest"
xmlns:tns="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest">
<xsd:complexType name="__PollForDocumentRequest">
<xsd:sequence>
<xsd:element name="PollForDocumentRequest"
type="tns:__PollForDocumentRequest2"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="__PollForDocumentRequest2">
<xsd:sequence>
<xsd:element name="Action" type="tns:__Action"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="__Action">
<xsd:restriction>
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:whiteSpace value="collapse"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:enumeration value="GetCount"/>
<xsd:enumeration value="GetDocument"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="__PollForDocumentResponse">
<xsd:sequence>
<xsd:element name="PollForDocumentResponse"
type="tns:__PollForDocumentResponse2"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="__PollForDocumentResponse2">
<xsd:sequence>
<xsd:element name="RemainingCount"
type="xsd:nonNegativeInteger"/>
<xsd:element name="Document" type="tns:__Document"
minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="__Document">
<xsd:sequence>
<xsd:element name="DocumentType" nillable="true"
type="xsd:string"/>
<xsd:element name="DocumentXML" nillable="true"
type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="PollForDocumentRequestInput">
<wsdl:part name="PollForDocumentRequest"
type="wsdns1:__PollForDocumentRequest2"/>
</wsdl:message>
<wsdl:message name="PollForDocumentRequestOutput">
<wsdl:part name="PollForDocumentResponse"
type="wsdns1:__PollForDocumentResponse2"/>
</wsdl:message>
<wsdl:portType
name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerPortType">
<wsdl:operation name="PollForDocumentRequest">
<wsdl:input message="tns:PollForDocumentRequestInput"/>
<wsdl:output message="tns:PollForDocumentRequestOutput"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding
name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerBinding"
type=" tns:NNNWarrantyClaimManagement_WebServic
es_DocumentPollerPortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="PollForDocumentRequest">
<soap:operation soapAction=""/>
<wsdl:input>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="TEST.com/NNNWarrantyClaimManagement.WebServices.DocumentPoller"
use="encoded"/>
</wsdl:input>
<wsdl:output>
<soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="TEST.com/NNNWarrantyClaimManagement.WebServices.DocumentPoller"
use="encoded"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service
name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerService">
<wsdl:port
name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerPort0"
binding=" tns:NNNWarrantyClaimManagement_WebServic
es_DocumentPollerBinding">
<soap:address location="http://TEST.com:80/soap/NNNRPC"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
| |
| Andreas 2006-03-01, 7:55 am |
| Forgot to mention the error output is; when trying to generate code with
wsdl.exe
Error: Unable to import binding
'NNNWarrantyClaimManagement_WebServices_
Document
PollerBinding' from namespace 'TEST.com/'.
- Unable to import operation 'PollForDocumentRequest'.
- The datatype '' is missing.
"Andreas" wrote:
> Hi,
>
> Im trying to consume a webservice described by the WSDL below, however
> When i try to add the WSDL it does not work, tried to run it through WSDL.EXE
>
> It validates in XMLSpy, but WSDL.exe pukes on it, as does when i try to
> use it in a Vs.Net project... Any ideas how to go forward with this?
>
> Are there (not suprisingly) specific Microsoft rules on how WSDL should
> be defined? (This wsdl is generated by webMethods)
>
> - Andreas
>
> --------------
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPoller"
> targetNamespace="TEST.com/"
> xmlns:wsdns1="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:tns="TEST.com/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
> <wsdl:types>
> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest"
> xmlns:tns="http://localhost/NNNWarrantyClaimManagement/WebServices/DocumentPoller/PollForDocumentRequest">
> <xsd:complexType name="__PollForDocumentRequest">
> <xsd:sequence>
> <xsd:element name="PollForDocumentRequest"
> type="tns:__PollForDocumentRequest2"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="__PollForDocumentRequest2">
> <xsd:sequence>
> <xsd:element name="Action" type="tns:__Action"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:simpleType name="__Action">
> <xsd:restriction>
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:whiteSpace value="collapse"/>
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:enumeration value="GetCount"/>
> <xsd:enumeration value="GetDocument"/>
> </xsd:restriction>
> </xsd:simpleType>
> <xsd:complexType name="__PollForDocumentResponse">
> <xsd:sequence>
> <xsd:element name="PollForDocumentResponse"
> type="tns:__PollForDocumentResponse2"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="__PollForDocumentResponse2">
> <xsd:sequence>
> <xsd:element name="RemainingCount"
> type="xsd:nonNegativeInteger"/>
> <xsd:element name="Document" type="tns:__Document"
> minOccurs="0"/>
> </xsd:sequence>
> </xsd:complexType>
> <xsd:complexType name="__Document">
> <xsd:sequence>
> <xsd:element name="DocumentType" nillable="true"
> type="xsd:string"/>
> <xsd:element name="DocumentXML" nillable="true"
> type="xsd:string"/>
> </xsd:sequence>
> </xsd:complexType>
> </xsd:schema>
>
> </wsdl:types>
>
> <wsdl:message name="PollForDocumentRequestInput">
> <wsdl:part name="PollForDocumentRequest"
> type="wsdns1:__PollForDocumentRequest2"/>
> </wsdl:message>
>
> <wsdl:message name="PollForDocumentRequestOutput">
> <wsdl:part name="PollForDocumentResponse"
> type="wsdns1:__PollForDocumentResponse2"/>
> </wsdl:message>
> <wsdl:portType
> name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerPortType">
> <wsdl:operation name="PollForDocumentRequest">
> <wsdl:input message="tns:PollForDocumentRequestInput"/>
> <wsdl:output message="tns:PollForDocumentRequestOutput"/>
> </wsdl:operation>
> </wsdl:portType>
> <wsdl:binding
> name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerBinding"
> type=" tns:NNNWarrantyClaimManagement_WebServic
es_DocumentPollerPortType">
> <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
> <wsdl:operation name="PollForDocumentRequest">
> <soap:operation soapAction=""/>
> <wsdl:input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="TEST.com/NNNWarrantyClaimManagement.WebServices.DocumentPoller"
> use="encoded"/>
> </wsdl:input>
> <wsdl:output>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> namespace="TEST.com/NNNWarrantyClaimManagement.WebServices.DocumentPoller"
> use="encoded"/>
> </wsdl:output>
> </wsdl:operation>
> </wsdl:binding>
> <wsdl:service
> name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerService">
> <wsdl:port
> name=" NNNWarrantyClaimManagement_WebServices_D
ocumentPollerPort0"
> binding=" tns:NNNWarrantyClaimManagement_WebServic
es_DocumentPollerBinding">
> <soap:address location="http://TEST.com:80/soap/NNNRPC"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
>
| |
| Andreas 2006-03-01, 5:51 pm |
| So after some more struggling, it looks like the WSDL presented is not
correct, but after changing the encoding type to "literal" from "encoded"
this works.
According to the WS-I.ORG test kit, it should be "rpc-encoded", this
doesn't fly well with the wsdl.exe tool though.
The dig goes on!
> Forgot to mention the error output is; when trying to generate code with
> wsdl.exe
>
> Error: Unable to import binding
> 'NNNWarrantyClaimManagement_WebServices_
Document
> PollerBinding' from namespace 'TEST.com/'.
> - Unable to import operation 'PollForDocumentRequest'.
> - The datatype '' is missing.
>
[vbcol=seagreen]
[vbcol=seagreen]
|
|
|
|
|