SOAP - howto?

  • Thread starter Thread starter mirek
  • Start date Start date
M

mirek

Hello,
at first - I'm newbie in C#, I came from the world of PHP.
In "my world" there is SOPA Client call wery simple and clear.
Something like this:

<?php
$client = new SoapClient("http://services.xmethods.net/soap/delayed-quotes.wsdl");

// getQuote is taken from WSDL specification
print($client->getQuote("ibm"));

?>

Does something like this exists in C#?

thanx
 
Mirek,

Absolutely. You can use the WSDL.EXE utility on the command line,
passing it the URL of the WSDL file to create a proxy class you can call.
If you have VS.NET, then you can add a web reference (right click on the
references folder), enter the URL for the WSDL file, and it will create the
proxy classes and add them to your project.

Hope this helps.
 
Nicholas Paldino [.NET/C# MVP] napsal(a):
Mirek,

Absolutely. You can use the WSDL.EXE utility on the command line,
passing it the URL of the WSDL file to create a proxy class you can call.
If you have VS.NET, then you can add a web reference (right click on the
references folder), enter the URL for the WSDL file, and it will create the
proxy classes and add them to your project.

Hope this helps.

Well, thanx,

but what will happen, when WSDL changes? Should I create new proxy manually?

M.
 
Mirek,

If the WSDL changes, yes, you will have to create a new proxy. The
proxy is a way of creating strongly typed interfaces to the web interfaces,
so if you change the contract, you have to change the proxy. This is the
downside of strong-typing anything. You must abide by the contract.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Mirek Novak said:
Nicholas Paldino [.NET/C# MVP] napsal(a):
Mirek,

Absolutely. You can use the WSDL.EXE utility on the command line,
passing it the URL of the WSDL file to create a proxy class you can call.
If you have VS.NET, then you can add a web reference (right click on the
references folder), enter the URL for the WSDL file, and it will create
the proxy classes and add them to your project.

Hope this helps.

Well, thanx,

but what will happen, when WSDL changes? Should I create new proxy
manually?

M.
 
Thank you very much for your time.
Now I have to study WSDL :(
For PHP code, there is no such WSDL generator :(

M.
 
Back
Top