Hi!
Currently I'm using AX 2009 and I want to use a web service for currency exchange.
The steps I've made:
- Create a reference for the web service wdsl (www.mnb.hu/arfolyamok.asmx)
- Create a class for the web service
- classDeclaration --> empty
- main -->
Exchrate searchResults;
int i;
;
searchResults = daenetCurrencyConverterTest::getRate("HUF","EUR");
- getRate -->
daeNetCurrencyService2.MNBArfolyamServiceSoapClient soapClient;
ExchRate conversionrate;
str resp;
;
try
{
new InteropPermission(InteropKind::ClrInterop).assert();
soapClient = new daeNetCurrencyService2.MNBArfolyamServiceSoapClient();
conversionrate = soapClient.GetExchangeRates(systemdateget(),systemdateget(),_fromCurrency);
info(conversionrate);
CodeAccessPermission::revertAssert();
return conversionrate;
}
catch(Exception::CLRError)
{
throw error(AifUtil::getClrErrorMessage());
}
After the saving I've encounter the following error: the daeNetCurrencyService2.MNBArfolyamServiceSoapClient class doesn' cointain this function but with the intellisense I can list all of it's functions.
Any Idea?
*This post is locked for comments
I have the same question (0)