我在IIS上托管了wcf服务。 https://sample.azurewebsites.net/service1.svc。当我尝试从浏览器访问它时,我可以访问它,也可以看到WSDL。
我尝试使用SoapUI测试其中的一种方法。我能够创建新的Soap项目。我可以在SoapUI中看到其中的所有方法。当我在Soap UI中点击send时,我看到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>
Resposne:
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)