Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

SOAP client always returns 0

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vesna Sarajevo - 17 Jul 2007 14:51 GMT
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
> ------------------------------------------------------------------------------------------------------------------

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.