2014-01-09 57 views
2

我的Web服務存在一個巨大的問題。命名空間中所需的WSDL擴展元素「綁定」

當我嘗試通過生成SvcUtil工具我收到以下錯誤消息的文件:

Attempting to download metadata from 'http://srv:13208/GROUPING_WS_ASMX.as 
mx' using WS-Metadata Exchange or DISCO. 
Error: Cannot import wsdl:binding 
Detail: The required WSDL extension element 'binding' from namespace 'http://sch 
emas.xmlsoap.org/wsdl/http/' was not handled. 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grouping/']/wsdl:binding[@name='GROUPING_WS_ASMXHttpGet'] 


Error: Cannot import wsdl:port 
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend 
ent on. 
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://grouping/']/wsdl:binding[@name='GROUPING_WS_ASMXHttpGet'] 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grouping/']/wsdl:service[@name='GROUPING_WS_ASMX']/wsdl:port[@name='GROUPING_WS_ASM 
XHttpGet'] 


Error: Cannot import wsdl:binding 
Detail: The required WSDL extension element 'binding' from namespace 'http://sch 
emas.xmlsoap.org/wsdl/http/' was not handled. 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grouping/']/wsdl:binding[@name='GROUPING_WS_ASMXHttpPost'] 


Error: Cannot import wsdl:port 
Detail: There was an error importing a wsdl:binding that the wsdl:port is depend 
ent on. 
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://grouping/']/wsdl:binding[@name='GROUPING_WS_ASMXHttpPost'] 
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://grouping']/wsdl:service[@name='GROUPING_WS_ASMX']/wsdl:port[@name='GROUPING_WS_ASM 
XHttpPost'] 

