Hi ! Long time no talk...
Well, I'm back on ANOTHER eConnect project. This time it's eConnect version 8 (for Dyn GP 8). I'm creating a Windows Service that polls an "export queue" table for invoices and repackaging the invoice to send it out via EDI.
I've only ever used eConnect 9 and up but I assumed that the versions were similar. Here's what I'm doing and where it's breaking...
1. My project is in VS2005.
2. I imported and am referencing Microsoft.GreatPlains.eConnect, MiscRoutines, and Serialization8 dll's.
3. I had to reference an "old" version of System.EnterpriseServices because eConnect v8 uses it.
4. For testing, I'm trying the following:
Dim
serializer As New XmlSerializer(GetType(eConnectType))
Dim eConnect As New eConnectType()
Dim eConnectouttype As New RQeConnectOutType()
Dim eConnectOut As New eConnectOut()
Dim entrypoint As New eConnectMethods
Dim requesterDoc As String = String.Empty
Dim sConnectionString As String = GetGPConnectString()
With eConnectOut
.DOCTYPE = "Sales_Transaction"
.OUTPUTTYPE = 1
.INDEX1FROM = "INV92029"
.INDEX1TO = "INV92029"
.FORLIST = 1
End With
...
My code is failing on the bolded line (Dim entrypoint As New eConnectMethods) with the following exception: "The system cannot find the file specified. (Exception from HRESULT: 0x80070002)". Here's the stack trace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at System.EnterpriseServices.Thunk.Proxy.CoCreateObject(Type serverType, Boolean bQuerySCInfo, Boolean& bIsAnotherProcess, String& uri)
at System.EnterpriseServices.ServicedComponentProxyAttribute.CreateInstance(Type serverType)
at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
at IntegrationExportService.ExportService.GetGPData(Int32 ExportPK, Int32 SOPType, String SOPNumber, String& xmlInvoice) in C:\Users\Joe Cogan\...\ExportService.vb:line 102
I cannot figure out why it would be failing when dimming Microsoft.GreatPlains.eConnect.eConnectMethods. All of the references and dll's are in place. Have you seen this before? Your insight will be greatly appreciated. Thanks!
Joe Cogan
joecogan@adelphia.net
c: 216.288.1488