DannyC wrote:Because that's whats provided for us in the standard File Watcher plugin. I'm sure I'm not the only one who takes that as the "best practise" then just customizes around that ideal.
If there's a better way of importing XML documents, it might be an opportunity to tweak the standard File Watcher plugin to show us.
Like I said, we ship the File Watcher plugin with an example of using the XMLQueueImport to make migrations from the old version 6 easier.
I guess we're being punished for that.
In the same plugin, you'll see an example of importing XML files NOT using the XMLQueueImport - line 141 of our standard File Watcher plugin. I stand corrected! this actually still uses the JiwaImportQManager!
Your XML document is showing up in Mandarin in XML Pad - indicating a possible wayward byte mark somewhere, as Scott already suggested.
Here's a fragment of code for the Process() method of the XMLQueueImport.ImportQueueItem:
- Code: Select all
Public Sub Process()
If Status <> ImportQueueItemStatuses.Succeeded Then
ImportQueueItems.RaiseProcessItemStartEvent(Me)
Dim lJiwaDocumentNode As System.Xml.XmlNode
Dim oSourceXMLDoc As New System.Xml.XmlDocument
Dim XMLType As String = ""
Try
oSourceXMLDoc.LoadXml(m_TransformedXML)
lJiwaDocumentNode = oSourceXMLDoc.SelectSingleNode("JiwaDocument")
Catch ex As Exception
ImportErrorMessage = ex.Message
Status = ImportQueueItemStatuses.Failed
My.Application.Log.WriteEntry("JiwaImportQManager.Process error : " & ImportErrorMessage)
iSave()
Exit Sub
End Try
As you can see on exception we log and swallow the exception - hence why your file stays where it does - but it should have logged it to the Event log!