我正在嘗試將this WCF service reference添加到我的Visual Studio 2012 C#項目中。當我嘗試加載通過添加服務對話框的服務,我得到這個錯誤嘗試將Web服務引用添加到項目時的HTTP狀態400
There was an error downloading ' https://api.onecallnow.com/WebService/3.1/soap.svc/_vti_bin/ListData.svc/ $metadata'. The request failed with HTTP status 400: Bad Request. Metadata contains a reference that cannot be resolved: ' https://api.onecallnow.com/WebService/3.1/soap.svc '. Content Type application/soap+xml; charset=utf-8 was not supported by service https://api.onecallnow.com/WebService/3.1/soap.svc . The client and service bindings may be mismatched. The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'.. If the service is defined in the current solution, try building the solution and adding the service reference again.
我看了這個錯誤等問題,但幾乎所有的人建議改變一些有關的WCF服務配置,我沒有訪問權限。
有人建議該消息的最後部分意味着我使用一個不同的版本比SOAP服務的使用,但我沒有看到任何選項來改變,在添加Web服務對話框。
有人可以幫助我正確添加此服務參考?
是的,我花了很長時間才發現沒有元數據發佈就無法使用服務。 –