Problems with VS 2008

Forum for discussing SOAP, and how it is used in the E-conomic API

Problems with VS 2008

Postby cwe » Tue Jun 02, 2009 1:24 pm

When you make a web reference to https://www.e-conomic.com/secure/api1/E ... rvice.asmx in Visual Studio 2008, it will try to download the following WSDL: http://www.e-conomic.com:9080/secure/ap ... .asmx?wsdl which doesn't exists.
If you instead made a service reference to https://www.e-conomic.com/secure/api1/E ... rvice.asmx it will work, but the authentication will fail.

The problem is that Cookies per default isn't allowed in service references, because it isn't the "correct way" to do it. But if you initialize the service reference like this:

var ws = new ServiceReference1.EconomicWebServiceSoapClient();
((BasicHttpBinding)ws.Endpoint.Binding).AllowCookies = true;

It will work allso without using CookieContainers.
-
cwe
 
Posts: 10
Joined: Tue May 19, 2009 3:34 pm

Return to SOAP