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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

AX-DEV: How to debug a webservice reference to see soap message ?

(0) ShareShare
ReportReport
Posted on by 7,437

Hi,

I receive next error: "Error in deserializing body of reply message for operation 'GetTopNSalesOrderByState'. There is an error in XML document (1, 285). The maximum nametable character count quota (16384) has been exceeded while reading XML data. The nametable is a data structure used to store strings encountered during XML processing - long XML documents with non-repeating element names, attribute names and attribute values may trigger this quota. This quota may be increased by changing the MaxNameTableCharCount property on the XmlDictionaryReaderQuotas object used when creating the XML reader. Line 1, position 285."

 The strange thing is that the webservice worked before. I do not see how the CLR object can be debugged. The webservice generates a pcb file. How can I attach to it and see what soap message is received?

J.

*This post is locked for comments

I have the same question (0)
  • user5555 Profile Picture
    7,437 on at

    Friendly bump.

    We reverted the solution from our version system and create a test webservice only having a string as return. It seems that a bool? is not possible. However, we cannot verify this since we cannot read out the soap xml message conversation. At least we will make our data types less complex. However, why a bool is a problem: weird.

    Any help appreciated.

    J.

  • akuehn Profile Picture
    1,995 on at

    Hi,

    i think there are two options.

    1. You can enable tracing on the webservice (iis). With it you can trace all teh message send between AX you your "consumer".
    Please take a look at http://msdn.microsoft.com/en-us/library/cc967372.aspx for mor information.

    2. You can place a breakpoint in your code to be able to debug the code.
    Please take a look at the whitepaper "Tips for creating Services in Microsoft Dynamics AX 2009" availabel here:
    http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=90388b14-fb8c-4633-a255-28ff7146c5b2

    All the needed steps to be able to debug the webservice call are described there.

    Hope this helps you.

  • user5555 Profile Picture
    7,437 on at

    Hi,

    Thank you. The information you provided is for AIF services using the IIS server behind the AOS. I am interesting in debugging a service reference which is not an AIF as it is provided by a third party system. I can debug using the same methology you describe here if I would be the owner of the third party system. But in cases you are not , I am wondering how to interact with the CLRObject holding the soap client. It throws errors, but how to see the messages received by the third party webservice?

    J.

  • akuehn Profile Picture
    1,995 on at

    Hi,

    i think one way could be to use Visual Studio (first) to get your webservice-calls working.

    Visual Studio provides you you more control (i.e. debugging features) as AX with the generated proxy assembly.

     

  • user5555 Profile Picture
    7,437 on at

    Hi,

    That is what I did, but the problem lies in the Marshalling of objects in AX. I have the feeling a boolean/ bit/ bool is not marshalled wel. Maybe AX uses as short int for it. I am not sure. We reverted part of the webservices and now we got it work. In VS you can see indead the messages and test it. We also create our own webservices so that is easy to do. The tough part lies in Ax. I found on the setup of AIF that you can define a logging and this change on the app.config is done through AX, but where it finally logs. You can set what messages you want to log, also for web service, but I did not further explore this option.

    I think AIF debugging on the IIS webservice can go directly to there, but you can also use a sniffer to read the soap messages, however, for some reason the webservices of AX are not sent to the socket.

    J.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans