Webservice method return value

Hi,

A have a webservice with 2 methods. Method one set a class member variable value and method two gets that variable value. Here is the code:

Class Test

Private MyString As String



Sub New()

	' Nothing to do	

End Sub



Public Function setMyString(Param1 As String)	 As Boolean 			

	MyString = Param1

	

	setMyString = True		

End Function		



Public Function getMyString() As String		

	getMyString = MyString

End Function

End Class

When I call the webservice method ‘getMyString’ from a LS agent it return nothing. Here is the LS agent caller:

Sub Initialize

Dim MyTest As Test



Set MyTest = New Test()



Call MyTest.setMyString("This is a text...")



Messagebox MyTest.getMyString() ' Return empty...

End Sub

Here is the consumer library:

%INCLUDE “lsxsd.lss”

Class Test As PortTypeBase

Sub NEW

	

	Call Service.Initialize ("UrnDefaultNamespaceTestService", _

	"TestService.Domino", "http://www.myDomain/dir1/TestDB.nsf/WSTest?OpenWebService", _

	"Test")

	

	Call Service.setCredentials("jsmith","Password")					

	

End Sub



Function SETMYSTRING(PARAM1 As String) As Boolean

	Let SETMYSTRING = Service.Invoke("SETMYSTRING", PARAM1)

End Function



Function GETMYSTRING() As String

	Let GETMYSTRING = Service.Invoke("GETMYSTRING")

End Function

End Class

Any idea ?

Thanks in advance.

Subject: Solved…

Web Services have not persistence. Each method call is a new HTTP connection… mmmm…