I have to develop an agent than consumes a .Net webservice that returns a xml element.
I have tried many codes and searching in the web without any result.
The big problem is to get the xml because the stream (or object) needs a string to load the xml, there will be no problem if i had the file in my hd, but i can´t get directly from web service.
I also have tried Set source = SOAPClient.Operation(“Par1”, “Par2”, “Par3”) where source was different types of variables and objects, if the web service returns a string and source is string it works, but the web service should return a xml.
How can i do that?
Any help will be appreciated. Thanks.
Subject: Simple WS Provider example…
Using a webservice provider:%INCLUDE “lsxsd.lss”
Class Voucher
Private domParser As NotesDOMParser
Private session As NotesSession
Private db As NotesDatabase
Private inputStream As NotesStream
Private domDoc As NotesDOMDocumentNode
Private domNodeList As NotesDOMNodeList
Private domNode As NotesDOMNode
'The constructor for the class
Sub New
With Me
Set .session=New NotesSession
Set .db=.session.currentDatabase
End With
End Sub
Public Function createVoucher(origXML As String) As Boolean
’ your XML file structure is in the argument above
Set inputStream = session.CreateStream
Call inputStream.WriteText(origXML)
Set domParser = session.CreateDOMParser(inputStream)
Call domParser.Process
Set domDoc = domParser.Document
'Traverse the DOM three (explicit in the example)
End Function
End Class