By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,960 Members | 1,142 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,960 IT Pros & Developers. It's quick & easy.

SOAP request and response problem

P: 1
Hello Forum,
I use VB.NET in SharpDevelop to create my first SOAP client. I set a web reference to the WSDL and got a class generated which offers me request, response, clientheader and service elements. (The clientheader is used to store username, password and mailadress for authentification.)
Then in my class I made the following:

Expand|Select|Wrap|Line Numbers
  1. Sub Button1Click(sender As Object, e As EventArgs)
  2.   Dim Myrequest As New MyNamespace.addRequest 
  3.   Dim Myrespons As New MyNamespace.addResponse
  4.   Dim Myheader As New MyNamespace.clientHeader
  5.   Dim Myservic As New MyNamespace.service
  6.  
  7.   Myheader.clientName = "Username"
  8.   Myheader.clientEmail ="user@test.de"
  9.   Myheader.clientPassword = "password"
  10.   Myrequest.city="city"
  11.   Myrequest.clientHeader = myheader
  12.   Myrequest.country="country"
  13.   Myrequest.district="district"
  14.   Myrequest.houseNumber="number"
  15.   Myrequest.postalCode ="postalcode"
  16.   Myrequest.street="street"
  17.   Myrequest.subscriberId="12345"
  18.   Myresponse = Myservice.addSubscriber(Myrequest)
  19.   MsgBox(Myresponse.resultMessage)
  20. End Sub
  21.  
When calling the line Myresponse=Myservice.addSubscriber(Myrequest) my client crashes. How I can send the request to the server and retrieve the response for further use? What I'm doing wrong?

Any help is appreciated.

Thanks a lot in advance,
Marco
Aug 11 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.