Home > Ax Technical > Debugging AIF

Debugging AIF

October 23, 2006 Leave a comment Go to comments

<![CDATA[

 
 
                     AIF is strongly evolving as a Integration point for Ax 4.0. This is evident from the extent it is explored and posted in several blogs……… like
 
               Outbound webservice Aif – David Pokluda
 
 
                                  I am also putting in some effort these days exploring AIF, infact i was even successful in doing Inbound and Outbound operations. A general practice is to use batch processing for AIF Filesystem adapter, When you do development you might be tired of keep on invoking a batch job, instead you can write a job like this for outbound……….
 
                       static void AifOutboundJob()
               {
                   new AifOutboundProcessingService().run();
                   new AifGatewaySendService().run();
               }
 
and for Inbound
 
                      static void AifInboundJob()
              {
                  new AifGatewayReceiveService().run();
                  new AifInboundProcessingService().run();
              }
this would help you much……..
 
If you want to debug for any errors in Aif then you have to do some code changes to any  one of these classes AifInboundProcessingService or AifOutboundProcessingService depending upon the action you are carrying out.
 
in any of this class you would find a code like this (approx line num 60, 65) in the method run
 
                  runas(message.sourceEndpointAxUserId(),
                        classnum(AifInboundProcessingService),
                        staticmethodstr(AifInboundProcessingService, processAsUser),
                        [message.pack(), messageId]);
 
just comment this code and change the scope of the static method processAsUser from the sames class to public and then call it exactly as below in the run method
 
                             AifInboundProcessingService::processAsUser([message.pack(), messageId]);
 
this would allow you to debug the code in Aif and the Axd’s but make sure you delete these changes once you complete your debugging.
 
…………………   Theres more to dig and more to know                             

]]>

Advertisements
  1. No name
    April 20, 2006 at 5:06 pm

    When I tried your solution I got error since message object is null!

  2. Kamal
    April 20, 2006 at 5:06 pm

    Sorry actually i placed the code for inbound there, try this and tell me if this work
     
    AifOutboundProcessingService::processAsUser([outboundProcessingQueue]);

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: