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 GP (Archived)

GP Web Services Error: "There is an error in XML Document"

(0) ShareShare
ReportReport
Posted on by 1,588

Can you tell me what is wrong with this XML document generated via the .NET API and sent to the service endpoint? My client is using GetItemByKey() and stating their code works in one company but not in a new company. They further state that one item they test works but this one fails.

GetItemByKeyErrorRedacted.png

<?xml version="1.0"?>
<RequestObjects>
  <ItemKey xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance">
    <CompanyKey>
      <Id xmlns="schemas.microsoft.com/.../01">5</Id>
    </CompanyKey>
    <Id>75000501</Id>
  </ItemKey>
  <Context xmlns:xsd="www.w3.org/.../XMLSchema" xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../01">
    <OrganizationKey xsi:type="CompanyKey">
      <Id>5</Id>
    </OrganizationKey>
    <CultureName />
    <CurrencyType>Transactional</CurrencyType>
    <TenantName />
  </Context>
  <string>Microsoft.Dynamics.GP.SalesItem</string>
  <string>Microsoft.Dynamics.GP.Kit</string>
  <string>Microsoft.Dynamics.GP.Fee</string>
  <string>Microsoft.Dynamics.GP.Service</string>
</RequestObjects>

*This post is locked for comments

I have the same question (0)
  • Derek Albaugh Profile Picture
    on at

    Hello Chad,

    Is this all the information you get when clicking on both the 'View Exception Detail' and 'View Request XML'?

    The information above doesn't tell us much other than the company ID is 5 and the currency type is transactional.

    The more information you can dig out of the Web Services Exceptions Console and/or Event Viewer, the better.

    Thanks,

  • chadbruels Profile Picture
    1,588 on at

    Here is the Exception Detail:

    Inner_5F00_Exception.png

    and the full Stack Trace Output:

       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)

       at Microsoft.Dynamics.Common.SerializationManager.Materialize(String xml, Type targetType)

       at Microsoft.Dynamics.GP.EConnectAdapter.GetByKey(IKey key, Context context, Type type)

       at Microsoft.Dynamics.GP.GreatPlainsBusinessService.GetByKeyFromSource(Key key, Context context, Type type)

       at Microsoft.Dynamics.Common.BusinessService.GetByKey(Key key, Context context, Type[] types)

    and the Inner Exception Detail:

    Inner_5F00_Exception.png

    and the Inner Exception Stack Trace Output:

       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFee.Read31_ABCCode(String s)

       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFee.Read32_NullableOfABCCode(Boolean checkType)

       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFee.Read59_Fee(Boolean isNullable, Boolean checkType)

       at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderFee.Read60_Fee()

  • Verified answer
    Derek Albaugh Profile Picture
    on at

    The "is not a valid value for ABCCode" is normally referring to that same ABCCode column in the IV00101 table, when we see it referenced by the GetItemByKey method.

    The values for ABCCode are 1-4:

    1 - (none)

    2 - A

    3 - B

    4 - C

    Take a look at the IV00101 (Item Master) table for records with invalid ABCCODE values and see if that doesn't explain why this works in one company database but not the other.

    Thanks

  • chadbruels Profile Picture
    1,588 on at

    I just arrived at that conclusion as well. Glad to have supporting information on it. They have many items whose ABCCode value is zero in IV00101.

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 GP (Archived)

#1
mtabor Profile Picture

mtabor 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans