【问题标题】:Endpoint reference for the Operation not found error未找到操作错误的端点引用
【发布时间】:2011-08-08 17:49:30
【问题描述】:

我使用了这个 wsdl 文件:http://ihexds.nist.gov:9080/tf6/services/xdsrepositoryb?wsdl 使用 wsdl.exe 生成代理 C# 代码文件。确切的命令是

"wsdl /o:D:\NIST_stuff /l:CS /protocol:SOAP12 http://ihexds.nist.gov:9080/tf6/services/xdsrepositoryb?wsdl"

现在,我需要调用名为“ProvideAndRegisterDocumentSetRequest”的操作。从 WSDL 中您可以看到该操作采用“ProvideAndRegisterDocumentSetRequestRequest”并返回“ProvideAndRegisterDocumentSetRequestResponse”:

<wsdl:operation name="ProvideAndRegisterDocumentSetRequest">
<wsdl:input message="ns2:ProvideAndRegisterDocumentSetRequestRequest" wsaw:Action="urn:ihe:iti:2007:ProvideAndRegisterDocumentSet-b"/>
<wsdl:output message="ns2:ProvideAndRegisterDocumentSetRequestResponse" wsaw:Action="urn:ProvideAndRegisterDocumentSetRequestResponse"/>
</wsdl:operation>

我知道 SOAP 请求 xml 应该是什么样子,并且我有一个准备该 XML 的应用程序。我希望通过某种方式将该 XML 作为请求正文传递。

但是在生成的代理类中,操作调用的代码是这样的:

public void ProvideAndRegisterDocumentSetRequest() {
        this.Invoke("ProvideAndRegisterDocumentSetRequest", new object[0]);}

当我这样调用方法时:

            WebProxy webProxy = new WebProxy("x.x.x.x:80", true);

            xdsrepositoryb xdsrepositoryb = new xdsrepositoryb();
            xdsrepositoryb.Proxy = webProxy;
            xdsrepositoryb.ProvideAndRegisterDocumentSetRequest();

我得到错误:

找不到操作的端点参考 (EPR) 是 http://ihexds.nist.gov:9080/tf6/services/xdsrepositoryb 和 WSA 行动 =

任何提示有什么问题吗?我是第一次接触网络服务。

【问题讨论】:

    标签: c# soap wsdl firewall wsdl.exe


    【解决方案1】:

    如果您仔细观察,只有 http 绑定的输入/输出,而不是 soap 1.1/1.2。

    所以你只能在body中自己调用带有httprequest和addxml的ws。

    【讨论】:

    • 你能看看我刚刚添加的附加描述吗(“进一步缩小/简化实验:”)这是我设法重现的类似简化场景
    • 嗨,如果你看你添加服务引用(wcf)而不是 web 服务引用 WCF 工作有点不同。如果您想在单击添加服务参考后以旧方式执行此操作,则在 Web 服务按钮中有一个高级按钮。这是一个链接kennyw.com/work/indigo/106
    • 是的,我也尝试过您所说的方式:“添加服务引用有一个高级按钮,并且在 Web 服务按钮中”,但这也有同样的问题。
    • 好的,但是就像我一开始说的那样,WSDL 看起来只接受 http 请求而不是特定于肥皂的请求。它有soap的绑定,但是webmethods没有参数。
    • 你是说这是不完整的: 跨度>
    猜你喜欢
    • 2014-01-06
    • 1970-01-01
    • 2016-08-24
    • 1970-01-01
    • 1970-01-01
    • 2011-08-24
    • 2015-05-26
    • 1970-01-01
    相关资源
    最近更新 更多