如何判断WCF服务需要运行的内容?

时间:2014-04-10 13:57:19

标签: wcf

我对WCF很新。正如我所料,我收到了一些wsdl和XSD的拉链,而不是获得服务的地址。我解压缩它们,并将它们作为Web引用添加到我的ASP.NET 4.0应用程序中。

在浏览类时,顶级类有一个名为userToken的字符串属性。我从我正在使用的那个人那里收到它,但是它没有加密......仅仅是一个简单的字符串,它似乎是作为自定义类的一部分传入的,而不是WCF的本地字符串。

以下是代码:

    Dim BVSService As New BVS_Construct_MSPortTypeClient 'The Service
    Dim oInput As New BVSDATAINPUT 'Pass to service
    Dim oOutput As New BVSDATAOUTPUT 'Received from service


       'POPULATE INPUT DATA
        oInputHeader.userToken = "BVSTester"

        'Run Service
        BVSService.Open()

        oOutput = BVSService.inquireByDemog(oInput)

当我运行它时,它失败并显示以下消息:

“System.ServiceModel.EndpointNotFoundException:在http:/// BVS_DataService / 20090727上没有可以接受该消息的端点。这通常是由不正确的地址或SOAP操作引起的”

此外它还说“无法连接到远程服务器。”

我注意到的第一件事是wsdl指向的路径似乎是在参数中发送(30090727; DOB)。哪个不应该,我敢肯定。

有什么明显的我遗失了吗?

以下是来自Web.Config的信息......

  <endpoint address="http://<myServer>/SOLQ_DataService/20090727" binding="basicHttpBinding" bindingConfiguration="SOLQ_Construct_MSSOAP_HTTP_Binding" contract="SOLQService.SOLQ_Construct_MSPortType" name="SOAP_HTTP_Port4"/>
</client>

0 个答案:

没有答案
相关问题