Search the GP Tables
Search by TABLE NAME
Search by FIELD NAME
These are our SOP scripts. All of our scripts for Dynamics GP can be found here
DynDeveloper.com

DynDeveloper.com

Table Edits Forum Articles
Table Edits 0 Table Edits 0 Table Edits 0
Sign Up Now!Log In
Carla R 2/2/2011 6:19:19 PM

How to read and use an xsd file in C#

I would like to know the C# equivalent of this VB code and if it will easily translate:

Dim sXsdDoc As New Xml.XmlDocumentsXsdDoc.Load("C:\\Program Files\\Common Files\\Microsoft Shared\\eConnect 10\\XML Sample Documents\\Incoming XSD Schemas\\eConnect.xsd");

 

I am receiving the following eConnect error which does not make sense when reviewing the xml:

System.ApplicationException: Root element (<eConnect>) not found. Please verify xml document.
<ROOT><eConnect><SOPTransactionType><taSopLineIvcInsert_Items>
<taSopLineIvcInsert><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><DOCDATE>2010-11-22T00:00:00</DOCDATE><ITEMNMBR>5898620000002</ITEMNMBR><UNITPRCE>3.75000</UNITPRCE><XTNDPRCE>487.50000</XTNDPRCE>
<QUANTITY>130</QUANTITY><LNITMSEQ>16384</LNITMSEQ><DOCID>INV</DOCID><KitCompMan>1</KitCompMan></taSopLineIvcInsert>
<taSopLineIvcInsert><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><DOCDATE>2010-11-22T00:00:00</DOCDATE><ITEMNMBR>5898620020003</ITEMNMBR><UNITPRCE>3.75000</UNITPRCE><XTNDPRCE>390.00000</XTNDPRCE>
<QUANTITY>104</QUANTITY><LNITMSEQ>32768</LNITMSEQ><DOCID>INV</DOCID><KitCompMan>1</KitCompMan></taSopLineIvcInsert>
</taSopLineIvcInsert_Items><taSopLineIvcInsertComponent_Items><taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>58986100229</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>16384</LNITMSEQ>
</taSopLineIvcInsertComponent><taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>E2-713</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>16384</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>L-5137</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>16384</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>M-75735</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>16384</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>M-78119</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>16384</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>54460000035</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>32768</LNITMSEQ>
</taSopLineIvcInsertComponent><taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR>
<ITEMNMBR>L-5137</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>32768</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>M-74236</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>32768</LNITMSEQ></taSopLineIvcInsertComponent>
<taSopLineIvcInsertComponent><SOPTYPE>3</SOPTYPE><CUSTNMBR>04012147-P0000</CUSTNMBR><ITEMNMBR>M-93085</ITEMNMBR><QUANTITY>1</QUANTITY><LNITMSEQ>32768</LNITMSEQ></taSopLineIvcInsertComponent>
</taSopLineIvcInsertComponent_Items><taSopHdrIvcInsert><SOPTYPE>3</SOPTYPE><DOCID>INV</DOCID><DOCDATE>2010-11-22T00:00:00</DOCDATE>
<CUSTNMBR>04012147-P0000</CUSTNMBR><SUBTOTAL>877.50000</SUBTOTAL><DOCAMNT>877.50000</DOCAMNT><BACHNUMB>INV_Feb  2 2011</BACHNUMB></taSopHdrIvcInsert></SOPTransactionType></eConnect></ROOT>

Server stack trace:
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_EntryPoint(String ConnectionString, ConnectionStringType ConnectionType, String sXML, SchemaValidationType ValidationType, String eConnectSchema)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(RuntimeMethodHandle md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_EntryPoint(String ConnectionString, ConnectionStringType ConnectionType, String sXML, SchemaValidationType ValidationType, String eConnectSchema)
   at EconnectIntegration.Gateway.EconnectGateway.CreateInvoice() in H:\Finance\AutoBilling\eConnectIntegration\Gateway\EconnectGateway.cs:line 65

 

Version: Unknown or N/A
Section: eConnect








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