tsweatt
tsweatt

Reputation: 85

Nested Containers in AX 2012 R2

Scenario:

An Aif Web Service handles incoming calls from a web application. There is a Visual Studio project in the AOS that contains objects that the service uses to communicate with other applications.

I need to move some of that processing that happens after the service call is made to the SysOperationFramework.

The SOF can't directly work with classes from our Visual Studio project -- so I need to make them into a container (these objects, or their data, don't exist in AX yet, they've just been passed in to the Aif Web Service).

Example class Structure

Class Parent
{
    List<SubClass> Child;
    List<SubClass2> Child2;

    int id;
    str name;

}

How can I pack this data in to a container (probably multiple containers) so that it can be reconstructed by unpack()ing the container when the actual batch process is running?

Upvotes: 1

Views: 885

Answers (1)

Alex Kwitny
Alex Kwitny

Reputation: 11564

It sounds like you just need to use the SysOperationHelper class methods:

SysOperationHelper::base64Encode(...)

SysOperationHelper::base64Decode(...)

See http://www.artofcreation.be/2011/08/22/ax2012-sysoperation-part-1-data-contracts-and-service-operations/ for some examples of use.

Upvotes: 3

Related Questions