Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

AX2012 How to integrate an asynchronous web service

$
0
0

Hello,

I'm currently trying to enable AX 2012 to handle an external asychronous web service. I'm not shure if I'm using the correct technique.

I followed the instruction under the following article (Walkthrough: Calling an External Web Service from X++ [AX 2012]):

http://msdn.microsoft.com/en-us/library/hh500185.aspx

Because the execution time of the webservice could be longer than the time out ranges, the call could be made asynchronously. But I have no idea how I should receive the response of the web service asynchronously.

Doing the same task within .NET C# I created an eventhandler:

// Eventhandler for Callback

 

 

 

_customerService.RunDecisionCompleted += new MyWebService.RunDecisionCompletedEventHandler(_customerService_RunDecisionCompleted);

 

 

publicvoid _customerService_RunDecisionCompleted(object sender, MyWebService.RunDecisionCompletedEventArgs e)

{

 

 

if (null != e.Result)

{

 

 

// the Resulting Dataset is now available as

 

 

DataSet ResultData = newDataSet();

ResultData.ReadXml(

 

newXmlNodeReader(e.Result));

System.IO.

 

StreamWriter xmlSW = new System.IO.StreamWriter("C:\\Temp\\Test.xml");

ResultData.WriteXml(xmlSW,

 

XmlWriteMode.WriteSchema);

xmlSW.Close();

}

 

 

// Remove the EventHandler

_customerService.RunDecisionCompleted -=

 

new MyWebService.RunDecisionCompletedEventHandler(_customerService_RunDecisionCompleted);

}

How could I do the same task be done in AX 2012?

Thanks in advance for any help.

Sebastian


Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>