Re: Comment récupérer des données sur internet ??

Posté par petervu le 27/8/2003 13:07:42
Bonjour,

It is not exactly an answer to your question but for
currency conversion ('conversion devises') there is a free
soap service available.

In WD75 import a Soap Service
(http://www.webservicex.net/CurrencyConvertor.asmx?WSDL)

Change the "ConversionRate()" procedure created by WD
(importing a WSDL is not always working very good)

---
PROCEDURE ConversionRate(FromCurrency, ToCurrency)

//Created by WD - not working
//Soap.XMLParam[1]=FromCurrency
//Soap.XMLParam[2]=ToCurrency

SOAP.Name[1]="FromCurrency"
SOAP.Type[1]=SOAPFloatType
SOAP.Value[1]=FromCurrency

SOAP.Name[2]="ToCurrency"
SOAP.Type[2]=SOAPFloatType
SOAP.Value[2]=ToCurrency
//

bRes is boolean
bRes=SOAPRun("http://www.webservicex.net/CurrencyConvertor.asmx",
"ConversionRate", "http://www.webserviceX.NET/",
"http://www.webserviceX.NET/ConversionRate")

IF NOT bRes THEN
IF SOAPError(SOAPErrMessage)~="" THEN
Error(ErrorInfo())
ELSE
Error(SOAPError(SOAPErrMessage))
END
END

RESULT SOAPGetResult(SOAPResult)

--
The result is the conversion rate.

--
Peter


Cette contribution était de : http://old.wdforge.org/newbb/viewtopic.php?forum=5&topic_id=233&post_id=763