I am attempting to provide Notes data via web service to other systems using a LotusScript Web Service Provider.
I imported my WSDL, and can populate the first level elements (SuccessFlag and StatusMsg), but cannot fathom how to populate the child, or “nested” elements (Status which includes ID and Contents)…
So, if I run the web service (see code at bottom) I am returned:
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/”>
<ns1:ActionReportReqResponse xmlns:ns1="urn:DefaultNamespace">
<SuccessFlag>0</SuccessFlag>
<Staff/>
<StatusMsg>Hello world</StatusMsg>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
<StatusMsg/>
</ns1:ActionReportReqResponse>
</soapenv:Body>
</soapenv:Envelope>
I want to populate the sub-elements “ID” and “Contents” of “Staff” but can’t! How do I do this? I have tried various methods (see code at bottom), but get errors whenever I try to populate these elements.
I have scoured the forums and web but can’t seem to find any answers, so thanks for your help!!!
%INCLUDE “lsxsd.lss”
Class ActionReportRespStaff_Array_Holder As INOUT_HOLDER
Public Value() As ActionReportResp_Staff
End Class
Class ActionReportResp_Staff As XSD_ANYTYPE
Public ID As XSD_DECIMAL
Public Content() As String
Sub NEW
End Sub
End Class
Class ActionReportResp_Staff_Holder As INOUT_HOLDER
Public Value As ActionReportResp_Staff
End Class
Class String_Array_Holder As INOUT_HOLDER
Public Value() As String
End Class
Class ActionReport
Sub NEW
End Sub
Sub ActionReportReq(SuccessFlag As Boolean_Holder, Staff As ActionReportRespStaff_Array_Holder, _
StatusMsg As String_Array_Holder)
SuccessFlag.Value = 0
Redim StatusMsg.Value(10)
StatusMsg.Value(0) = "Hello world"
Redim Preserve Staff.Value(0)
'None of the following work…
’ Call Staff.Value(0).ID.SetValueFromString( “1” ) 'error
’ Redim Preserve Staff.Value(0).Content(0) 'error
’ Staff.Value(0).Content(0) = “Maple” 'error
’ Staff.Value(0).setValueFromString( “1” ) 'error
’ Staff.Value(0).Content(0) = “Blueberries” 'err
End Sub
End Class