Jump to content
Server Maintenance This Week. ×

Sample VB.NET Code for 360Works Web services manager


This topic is 5039 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

Does anyone have, or willing to write a few lines of code, to demonstrate how to consume the sample 360works addtwonumbers and dividetwonumbers web services using Microsoft VB.NET?

It would be a great help to a lot of people to get it working.

Edited by Guest
Link to comment
Share on other sites

  • Newbies

 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim value1 As String

        Dim value2 As String

        Dim result As String

        Dim objWS As New acornTest.AddTwoNumbersRequest



        value1 = txt1.Text

        value2 = txt2.Text



        objWS.Addend1 = value1

        objWS.Addend2 = value2



        result = objWS.Equals(objWS)

        txtResult.Text = result.ToString



    End Sub

Ive got as far as the above, but the web service is just returning true or false, where have I gone wrong and how can I get it to return the result from the web service to a variable?

Link to comment
Share on other sites

  • Newbies

Here is the code! very simple, I was just over complicating matters.

Firstly create a web service reference inside visual studio and input the wsdl of the webservice.

The code to consume and use the addtwonumbers sample web service is as follows:-

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim value1 As String = txt1.Text

        Dim value2 As String = txt2.Text



        Dim wsResult As Object = ws.AddTwoNumbers(value1, value2)

        txtResult.Text = wsResult.OutputValue





    End Sub

Link to comment
Share on other sites

This topic is 5039 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.