命名空间中所需的 WSDL 扩展元素“绑定" [英] The required WSDL extension element 'binding' from namespace

查看:26
本文介绍了命名空间中所需的 WSDL 扩展元素“绑定"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网络服务出现了大问题.

I'm having an huge problem with the my web service.

当我尝试通过 svcutil 生成文件时,我收到以下错误消息:

When I try to generate the files via svcutil I get the following error messages:

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 定义:

Here is my WSDL definition:

<?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>

任何帮助将不胜感激.

最好的,杰本

推荐答案

事实证明 Silverlight 不喜欢 XHttpPost 投标.

Turns out that Silverlight does not like the XHttpPost biding.

所以我从 web 服务中删除了 web.config 中的这个绑定,一切都在运行.

So I remvoed this binding in my web.config from the web service and all is up an running.

这篇关于命名空间中所需的 WSDL 扩展元素“绑定"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