RSS

AIF Webservice : Tracing Web Service calls

27 Oct

When using AIF through web services, you can be in the dark when you want to know what’s really going on in there.

I was looking in to the web.config file suddenly i have seen a tag to trace the AIF Web services.

 

<;system.diagnostics>
<;!-- This is used for enabling tracing in retail and debug builds.
AIF Service processing stack outputs and information
messages used for debugging.
Possible values for the switch are Off, Warning,
Information, Critical, Verbose.
Change the switchValue to Information to enable tracing.
-->;
<sources >
<;source name="AifServiceProcessing" switchValue="Information">
<;listeners >
<;add name="TextWriterListener"
type="System.Diagnostics.TextWriterTraceListener"
initializeData="AifServiceTrace.webinfo" >;
</add>
<;remove name="Default" />
<;/listeners>
<;/source>
<;/sources>
</system.diagnostics>

 

by default the Inner tag switchValue="Off”> and i have changed in to  switchValue="Information">. I found this on MSDN and will show an example here of what the result of the tracing shows.

i have invoked the service through .net class . there should be a file named AifServiceTrace.Webinfo present with the tracing information : 

The following information can be viewed :

  • UserId’s
  • Message ID
  • Source and destination endpoint
  • Key Data XML
  • Return Data from Ax

 

AifServiceProcessing Information: 0 : SourceEndpointUser : rajdiscoms\axbcproxy
AifServiceProcessing Information: 0 : Logged on to Dynamics Ax successfully.
AifServiceProcessing Information: 0 : Incoming MessageId : 5af19da1-9532-4842-9522-2f499f012e50
AifServiceProcessing Information: 0 : Submitting User : rajdiscoms\axbcproxy
AifServiceProcessing Information: 0 : External Action : http://schemas.microsoft.com/dynamics/2008/01/services/BiliingDeterminantsService/create
AifServiceProcessing Information: 0 : Source Endpoint
AifServiceProcessing Information: 0 : Destination Endpoint
AifServiceProcessing Information: 0 : Parameter in request : <;BiliingDeterminants xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/BiliingDeterminants"><SenderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><Rdm_BillingDeterminants class="entity"><_DocumentHash xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><BinderNo>798080</BinderNo><DiscomCode xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><OfficeCode>80980</OfficeCode><ScheduledForBillMonth xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><ScheduledForBillYear xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TimeStamp xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TokenIssueDate xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TokenNo>90124</TokenNo><TotalConsumers xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></Rdm_BillingDeterminants></BiliingDeterminants>
AifServiceProcessing Information: 0 : Aif Message Xml Request: : <;?xml version="1.0" encoding="utf-16"?><Envelope xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message"><Header><MessageId>{5af19da1-9532-4842-9522-2f499f012e50}</MessageId><SourceEndpointUser>rajdiscoms\axbcproxy</SourceEndpointUser><SourceEndpoint /><DestinationEndpoint /><Action>http://schemas.microsoft.com/dynamics/2008/01/services/BiliingDeterminantsService/create</Action></Header><Body><MessageParts xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/Message"><BiliingDeterminants xmlns="http://schemas.microsoft.com/dynamics/2008/01/documents/BiliingDeterminants"><SenderId xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><Rdm_BillingDeterminants class="entity"><_DocumentHash xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><BinderNo>798080</BinderNo><DiscomCode xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><OfficeCode>80980</OfficeCode><ScheduledForBillMonth xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><ScheduledForBillYear xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TimeStamp xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TokenIssueDate xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /><TokenNo>90124</TokenNo><TotalConsumers xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" /></Rdm_BillingDeterminants></BiliingDeterminants></MessageParts></Body></Envelope>
AifServiceProcessing Information: 0 : Return value from DynamicsAx : <;EntityKey xmlns="http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey"><KeyData><KeyField><Field>TokenNo</Field><Value>90124</Value></KeyField></KeyData></EntityKey>

 

happy Daxing Smile

Advertisements
 

Tags: ,

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: