HTTP status 400 when trying to add a web service link to a project

I am trying to add this WCF service link to a Visual Studio 2012 C # project. When I try to load a service through the add service dialog, I get this error

An error occurred while loading ' https://api.onecallnow.com/WebService/3.1/soap.svc/_vti_bin/ListData.svc/ $ metadata'. Request failed with HTTP status 400: Invalid request. The metadata contains a link that cannot be resolved: ' https://api.onecallnow.com/WebService/3.1/soap.svc '. Content Type Application / Soap + XML; charset = utf-8 is not supported by the https://api.onecallnow.com/WebService/3.1/soap.svc service . Client and service bindings may not be compatible. The remote server returned error: (415) The message cannot be processed because the content type 'Applications / 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 creating a solution and adding the link to the service again.

I looked at other questions with this error, but almost all of them suggest changing something about the WCF service configuration, which I do not have access to.

Someone suggested that the last part of the message means that I am using a different version of SOAP than the service is used, but I do not see any parameters for changing this parameter in the Add Web Service dialog box.

Can someone help me add this link correctly?

+3
source share
1 answer

If you start the service in a browser, you will see the following:

enter image description here

The service owner has disabled metadata publishing, so you cannot add a service link through the Add Service Reference dialog box.

WSDL , -, ServiceModel Meatadata (SvcUtil.exe ); , .

, , , .

+5

All Articles