views:

191

answers:

1

I wish to call a web service, using SOAP, from PHP (using the included SOAP extension). The web service in question is http://www.webservicex.net/CurrencyConvertor.asmx

Now the Currency type is an enum, and I cannot figure out how to work with these in PHP in order to be able to call the 'ConversionRate' function. I know I have to do something with a class map, but I can only find limited and unhelpful information on this topic. Can anyone help? A working example maybe?

Thanks!!!!

+3  A: 

The enum here only defines legitimate values, that is your data type is actually a string of one of those values.

Here's some psuedo-code to get you on your way:

$from_currency = "AFA";

$to_current = "ALL";

$soap_handler->ConversionRate($from_currency, $to_currency);

$exchange_rate = $soap_handler->response();

Nerdling