這裏是我的WSDL定義:

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://grouping/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://grouping/" 
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"> 
<wsdl:types><s:schema targetNamespace="http://grouping/" elementFormDefault="qualified"> 
<s:element name="OnClick_GroupProducts"><s:complexType><s:sequence><s:element name="quoteProductsId" type="s:string" maxOccurs="1" minOccurs="0"/> 
</s:sequence></s:complexType></s:element><s:element name="OnClick_GroupProductsResponse"> 
<s:complexType><s:sequence><s:element name="OnClick_GroupProductsResult" type="s:string" maxOccurs="1" minOccurs="0"/> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:element name="OnClick_UpdateGroupProduct"> 
<s:complexType> 
<s:sequence> 
<s:element name="quoteProductsId" type="s:string" maxOccurs="1" minOccurs="0"/><s:element name="groupname" type="s:string" maxOccurs="1" minOccurs="0"/> 
</s:sequence></s:complexType> 
</s:element><s:element name="OnClick_UpdateGroupProductResponse"> 
<s:complexType/> 
</s:element> 
<s:element name="OnLoad_GetProductGroups"> 
<s:complexType> 
<s:sequence> 
<s:element name="quoteProductId" type="s:string" maxOccurs="1" minOccurs="0"/> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:element name="OnLoad_GetProductGroupsResponse"> 
<s:complexType> 
<s:sequence> 
<s:element name="OnLoad_GetProductGroupsResult" type="tns:ArrayOfString" maxOccurs="1" minOccurs="0"/> 
</s:sequence> 
</s:complexType> 
</s:element> 
<s:complexType name="ArrayOfString"> 
<s:sequence> 
<s:element name="string" type="s:string" maxOccurs="unbounded" minOccurs="0" nillable="true"/> 
</s:sequence></s:complexType><s:element name="string" type="s:string" nillable="true"/> 
<s:element name="ArrayOfString" type="tns:ArrayOfString" nillable="true"/> 
</s:schema></wsdl:types><wsdl:message name="OnClick_GroupProductsSoapIn"> 
<wsdl:part name="parameters" element="tns:OnClick_GroupProducts"/> 
</wsdl:message><wsdl:message name="OnClick_GroupProductsSoapOut"> 
<wsdl:part name="parameters" element="tns:OnClick_GroupProductsResponse"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductSoapIn"><wsdl:part name="parameters" element="tns:OnClick_UpdateGroupProduct"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductSoapOut"><wsdl:part name="parameters" element="tns:OnClick_UpdateGroupProductResponse"/></wsdl:message> 
<wsdl:message name="OnLoad_GetProductGroupsSoapIn"><wsdl:part name="parameters" element="tns:OnLoad_GetProductGroups"/></wsdl:message> 
<wsdl:message name="OnLoad_GetProductGroupsSoapOut"><wsdl:part name="parameters" element="tns:OnLoad_GetProductGroupsResponse"/></wsdl:message> 
<wsdl:message name="OnClick_GroupProductsHttpGetIn"><wsdl:part name="quoteProductsId" type="s:string"/></wsdl:message> 
<wsdl:message name="OnClick_GroupProductsHttpGetOut"><wsdl:part name="Body" element="tns:string"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductHttpGetIn"><wsdl:part name="quoteProductsId" type="s:string"/><wsdl:part name="groupname" type="s:string"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductHttpGetOut"/><wsdl:message name="OnLoad_GetProductGroupsHttpGetIn"><wsdl:part name="quoteProductId" type="s:string"/></wsdl:message> 
<wsdl:message name="OnLoad_GetProductGroupsHttpGetOut"><wsdl:part name="Body" element="tns:ArrayOfString"/></wsdl:message> 
<wsdl:message name="OnClick_GroupProductsHttpPostIn"><wsdl:part name="quoteProductsId" type="s:string"/></wsdl:message> 
<wsdl:message name="OnClick_GroupProductsHttpPostOut"><wsdl:part name="Body" element="tns:string"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductHttpPostIn"><wsdl:part name="quoteProductsId" type="s:string"/><wsdl:part name="groupname" type="s:string"/></wsdl:message> 
<wsdl:message name="OnClick_UpdateGroupProductHttpPostOut"/><wsdl:message name="OnLoad_GetProductGroupsHttpPostIn"><wsdl:part name="quoteProductId" type="s:string"/></wsdl:message> 
<wsdl:message name="OnLoad_GetProductGroupsHttpPostOut"><wsdl:part name="Body" element="tns:ArrayOfString"/></wsdl:message> 
<wsdl:portType name="GROUPING_WS_ASMXSoap"><wsdl:operation name="OnClick_GroupProducts"><wsdl:input message="tns:OnClick_GroupProductsSoapIn"/> 
<wsdl:output message="tns:OnClick_GroupProductsSoapOut"/></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"><wsdl:input message="tns:OnClick_UpdateGroupProductSoapIn"/> 
<wsdl:output message="tns:OnClick_UpdateGroupProductSoapOut"/></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"><wsdl:input message="tns:OnLoad_GetProductGroupsSoapIn"/> 
<wsdl:output message="tns:OnLoad_GetProductGroupsSoapOut"/></wsdl:operation></wsdl:portType><wsdl:portType name="GROUPING_WS_ASMXHttpGet"><wsdl:operation name="OnClick_GroupProducts"> 
<wsdl:input message="tns:OnClick_GroupProductsHttpGetIn"/><wsdl:output message="tns:OnClick_GroupProductsHttpGetOut"/></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"> 
<wsdl:input message="tns:OnClick_UpdateGroupProductHttpGetIn"/><wsdl:output message="tns:OnClick_UpdateGroupProductHttpGetOut"/></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"> 
<wsdl:input message="tns:OnLoad_GetProductGroupsHttpGetIn"/><wsdl:output message="tns:OnLoad_GetProductGroupsHttpGetOut"/></wsdl:operation></wsdl:portType> 
<wsdl:portType name="GROUPING_WS_ASMXHttpPost"><wsdl:operation name="OnClick_GroupProducts"><wsdl:input message="tns:OnClick_GroupProductsHttpPostIn"/> 
<wsdl:output message="tns:OnClick_GroupProductsHttpPostOut"/></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"> 
<wsdl:input message="tns:OnClick_UpdateGroupProductHttpPostIn"/><wsdl:output message="tns:OnClick_UpdateGroupProductHttpPostOut"/> 
</wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"><wsdl:input message="tns:OnLoad_GetProductGroupsHttpPostIn"/> 
<wsdl:output message="tns:OnLoad_GetProductGroupsHttpPostOut"/></wsdl:operation></wsdl:portType><wsdl:binding name="GROUPING_WS_ASMXSoap" type="tns:GROUPING_WS_ASMXSoap"> 
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="OnClick_GroupProducts"> 
<soap:operation style="document" soapAction="http://grouping/OnClick_GroupProducts"/><wsdl:input> 
<soap:body use="literal"/></wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"> 
<soap:operation style="document" soapAction="http://grouping/OnClick_UpdateGroupProduct"/><wsdl:input><soap:body use="literal"/></wsdl:input><wsdl:output> 
<soap:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"> 
<soap:operation style="document" soapAction="http://grouping/OnLoad_GetProductGroups"/><wsdl:input><soap:body use="literal"/> 
</wsdl:input><wsdl:output><soap:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="GROUPING_WS_ASMXSoap12" type="tns:GROUPING_WS_ASMXSoap"> 
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/><wsdl:operation name="OnClick_GroupProducts"> 
<soap12:operation style="document" soapAction="http://groupingOnClick_GroupProducts"/><wsdl:input> 
<soap12:body use="literal"/></wsdl:input><wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"> 
<soap12:operation style="document" soapAction="http://grouping/OnClick_UpdateGroupProduct"/><wsdl:input><soap12:body use="literal"/></wsdl:input> 
<wsdl:output><soap12:body use="literal"/></wsdl:output></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"> 
<soap12:operation style="document" soapAction="http://grouping/OnLoad_GetProductGroups"/><wsdl:input><soap12:body use="literal"/></wsdl:input><wsdl:output> 
<soap12:body use="literal"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:binding name="GROUPING_WS_ASMXHttpGet" type="tns:GROUPING_WS_ASMXHttpGet"> 
<http:binding verb="GET"/><wsdl:operation name="OnClick_GroupProducts"><http:operation location="/OnClick_GroupProducts"/><wsdl:input><http:urlEncoded/> 
</wsdl:input><wsdl:output><mime:mimeXml part="Body"/></wsdl:output></wsdl:operation><wsdl:operation name="OnClick_UpdateGroupProduct"> 
<http:operation location="/OnClick_UpdateGroupProduct"/><wsdl:input><http:urlEncoded/></wsdl:input><wsdl:output/></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"> 
<http:operation location="/OnLoad_GetProductGroups"/><wsdl:input><http:urlEncoded/></wsdl:input><wsdl:output><mime:mimeXml part="Body"/></wsdl:output></wsdl:operation> 
</wsdl:binding><wsdl:binding name="GROUPING_WS_ASMXHttpPost" type="tns:GROUPING_WS_ASMXHttpPost"><http:binding verb="POST"/><wsdl:operation name="OnClick_GroupProducts"> 
<http:operation location="/OnClick_GroupProducts"/><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="OnClick_UpdateGroupProduct"><http:operation location="/OnClick_UpdateGroupProduct"/> 
<wsdl:input><mime:content type="application/x-www-form-urlencoded"/></wsdl:input><wsdl:output/></wsdl:operation><wsdl:operation name="OnLoad_GetProductGroups"> 
<http:operation location="/OnLoad_GetProductGroups"/><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="GROUPING_WS_ASMX"><wsdl:port name="GROUPING_WS_ASMXSoap" binding="tns:GROUPING_WS_ASMXSoap"> 
<soap:address location="http://srv:13208/GROUPING_WS_ASMX.asmx"/></wsdl:port><wsdl:port name="GROUPING_WS_ASMXSoap12" binding="tns:GROUPING_WS_ASMXSoap12"> 
<soap12:address location="http://srv:13208/GROUPING_WS_ASMX.asmx"/></wsdl:port><wsdl:port name="GROUPING_WS_ASMXHttpGet" binding="tns:GROUPING_WS_ASMXHttpGet"> 
<http:address location="http://srv:13208/GROUPING_WS_ASMX.asmx"/></wsdl:port><wsdl:port name="GROUPING_WS_ASMXHttpPost" binding="tns:GROUPING_WS_ASMXHttpPost"> 
<http:address location="http://srv:13208/GROUPING_WS_ASMX.asmx"/></wsdl:port></wsdl:service></wsdl:definitions> 

任何幫助將非常感激。

最佳, Jeppen

回答

2

原來,Silverlight不喜歡XHttpPost招標。

因此,我從web服務中的web.config中重新綁定了這個綁定,並且所有的都在運行。