WCF 指向 WSDL 的两个 URL 之间的差异

发布于 2024-08-24 03:38:56 字数 1609 浏览 7 评论 0原文

浏览器中的 URL:http://localhost:12345/FRB.EC.BMI。 WebSvc/Datafaction.svc

显示:

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl

为什么“svcutil”行中的 URL 通常与 URL 中的内容不同,如何更改它?我认为有一个属性可以添加到我的代码中?或者是否有任何理由担心它们是不同的。

在我的具体情况下,我使用的是无法访问 Internet 的 VMWare 映像,并且我使用端口号来避免与 SharePoint 发生冲突。当我单击 svcutil 行上的 URL 时,它可以在浏览器中正常加载。但在 SOAP-UI 中,我没有收到对该 URL 或我上面首先提到的末尾添加“?wsdl”的 URL 的任何响应。

谢谢尼尔

·沃尔特斯

更新: Soap-UI 挂在这个 URL 上 - 它在上面的 WSDL 中找到了它。

<wsdl:import namespace="http://FRB.EC.BMI.WebSvc/" location="http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl=wsdl0" /> 

即使当我将 WSDL 保存到文件并将该文件与 SOAP-UI 一起使用时,SOAP-UI 仍然尝试从 IIS 加载第二个 =wsdl0。它没有收到错误或响应。它只是一直寻找几分钟,直到我点击取消。当我在浏览器的 URL 中粘贴带有 =wsdl0 的相同 URL 时,它可以正常打开(然后必须打开另外三个 xsd 的内部)。

另请注意,我也在尝试 WCFTestClient.exe,它接受 URL,但当我单击 Invoke 按钮时会给出以下信息:(

Could not connect to 
http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc. TCP error code 10065: A socket operation was attempted to an unreachable host 192.168.159.129:12345. 

我还不确定上述 IP 地址来自何处。)

URL in browser: http://localhost:12345/FRB.EC.BMI.WebSvc/Datafaction.svc

shows this:

You have created a service.

To test this service, you will need to create a client and use it to call the service. You can do this using the svcutil.exe tool from the command line with the following syntax:

svcutil.exe http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl

Why does the URL in the "svcutil" line often differ from what is in the URL, and how do I change it? I think there is an attribute to add to my code? Or is there any reason to even be concerned that they are different.

In my specific case, I'm on a VMWare image that has no internet access, and I'm using the port number to avoid conflicts with SharePoint. When I click on the URL on the svcutil line it loads okay in the browser. But in SOAP-UI, I'm not getting any response to either that URL or the URL I first mentioned above with "?wsdl" added to the end.

Thanks,

Neal Walters

Update:
Soap-UI is getting hung on this URL - which it finds inside the above WSDL.

<wsdl:import namespace="http://FRB.EC.BMI.WebSvc/" location="http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc?wsdl=wsdl0" /> 

Even when I save WSDL to file and use that file with SOAP-UI, SOAP-UI is still trying to load the second =wsdl0 from IIS. It is not getting error nor response. It just keeps looking for several minutes until I hit cancel. When I paste same URL with =wsdl0 in URL of browser it opens fine (and then has three more xsd's internal that will have to be opened).

Also please note that I am also trying WCFTestClient.exe and it accepts the URL but when I click the Invoke button gives this:

Could not connect to 
http://sfbztkdev01v.biztalkdev.corp.firstrepublic.com:12345/FRB.EC.BMI.WebSvc/Datafaction.svc. TCP error code 10065: A socket operation was attempted to an unreachable host 192.168.159.129:12345. 

(I'm not yet sure where the above IP address is coming from.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

仙女山的月亮 2024-08-31 03:38:56

最后的 ?wsdl 就可以了,它总是被添加的。如果您可以在浏览器中打开它,只需保存 wsdl 文件,然后在 SOAP UI 中打开它

?wsdl at the end is fine, it is always added. If you can open it in browser just save the wsdl file then open it in SOAP UI

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文