Hello,I’m trying to consume a web service that returns a strongly typed array and when I run my code I get the error “Unable to create LotusScript object for…” and the class name.
When I import the WSDL file into a LotusScript library, the class declarations are:
Class ZhrPhoneInfoT2_n0 As XSD_ANYTYPE
Public item() As ZhrPhoneInfoRecor2_n0
Sub NEW
End Sub
End Class
Class ZhrPhoneInfoRecor2_n0 As XSD_ANYTYPE
Public Nachn As String
Public Vorna As String
Sub NEW
End Sub
End Class
And the call to the web service is:
Function ZhrPhoneBookDataSend(Pernr As Numeric8_n1) As ZhrPhoneInfoT2_n0
Set ZhrPhoneBookDataSend = Service.Invoke("ZhrPhoneBookDataSend", Pernr)
End Function
The error happens when the data is returned from the ZhrPhoneBookDataSend function.
If anyone has any ideas or has been able to get a lotus script agent to grab data from a web service, your advice would be greatly appreciated.
I also tried this from a Java library, but got an error talking about “No engine configuration file”, which neither me or IBM support can figure out.
Thanks for the reply Bjoern. Good post, your right about how there’s not much for documentation out there on Notes and web services.
We’ll I found what the issue was, as annoying as it may be on a few different levels.
Whenever I would test the script, I ran it with the debugger turned on. I would always step through the code line by line using the “step into” button, and every time I got the error. I then found that if I set a break point past the call to the web service and hit “Continue” - no error.
So not sure why, but if you debug the actual call to the web service, it fails, but if you let the debugger run right past the call, it works.
I don’t want to tell you how long it took me to figure that out.
Now the only issue I have is that Notes doesn’t clean up after itself and I have all the records left in memory. I set the array that’s returned to Nothing (and it takes about 10 seconds to do that), but the memory taken by the nlnotes.exe process doesn’t drop back to what it was before I ran the function. Any ideas?