Hi All,I am trying to consume web services with 8.5 designer.
- I have imported the wsdl file successfully using the new design element in 8.5 designer client.
Here the lotus cript code created by the designer.
%INCLUDE “lsxsd.lss”
Const n0 = “http://www.midasactionapisoaphandler.com/definitions/MidasActionAPISoapHandlerRemoteInterface”
Class MidasActionAPISoapHandlerJavaPortType_n0 As PortTypeBase
Sub NEW
Call Service.Initialize ("MidasActionAPISoapHandlerServiceWsdlMidasActionAPISoapHandlerService", _
"MidasActionAPISoapHandlerService.MidasActionAPISoapHandlerPort", "http://localhost:8080/midassoapapi/servlet/rpcrouter", _
"MidasActionAPISoapHandlerJavaPortType_n0")
End Sub
Function midasActionAPI(apiNames As XSD_ANYTYPE, zone As XSD_ANYTYPE, xml As XSD_ANYTYPE, _
returnFormat As XSD_ANYTYPE) As String
Let midasActionAPI = Service.Invoke("midasActionAPI", apiNames, zone, xml, returnFormat)
End Function
End Class
I have written a agent were i call the above script.
Sub Initialize
Dim session As New NotesSession
Dim domParser As NotesDOMParser
Dim db As NotesDatabase
Dim item As NotesItem
Dim docNode As NotesDOMDocumentNode
Set db = session.CurrentDatabase
Set doc = New NotesDocument(db)
Dim chuck As Variant
Dim xml_in As NotesStream
Dim outputStream As NotesStream
Dim zone As XSD_ANYTYPE
Dim xmloutput As New XSD_ANYTYPE()
Dim APINAME As XSD_ANYTYPE
filename$ = "c:\CUSD_INSERT_IT2.xml"
outputFile = "c:\DOMtree.txt"
Set xml_in = session.CreateStream
xml_in.Open filename$,"ASCII"
xml_in.Position = 0
' = xml_in.ReadText()
’ call xmloutput.SetValueFromString =xml_in.ReadText()
’ APINAME= “SUSHANT”
'Messagebox XMLOUTPUTFINAL
'Set outputStream =session.CreateStream
'outputStream.Open (outputFile)
'outputStream.Truncate
'create DOM parser and process
'If Not xml_in.Open(filename$) Then
'Msgbox "cannot open" & filename$, , "XML file error"
'Exit Sub
'End If
xmlfile ="CUSD"
'Set domParser=session.CreateDOMParser(xml_in , outputStream)
'domParser.Process
'APINAME=
'get the document node
'Set docNode = domParser.Document
Dim result As String
'WRITE!MIDAS.CUST", ,XMLOUTPUTFINAL,"0"
Set STUB = New MidasActionAPISoapHandlerJavaPortType_n0 ()
'Call stub.midasActionAPI("WRITE!MIDAS.CUST","NEWYORK",xmlfile,"0")
'Dim stub As New MidasActionAPISoapHandlerJavaPortType_n0
’ result = thewebservice.midasActionAPI(“WRITE!MIDAS.CUST”, “NEW_YORK”,“”,“1”)
Call stub.midasActionAPI("WRITE!MIDAS.CUST", NEW_YORK,"<CUST>","1")
End Sub
Now I see that i have to define
Dim zone As XSD_ANYTYPE
Dim xmloutput As New XSD_ANYTYPE()
But how do i set the value of zone and get the value of Zone.
Please help.
Thanks
Sushant