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
------------------------------------------------------------------------------------------------------------------
Peter Bromberg [C# MVP] - 17 Jul 2007 15:32 GMT
First of all, if you are programming in a .NET language, there should be no
reason to go "back to the future" by using the SOAP toolkit.
Just create a webReference to your webservice, allow Visual Studio to
generate the requisite client proxy class and metadata, and program against
that.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
bogMetaFinder: http://www.blogmetafinder.com
> Hi all and thanx for your help in advance.
>
[quoted text clipped - 47 lines]
> End If
> ------------------------------------------------------------------------------------------------------------------