SOAP client always returns 0

V

Vesna Sarajevo

Hi all and thanx for your help in advance.

I'm using MS SOAP Toolkit V3 to call my webservice (which works) but I
always get 0 in result, whatever numbers
I send. This is just a dummy function that adds two numbers. Do you
know what I'm doing wrong?
This is the code:


----------------------------------------------------------------------------------------------------------------------------------------------------------
Dim Serializer As SoapSerializer30
Dim Reader As SoapReader30
Dim Connector As SoapConnector30

Set Connector = New HttpConnector30

Connector.Property("EndPointURL") = txtURL.Text

Connector.Property("SoapAction") = "http://tempuri.org/VesnaTest/
VesnaTest/AddMe"
Connector.Connect
Connector.BeginMessage

Set Serializer = New SoapSerializer30
Serializer.Init Connector.InputStream

'Serializer.StartEnvelope "soap"
Serializer.StartEnvelope
Serializer.StartBody
Serializer.StartElement "AddMe"
Serializer.StartElement "a"
Serializer.WriteString CInt(txtX)
Serializer.EndElement
Serializer.StartElement "b"
Serializer.WriteString CInt(txtY)
Serializer.EndElement
Serializer.EndElement
Serializer.EndBody
Serializer.EndEnvelope

Connector.EndMessage

Set Reader = New SoapReader30
Reader.Load Connector.OutputStream

If Not Reader.Fault Is Nothing Then
lblResult.Caption = Reader.FaultString.Text
Else
lblResult.Caption = Reader.RpcResult.Text
End If
------------------------------------------------------------------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top