Coding a simple web service provider/consumer combination

Hi there,

I’m trying to code a simple web service provider/consumer combination, just to test how connectivity works, etc (not to do anything mind blowing!).

Anyway I’ve got to the point where I have a provider that provides a method “getString” and a consumer that was built using the WSDL output from the provider library. This all seems fine (i.e., it compiles!). I then try to use the consumer via an agent but I get the error message “Web Service MyExampleProviderClass method GETSTRING error org.xml.sax.SAXException: Bad envelope tag: script”.

I’m not sure if maybe I’m missing something obvious but I’ve tried recreating the libraries and agent several times (with slight variations) and still get the same error. BTW I get the same error whether invoking the agent in a Notes client or via a web browser ?OpenAgent call.

The code’s below. Any ideas would be very welcome as I’ve spent way too long getting this simple combination to work.

Cheers,

Phil

'MyExampleProviderClass

%INCLUDE “lsxsd.lss”

Class MyExampleProviderClass

Function getString As String

	getString = "Hello World"

End Function

End Class

'MyExampleConsumer library

%INCLUDE “lsxsd.lss”

Class MyExampleProviderClass As PortTypeBase

Sub NEW

	Call Service.Initialize ("UrnDefaultNamespaceMyExampleProviderClassService", _

	"MyExampleProviderClassService.Domino", "http://localhost", _

	"MyExampleProviderClass")

	

End Sub



Function GETSTRING() As String

	Let GETSTRING = Service.Invoke("GETSTRING")

End Function

End Class

'agent code:

Option Public

Option Declare

Use “MyExampleConsumer”

Sub Initialize

Dim ex As New MyExampleProviderClass

Dim mystring As String

mystring = ex.GETSTRING() '<-agent always errors here

Messagebox mystring

End Sub

Subject: Working in 8.0.1

Phil

FYI: your example is working in 8.0.1. It seems to be a version issue.

HTH

Bodo