views:

18

answers:

1

Hi Friends, I would like to create a SOAP Web service for the followıng wsld http://www.webservicex.com/CurrencyConvertor.asmx?WSDL Could you please explain how to do this? The following code is not working... Please help me..

ini_set("soap.wsdl_cache_enabled", "0");
$client = new SoapClient("http://www.webservicex.com/CurrencyConvertor.asmx?wsdl");
$CURR = array("FromCurrency" => "USD","ToCurrency" => "INR");
$scramble = $client->ConversionRate($CURR);
$mirror = $client->ConversionRateResponse($scramble);

Thanks, Praveen J

A: 

Let's start with your client URL:

http://www.webservicex.com/CurrencyConvertor.asmx?wsdl

This is wrong. The ?WDSL URL is NOT the URL you use for CALLING the web service, it is the URL you use to retrieve the WDSL that describes the web service. THis is used by automatic tools to generate a wrapper.

http://www.webservicex.com/CurrencyConvertor.asmx

is the "real" URL that you use to execute operations.

http://www.webservicex.com/CurrencyConvertor.asmx?op=ConversionRate

Has a more invormation on the conversion per se, including the exact parameters with naming you need for the Post and GET operations, including examples.

TomTom
So other than the URL - Is the code ok? or ı need to change any thıng? I dont know how to pass the parameters..
praveenjayapal
CHeck my second link- it has examples. I do not do PHP, so I can not comment on the code. But ther are complete HTTP layer examples you can use to check things.
TomTom