Hi,
I'm novice by complete to webservices et al.
I've created successfully a webservice and referenced it
in a console application. By simplification let assume that
the webservice contains a webmethod, the 'classic'
CelsiusToFarenheit (string Celsius).
Once referenced i can see my new namespace
ServiceReference1 with the following classes inside:
CelsiusToFahrenheitRequest
CelsiusToFahrenheitRequestBody (it contains the property Celsius)
CelsiusToFahrenheitResponse
CelsiusToFahrenheitResponseBody (it contains the property CelsiusToFahrenheitResult)
Service1SoapClient (with 5 overloads at the instantiation).
and 2 interfaces:
IService1Soap
IService1SoapChannel
I've intantiated the first 4 classes and toying with it to no avail.
How can i obtain :
string Fahreheit = ......
Thanks
How to: Consuming webservice in console application (C#)
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Mahesh ChandRank #1 · 393K pointsPosted Feb 11, 2011, 1:12 PM EST
Try defining your namespace and then see what classes are available.
Create an instance of the class and see what members are available.
Miguel Castanuela2 pointsPosted Feb 11, 2011, 1:29 PM EST
i've checked and all respect to namespace is correct,
the classes are the same as my original post, in fact
i deleted the referenced service, re-add the same
but changing the namespace, and the result is the
same, i mean, i see all pertinent classes, the problem
is how to code to obtain the value of Fahrhenheit.