Calling a remote webservice: mildly stumped

OK, this is my first attempt at importing a remote WSDL and consuming a service via client, so please bear with me:)

I imported the WSDL into a script library, per the help file. I’ve created an agent, importing the proper script library. No trouble so far. The problem is I don’t know how to construct the variable to pass into the service call (‘GetIssues’ from the WSDL below).

It looks like the call requires an instance of the GetIssues_issueNums_n1 class, but how on earth do I fill that with the proper data (NotesDOMElemementNode?)

Here’s what I have so far in my agent(not working). The XSD_STRINGS are leftovers from another failed attempt, but that’s basically what I want to pass in…just two pieces of XML. I can pass in the empty searchCriteria, and it fails obviously, but it compiles…

Any ideas?

Agent


Sub Initialize

Dim ws As IssueTrakSoap_n1

Dim searchCriteria As GetIssues_issueNums_n1

Dim xmlNode As NotesDOMElementNode	



Set ws = New IssueTrakSoap_n1()

Dim ReturnSchema As New XSD_STRING

Call ReturnSchema.SetValueFromString("Y")

Dim IssueNum As New XSD_STRING

Call IssueNum.SetValueFromString("29")



Set searchCriteria = New GetIssues_issueNums_n1()



Call ws.GetIssues( searchCriteria )

End Sub

WSDL Definition (boring parts omitted)


Class GetIssues_issueNums_n1 As XSD_ANYTYPE

Public any As NotesDOMElementNode



Sub NEW

End Sub

End Class

Class IssueTrakSoap_n1 As PortTypeBase

Sub NEW

	Call Service.Initialize ("HttpIssueTrakServiceIssueTrak", _

	"IssueTrak.IssueTrakSoap", "WebServer/IssueTrakService.asmx", _

	"IssueTrakSoap_n1")

	

End Sub



Function GetIssues(issueNums As GetIssues_issueNums_n1) As GetIssuesResponse_GetIssuesResult_n1

	Set GetIssues = Service.Invoke("GetIssues", issueNums)

End Function

End Class

Subject: solved

I can answer my own question here (which kinda gives me a nice peaceful feeling…like Notes.net is my own personal, cathartic journal!).

I build a domparser, solely for the purpose of facilitating the elementNode that my webservice wanted. It sounds like a lot of work, because most of the domdoc was sacrificial, as I only needed the elementNode, but I couldn’t find a way to create that without going through all the steps. Here is what I eventually built and passed into the service (findIssues):

Dim domparser As NotesDOMParser

Dim domdoc As NotesDOMDocumentNode

Set domparser = session.CreateDOMParser

Set domdoc = domparser.Document

Set FindIssuesNode = domdoc.CreateElementNode( “FindIssues” )

Set schemaNode = domdoc.CreateElementNode( “ReturnSchema” )

Set globalIssuesNode = domdoc.CreateElementNode( “ReturnOnlyGlobalIssues” )

Set schemaTextNode = domDoc.CreateTextNode( “N” )

Set globalIssuesTextNode = domDoc.CreateTextNode( “true” )

Call domDoc.appendChild( FindIssuesNode )

Call FindIssuesNode.appendChild( schemaNode )

Call schemaNode.appendChild( schemaTextNode )

Call FindIssuesNode.appendChild( GlobalIssuesNode )

Call globalIssuesNode.appendChild( globalIssuesTextNode )

Then when I made my call, I passed in a top-level node, with the required sub-nodes appended from the code above:

Set searchCriteria.Any = FindIssuesNode

I hope that helps someone