首页 > 解决方案 > 未找到使用 SoapUI 404 的 WCF 发布

问题描述

我在 IIS 上托管了 wcf 服务。https://sample.azurewebsites.net/service1.svc。当我尝试从浏览器访问它时,我可以访问它并且还可以看到 WSDL。

我尝试使用 SoapUI 测试其中的一种方法。我能够创建新的肥皂项目。我可以在 SoapUI 中看到其中的所有方法。当我在 Soap UI 中点击发送时,我看到 404 未找到。

要求 :

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:tem="http://tempuri.org/">
   <soap:Header/>
   <soap:Body>
      <tem:getSomeData>
         <!--Optional:-->
         <tem:inputCode>?</tem:inputCode>
      </tem:getSomeData>
   </soap:Body>
</soap:Envelope>

回应:

HTTP/1.1 404 Not Found
Cache-Control: private
Server: Microsoft-IIS/10.0
Set-Cookie: locale=en-GB; path=/
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Set-Cookie: ARRAffinity=f7e6867f2c1126df6e85985ad62253202300d1c2e74ff407dbd0aca8c239ebb9;Path=/;HttpOnly;Domain=sample.azurewebsites.net
Date: Thu, 03 Jan 2019 05:37:26 GMT
Content-Length: 0

日志:

Thu Jan 03 11:10:51 IST 2019:DEBUG:Attempt 1 to execute request
Thu Jan 03 11:10:51 IST 2019:DEBUG:Sending request: POST /service1.svc HTTP/1.1
Thu Jan 03 11:10:51 IST 2019:DEBUG:Receiving response: HTTP/1.1 301 Moved Permanently
Thu Jan 03 11:10:51 IST 2019:DEBUG:Connection can be kept alive indefinitely
Thu Jan 03 11:10:51 IST 2019:DEBUG:Attempt 1 to execute request
Thu Jan 03 11:10:51 IST 2019:DEBUG:Sending request: POST /service1.svc HTTP/1.1
Thu Jan 03 11:10:52 IST 2019:DEBUG:Receiving response: HTTP/1.1 404 Not Found
Thu Jan 03 11:10:52 IST 2019:DEBUG:Connection can be kept alive indefinitely
Thu Jan 03 11:10:52 IST 2019:INFO:Got response for [WSHttpBinding_IService1.getSomeData:Request 2] in 1124ms (0 bytes)

标签: wcfhttp-status-code-404soapui

解决方案


推荐阅读