mk3000 4/29/2016 11:02:32 AM

There is an error in XML document(1, 980).

Hello all,

Having trouble retrieving the vendor item key using GP web services.  The system throws out a system exception 'There is an error in XML document(1, 980).' This happens in line 2 in the code excerpt below:

ItemVendorKey itemVendorKey = new ItemVendorKey() {ItemKey = new ItemKey() { Id = item }, VendorKey = new VendorKey() { Id = vend }};
ItemVendor itemVendor = wsDynamicsGP.GetItemVendorByKey(itemVendorKey, context);
itemVendor.VendorItemNumber = vitem;

Stack Trace:

   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
   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)

Request XML:

<?xml version="1.0"?>
<RequestObjects>
  <ItemVendorKey xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <ItemKey>
      <Id>86549</Id>
    </ItemKey>
    <VendorKey>
      <Id>351</Id>
    </VendorKey>
  </ItemVendorKey>
  <Context xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/dynamics/2006/01">
    <OrganizationKey xsi:type="CompanyKey">
      <Id>9</Id>
    </OrganizationKey>
    <CultureName />
    <CurrencyType>Transactional</CurrencyType>
    <RoleKey>
      <Id xmlns="http://schemas.microsoft.com/dynamics/security/2006/01">e18b321a-9548-48fb-b75a-dee0a618ddaa</Id>
    </RoleKey>
    <TenantName />
  </Context>
  <string>Microsoft.Dynamics.GP.ItemVendor</string>
</RequestObjects>

Thank you in advance!

Mike

Version: GP 2013
Section: .NET Development, Dynamics GP, eConnect, Web Services


Table Definition Quick Links
All Tables
SOP Tables
RM Tables
GL Tables
POP Tables
HR Tables
PM Tables
UPR Tables
IV Tables
Olympic Tables
3