developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 6 and 7 Forum

Notes/Domino 6 and 7 Forum

developerWorks




Webservice Lotus Script STRINGARRAY_HOLDER
Lars Bernstorff Hansen 09/17/2015 09:42 AM
Applications Development 7.0.3 FP1 All Platforms


Hi All, :-)

Im having really big trouble regarding the use of a class with STRINGARRAY_HOLDER as a variable type.

Im sending an array to to my Lotus Notes webservice. Everything works fine.
But Im not able to access it when nessceary.

The story is:
1. LotusNotes webservice is called from C#.
2. LotusNotes webservice accepts all data from the sender.

3. I want to save a document with the data - And now I can't access the data.

Thanks in advance
Lars Bernstorff Hansen

Code below:
'****************************
Public Class Webservice

Public Sub new()
End Sub
Public Function setAgencies(IA_TS As STRINGARRAY_HOLDER, IA_ID_Agency As STRINGARRAY_HOLDER, IA_Code As STRINGARRAY_HOLDER, IA_Name As STRINGARRAY_HOLDER, IA_Adress As STRINGARRAY_HOLDER, IA_City As STRINGARRAY_HOLDER, IA_ZipCode As STRINGARRAY_HOLDER) As Boolean

Set TS = IA_TS
Set ID_Agency = IA_ID_Agency
Set Code = IA_Code
Set NameAgent = IA_Name
Set Adress = IA_Adress
Set City = IA_City
Set ZipCode = IA_ZipCode
cnt = 0


Dim Agencies As New Agencies(IA_TS, IA_ID_Agency, IA_Code, IA_Name, IA_Adress, IA_City, IA_ZipCode)
If createAgencies(Agencies) = True Then setAgencies = True

setAgencies = True
End Function


Private Function createAgencies(Agencies As Agencies)

Dim s As Variant
Dim session As New NotesSession
Dim db As NotesDatabase
Dim NotesDocumentCollection As NotesDocumentCollection
Dim view As NotesView
Dim dok As NotesDocument
Dim cnt As Integer
'** Notes assignments:
Set db = session.CurrentDatabase
Set dok = New NotesDocument(db)
IV_UID = dok.UniversalID

'** Assignments:
createAgencies = False



Forall item In TS
cnt= cnt+1
End Forall

Call dok.RemoveItem( "Form" )
dok.Form = "(WS)"
dok.ID = Cstr(cnt)

Call dok.Save(True,True)
createAgencies = True

End Function

End Class

Public Class Agencies

Public TS As STRINGARRAY_HOLDER
Public ID_Agency As STRINGARRAY_HOLDER
Public Code As STRINGARRAY_HOLDER
Public Name As STRINGARRAY_HOLDER
Public Adress As STRINGARRAY_HOLDER
Public City As STRINGARRAY_HOLDER
Public ZipCode As STRINGARRAY_HOLDER
Public cnt As Integer

Public Sub new(IA_TS As STRINGARRAY_HOLDER, IA_ID_Agency As STRINGARRAY_HOLDER, IA_Code As STRINGARRAY_HOLDER, IA_Name As STRINGARRAY_HOLDER, IA_Adress As STRINGARRAY_HOLDER, IA_City As STRINGARRAY_HOLDER, IA_ZipCode As STRINGARRAY_HOLDER)

Set TS = IA_TS
Set ID_Agency = IA_ID_Agency
Set Code = IA_Code
Set NameAgent = IA_Name
Set Adress = IA_Adress
Set City = IA_City
Set ZipCode = IA_ZipCode

' Forall item In IA_TS
' cnt = cnt + 1
' End Forall

End Sub


End Class

Go back