web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX2009 web service for Currency exchange with error

(0) ShareShare
ReportReport
Posted on by

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)
  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    Maybe the method name itself is correct, but the number and/or types of parameters are wrong. Please review them.

  • Community Member Profile Picture
    on at

    Hi!

    Thanks for your response!

    I think the parameters are correct:

    "2.6. GetExchangeRates

    Input: string startDate, string endDate, string currencyNames"

  • Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    You're not calling the specification, you're calling a proxy class. Please look at parameters of the actual method you're calling.

    For example, the proxy may accept a single request object with three properties (for startDate, endDate and currencyNames). It's an implementation detail that doesn't violate the specification in any way.

  • Community Member Profile Picture
    on at

    Sorry for my beginner attitude, here is the parameter list for the method, how can I add this request object?

    parameter.png

  • Verified answer
    Martin Dráb Profile Picture
    239,031 Most Valuable Professional on at

    Simply create its instance (in the same way as you created the SOAP client) and the use its methods to pass data into it.

  • Community Member Profile Picture
    on at

    soapClient = new daeNetCurrencyService2.MNBArfolyamServiceSoapClient("configurationName");

    You have to fill configurationName parameter when creating your soapClient object.

  • Community Member Profile Picture
    on at

    Thank you for the advices, I have made the changes with the following:

    create the soapClient, create a requestBody, a responseBody, and an array to store the response with the result of the request. From the array I extract the info what I need, and now it's working like a charm. Thank you again.

  • Community Member Profile Picture
    on at

    Hi!

    Thank you for your advise, but I don't need to fill the client parameter for this webservice

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans