View Full Version : DXL exporter operation failed
pipo34
08-20-2007, 08:55 AM
Well, i'm impressed by your work, and by the result. The point is that i'm like a beginner, and it's a feeling......disarming !! Each step i'm trying to reach, i'm search and search again....
But now, i've another pb.
I don't see my action created in my view. Perharps have you any idea?
In firedebug, i've noticed this thing.
"
GET http://localhost/becar.nsf/($Ext.nd.NotesDxlExporter)?OpenAgent&type=view&name=($All)&randomizer=1187613787685 (125ms)ext-base.js (line 12)ParamsHeadersPostResponse
Response Headers
Request Headers
<?xml version='1.0' encoding='utf-8'?><error><line>96</line><number>4601</number><message>DXL exporter operation failed</message></error>
"
DXL exporter failed...glups...
RWaters
08-20-2007, 11:00 AM
Just an FYI: I moved this post to be a separate thread, I'd like to not use the release thread for any bugs or issues.
Not 100% sure on this one off the bat. Did you happen to sign the ($Ext.nd.NotesDxlExporter) agent after copying it over? I'll check into the agent to see exactly what that line is trying to do, but it sounds to me like a permissions issue or something along those lines.
pipo34
08-21-2007, 03:19 AM
It looks great ^^. But is there any architectural documentation or a guide, cos i'm feeling like a beginner and when i try to understand some points, I spend long time to search (in fact, it's not a bad way :))
Antoher point, my action didn't load in the action bar. Any idea ? In firedebug, i've noticed this point
"
GET http://localhost/becar.nsf/($Ext.nd.NotesDxlExporter)?OpenAgent&type=view&name=($All)&randomizer=1187680468615 (1031ms)ext-base.js (line 12)
ParamsHeadersPostResponse
Response Headers
Request Headers
<?xml version='1.0' encoding='utf-8'?>
<error><line>96</line><number>4601</number><message>DXL exporter operation failed</message></error>
"
DXL exporter failed ?
RamsesAkaPus
08-24-2007, 10:48 AM
This bug Fix ;)
Sub Initialize
On Error Goto ErrHandler
Dim session As New NotesSession
Dim db As NotesDatabase
Dim docCtxt As NotesDocument
Dim nc As NotesNoteCollection
Dim noteDocument As NotesDocument
Dim noteForm As NotesForm
Dim noteView As NotesView
Dim noteOutline As NotesOutline
Dim noteID As String
Dim sType As String ' document, form, view or outline
Dim sName As String
Dim sDesignUnid As String
Dim sDocUnid As String
Dim useDisk As String
Set db = session.CurrentDatabase
Set nc = db.CreateNoteCollection(False)
Call nc.BuildCollection
Set docCtxt = session.DocumentContext
' parse query string for params
Dim objQS As New QSParser
sType = objQS.GetQSVal("type")
sName = objQS.GetQSVal("name")
sDesignUnid = objQS.GetQSVal("designunid")
sDocUnid = objQS.GetQSVal("docunid")
useDisk = objQS.GetQSVal("useDisk")
If (Len(sName)="32") Then
sname=idtoview(sName)
Else
sName=sName
End If
Dim stream As NotesStream
Set stream = session.CreateStream
If useDisk = "true" Then
Dim TempDir As String
Dim FileName As String
TempDir$ = Environ("Temp")
FileName$ = TempDir$ + "\" + sType + sName + sDesignUnid + sDocUnid + ".xml"
stream.Open(FileName$)
End If
Dim exporter As NotesDXLExporter
Set exporter = session.CreateDXLExporter
exporter.OutputDOCTYPE = False
Select Case sType
Case "document" :
Set noteDocument = db.GetDocumentByUNID(sDocUnid)
Call exporter.SetInput(noteDocument)
Case "form" :
' if we don't have a form name we might have the design unid of the form
Set noteForm = db.GetForm(sName)
Call nc.Add(noteForm)
noteID = nc.GetFirstNoteId
Set noteDocument = db.GetDocumentByID(noteID)
Call exporter.SetInput(noteDocument)
Case "view" :
Set noteView = db.GetView(sName)
Call nc.Add(noteView)
noteID = nc.GetFirstNoteId
Set noteDocument = db.GetDocumentByID(noteID)
Call exporter.SetInput(noteDocument)
Case "outline" :
Set noteOutline = db.GetOutline(sName)
Call nc.Add(noteOutline)
noteID = nc.GetFirstNoteId
Set noteDocument = db.GetDocumentByID(noteID)
Call exporter.SetInput(noteDocument)
Case Else :
Exit Sub
End Select
Call exporter.SetOutput(stream)
Call exporter.Process
' added by Jerry Carter 6/20/2007
Dim outBuff As String
Print {content-type:text/xml}
outBuff = exporter.Export(noteDocument)
Print outBuff
' done with the stream so close it
stream.Close
' if we created a file on dis then delete it
If useDisk = "true" Then
Kill FileName$
End If
Exit Sub
ErrHandler:
REM tell the browser it is getting xml
Print {content-type:text/xml;charset=utf-8}
Print "<?xml version='1.0' encoding='utf-8'?>"
Print "<error>" + "<line>" + Cstr(Erl) + "</line>" + "<number>" + Cstr(Err) + "</number>" + "<message>" + Error$ + "</message>" + "</error>"
Exit Sub
End Sub
Function idtoview (unid As String) As String
Dim view As NotesView
Dim views As Variant
Dim db As NotesDatabase
Dim viewname As String
Dim session As New NotesSession
Set db = session.CurrentDatabase
views = db.Views
Dim id As String
Forall v In views
id= v.UniversalID
If Ucase(id) = Ucase(unid) Then
viewname=v.name
Exit Forall
End If
End Forall
idtoview=viewname
End Function
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.