eConnectType eConnect = new eConnectType();
// Instantiate a IVItemMasterType schema object
POPReceivingsType popRec = new POPReceivingsType();
taPopRcptLineInsert_ItemsTaPopRcptLineInsert newtaPopRcptLineInsert_ItemsTaPopRcptLineInsert = new taPopRcptLineInsert_ItemsTaPopRcptLineInsert()
{
ITEMDESC = popRctLineInsert.Description,
ITEMNMBR = popRctLineInsert.Item,
LOCNCODE = popRctLineInsert.Location,
POLNENUM = int.Parse(popRctLineInsert.SequenceNum),
PONUMBER = popRctLineInsert.VendorItem,
QTYSHPPD = decimal.Parse(popRctLineInsert.ReceivedAmount),
VENDORID = popRctLineInsert.VendorItem,
POPTYPE = 3,
BOLPRONUMBER= "<![CDATA[ ]]>",
CMMTTEXT ="<![CDATA[ ]]>",
CURNCYID ="<![CDATA[ ]]>",
CostCatID="<![CDATA[ ]]>",
InventoryAccount = "<![CDATA[ ]]>",
JOBNUMBR ="<![CDATA[ ]]>",
Landed_Cost_Group_ID ="<![CDATA[ ]]>",
POPRCTNM ="<![CDATA[ ]]>",
ProjNum = "<![CDATA[ ]]>",
Purchase_Item_Tax_Schedu = "<![CDATA[ ]]>",
Purchase_Site_Tax_Schedu = "<![CDATA[ ]]>",
receiptdate = DateTime.Now.ToShortDateString(),
UOFM = "<![CDATA[ ]]>",
USRDEFND1 = "<![CDATA[ ]]>",
USRDEFND2 = "<![CDATA[ ]]>",
USRDEFND3 = "<![CDATA[ ]]>",
USRDEFND4 = "<![CDATA[ ]]>",
USRDEFND5 = "<![CDATA[ ]]>",
VNDITDSC = "<![CDATA[ ]]>",
VNDITNUM = "<![CDATA[ ]]>"
};
popRec.taPopRcptLineInsert_Items = new taPopRcptLineInsert_ItemsTaPopRcptLineInsert[1] { newtaPopRcptLineInsert_ItemsTaPopRcptLineInsert };
using (GenericEconnectHelper m_geh = new GenericEconnectHelper())
{
switch (companyType)
{
case EGenConType.Kretek_International:
m_geh.ConnectionState = EGenConType.Kretek_International;
break;
// default:
//return new List<object>() { new { Error = "gpCompanyId Not recognized" } };
}
eConnect.POPReceivingsType = new POPReceivingsType[] { popRec };
string genericEconnectHelperGenericSerializeAnObject = GenericEconnectHelper.GenericSerializeAnObject(eConnect);
bool buff = this.CreateEntity(m_ConnectionString, genericEconnectHelperGenericSerializeAnObject);
//bool m_gehGenericCreateEntity = m_geh.GenericCreateEntity(genericEconnectHelperGenericSerializeAnObject);
HERE IS MY XML (WHICH IS VALID) Keep getting the following error "
"The Creator of this fault did not specify a reason"
the state of eConnectClient is open...
<eConnect xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<POPReceivingsType>
<eConnectProcessInfo xsi:nil="true" />
<taRequesterTrxDisabler_Items xsi:nil="true" />
<taUpdateCreateItemRcd xsi:nil="true" />
<taUpdateCreateVendorRcd xsi:nil="true" />
<taCreateVendorAddress_Items xsi:nil="true" />
<taPopRcptLotInsert_Items xsi:nil="true" />
<taPopRcptSerialInsert_Items xsi:nil="true" />
<taPopRcptLineInsert_Items>
<taPopRcptLineInsert>
<POPTYPE>3</POPTYPE>
<POPRCTNM><![CDATA[ ]]></POPRCTNM>
<PONUMBER>TEST</PONUMBER>
<ITEMNMBR>TEST</ITEMNMBR>
<ITEMDESC>Added using Check Links</ITEMDESC>
<VENDORID>TEST</VENDORID>
<VNDITNUM><![CDATA[ ]]></VNDITNUM>
<VNDITDSC><![CDATA[ ]]></VNDITDSC>
<InventoryAccount><![CDATA[ ]]></InventoryAccount>
<UOFM><![CDATA[ ]]></UOFM>
<JOBNUMBR><![CDATA[ ]]></JOBNUMBR>
<BOLPRONUMBER><![CDATA[ ]]></BOLPRONUMBER>
<QTYSHPPD>10</QTYSHPPD>
<Purchase_Item_Tax_Schedu><![CDATA[ ]]></Purchase_Item_Tax_Schedu>
<Purchase_Site_Tax_Schedu><![CDATA[ ]]></Purchase_Site_Tax_Schedu>
<Landed_Cost_Group_ID><![CDATA[ ]]></Landed_Cost_Group_ID>
<LOCNCODE>MAIN00</LOCNCODE>
<POLNENUM>16834</POLNENUM>
<receiptdate>8/23/2013</receiptdate>
<CURNCYID><![CDATA[ ]]></CURNCYID>
<ProjNum><![CDATA[ ]]></ProjNum>
<CostCatID><![CDATA[ ]]></CostCatID>
<CMMTTEXT><![CDATA[ ]]></CMMTTEXT>
<USRDEFND1><![CDATA[ ]]></USRDEFND1>
<USRDEFND2><![CDATA[ ]]></USRDEFND2>
<USRDEFND3><![CDATA[ ]]></USRDEFND3>
<USRDEFND4><![CDATA[ ]]></USRDEFND4>
<USRDEFND5><![CDATA[ ]]></USRDEFND5>
</taPopRcptLineInsert>
</taPopRcptLineInsert_Items>
<taPopRcptMultiBin_Items xsi:nil="true" />
<taPopRcptLineTaxInsert_Items xsi:nil="true" />
<taPopRctUserDefined xsi:nil="true" />
<taPopDistribution_Items xsi:nil="true" />
<taAnalyticsDistribution_Items xsi:nil="true" />
<taPopRcptHdrInsert xsi:nil="true" />
<taMdaUpdate_Items xsi:nil="true" />
</POPReceivingsType>
</eConnect>