gpt4 book ai didi

wcf - 为 wcf 添加服务引用的问题

转载 作者:行者123 更新时间:2023-12-02 04:13:56 25 4
gpt4 key购买 nike

Warning 1 Custom tool warning: Cannot import wsdl:binding
Detail: The given key was not present in the dictionary.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://wrapper.dao.ccarwebservice.ids.com']/wsdl:binding[@name='CCaRWebServiceHttpBinding'] C:\Users\me\Documents\Visual Studio 2008 \Projects\CcarsWcfTest\CcarsWcfTest\Service References\ServiceReference1\Reference.svcmap 1 1 CcarsWcfTest

我能做些什么来解决这个问题?

我已经尝试从命令提示符运行服务实用程序并向我的项目添加服务引用。我还进入了“添加服务引用”对话框中的高级设置,并取消了“在所有引用的程序集中重用类型”。

编辑

这是我认为它所指的wsdl的一部分。
<wsdl:binding name="CCaRWebServiceHttpBinding" type="ns:CCaRWebServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="fnGetccarprogramsummaryarray">
<http:operation location="CCaRWebService/fnGetccarprogramsummaryarray"/>
<wsdl:input>
<mime:content type="text/xml" part="fnGetccarprogramsummaryarray"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="fnGetccarprogramsummaryarray"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="fnGetccarprogramsummary">
<http:operation location="CCaRWebService/fnGetccarprogramsummary"/>
<wsdl:input>
<mime:content type="text/xml" part="fnGetccarprogramsummary"/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="fnGetccarprogramsummary"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>



public partial class fnGetccarprogramsummaryarrayRequest
{

public fnGetccarprogramsummaryarrayRequest()
{
}
}

其他都是这样的……
    public partial class fnGetccarprogramsummaryRequest
{

[System.ServiceModel.MessageBodyMemberAttribute(Namespace="http://wrapper.com", Order=0)]
[System.Xml.Serialization.XmlElementAttribute(IsNullable=true)]
public string programAcronym;

public fnGetccarprogramsummaryRequest()
{
}

public fnGetccarprogramsummaryRequest(string programAcronym)
{
this.programAcronym = programAcronym;
}
}

最佳答案

WSDL 是从哪里来的?它是如何产生的?

可能是缺少输入和返回类型的定义。

  • fnGetccarprogramsummaryarray
  • fnGetccar程序摘要。

  • 可能是它试图在类型数组中查找定义而没有找到它。

    编辑

    我想我发现你有一个 POST 绑定(bind),并且该工具只支持 SOAP 绑定(bind)

    http://social.msdn.microsoft.com/Forums/en/wcf/thread/859a2c87-02db-469d-ab65-c558ff091e61

    不存在的键就是 SOAP 绑定(bind)。

    关于wcf - 为 wcf 添加服务引用的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3736331/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com