473,473 Members | 1,960 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

SOAP client always returns 0

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
------------------------------------------------------------------------------------------------------------------

Jul 17 '07 #1
1 1642
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

"Vesna Sarajevo" wrote:
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
------------------------------------------------------------------------------------------------------------------

Jul 17 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Arne Kösling | last post by:
Hi ! I am new to Web Services. Therefore I ve set up a PHP Installation on Windows (PHP 4.3.2 and Apache 1.3.29). I have tested PHP alone and then installed PEAR. Now I am stuck there (Before...
0
by: webslider | last post by:
I am trying to communicate with a WSDL that defines to portTypes: - <portType name="General"> - <portType name="Session"> And their exists 2 operations with the same name but in 2 different...
31
by: Bryan Dickerson | last post by:
Ok, simple question: from a VB.Net web service (as I've said before, I'm a newbie to SOAP), how would I get the SOAP body into a string? My boss and I concur that it, at least from our...
0
by: info | last post by:
Dear all, is the first time that I use SOAP, and i must say that i'm having several problems. this is SOAP message that expects the server =================XML EXPECTED FROM THE...
6
by: Vinit | last post by:
Hi I am passing an arraylist to a c#/.net webmethod from a perl client using soap:lite. The trace shows the elements in the xml request. The arraylist input in the webmethod however does not...
1
by: libsfan01 | last post by:
Hi all Can anyone explain the relationship between SOAP and XMLHttpRequest in Javascript? What actually is SOAP? and how does it relate to the process of transferring data client-side through...
4
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code...
3
by: =?Utf-8?B?SGVtaWw=?= | last post by:
Hi, I have written a web service for accessing data from a database. I have a method in the webservice which returns a dataset. I am trying to implement error handling by using the...
0
by: vigneshrao | last post by:
Hi, I have been working on a script that loops through multiple records and sends data (one record per call) to a WS. I am supposed to make a new call for each record before sending the data....
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.