473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

making a SOAP connection persist

cj

I've been trying all week to write a VB.net soap client. I've finally
gotten a connection after figuring out I needed to change the name of a
..xml file I was given to .wsdl and add it as a web reference in my
Windows app. When I click button2 to logout I get an error message and
the folks at the company I'm connecting to say I need to set my session
to persist. They can not tell me how to do this as they are non-MS Java
developers. Here is my code. They've verified what I'm sending in the
variable soapmesg is correct. ANY help is appreciated.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox1.Text = ""
Button1.Enabled = False
Dim proxy As New voi.voi_web_server
Dim soapmesg As String
Dim respstr As String
Dim sessionKey As String
soapmesg = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & _
"<cardtel_request>" & _
"<login>******</login>" & _
"<password>******</password>" & _
"</cardtel_request>"
respstr = proxy.validate(soapmesg).ToString()
sessionKey = respstr.Substring(11)

TextBox1.Text = respstr
TextBox2.Text = sessionKey

Button1.Enabled = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox2.Text = ""
Button2.Enabled = False
Dim proxy As New voi.voi_web_server
Dim soapmesg As String
Dim respstr As String
soapmesg = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & _
"<cardtel_request>" & _
"<stop>stop</stop>" & _
"</cardtel_request>"
respstr = proxy.validate(soapmesg).ToString()

TextBox1.Text = respstr
TextBox2.Text = ""

Button2.Enabled = True
End Sub
Mar 2 '06 #1
4 1490
Welcome Cj,

Seems the webservice you're trying to cosuming is not quite simple. From
your description the service side ask you to persist the session, I think
this means that when you first time call the service and login the service,
it will return some data represent the authenticated ticket. Then, in the
sequential requests, you need to use this ticket to perform other
operations, I'm not sure how it require you to attach the ticket, is there
any further info or specification about the server-side service's
communiation interface?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Mar 3 '06 #2
cj
Hi Steven,

Right now I'd be happy to login and logout w/o doing any business.

Login works. When I login I receive the session key

soapmesg = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & _
"<cardtel_request>" & _
"<login>******</login>" & _
"<password>******</password>" & _
"</cardtel_request>"

respstr = proxy.validate(soapmesg).ToString()
sessionKey = respstr.Substring(11)

but apparently it's not sent in the logout. When I asked the
programmers on the server side what to send to logout this is what they
emailed me back.

You send the following XML:

<cardtel_request><stop>stop</stop></cardtel_request>

the session information kept in the SOAP headers will tell the
server what session to terminate.

When I told them it wasn't working they told me:

My server doesn't know that your logoff xml is part of a current
session.

This is where you need to figure out how to tell you client to
keep a persistent connection with my server.

Remember they don't know .net. They do non-MS Java development. So I'm
hoping someone here can help me figure this out.

Steven Cheng[MSFT] wrote:
Welcome Cj,

Seems the webservice you're trying to cosuming is not quite simple. From
your description the service side ask you to persist the session, I think
this means that when you first time call the service and login the service,
it will return some data represent the authenticated ticket. Then, in the
sequential requests, you need to use this ticket to perform other
operations, I'm not sure how it require you to attach the ticket, is there
any further info or specification about the server-side service's
communiation interface?

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Mar 3 '06 #3
cj
Thank for the help Steven. I have it logging in and out now. I'll post
again when I have another question. Shouldn't be too long. :)

cj wrote:

I've been trying all week to write a VB.net soap client. I've finally
gotten a connection after figuring out I needed to change the name of a
.xml file I was given to .wsdl and add it as a web reference in my
Windows app. When I click button2 to logout I get an error message and
the folks at the company I'm connecting to say I need to set my session
to persist. They can not tell me how to do this as they are non-MS Java
developers. Here is my code. They've verified what I'm sending in the
variable soapmesg is correct. ANY help is appreciated.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
TextBox1.Text = ""
Button1.Enabled = False
Dim proxy As New voi.voi_web_server
Dim soapmesg As String
Dim respstr As String
Dim sessionKey As String
soapmesg = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & _
"<cardtel_request>" & _
"<login>******</login>" & _
"<password>******</password>" & _
"</cardtel_request>"
respstr = proxy.validate(soapmesg).ToString()
sessionKey = respstr.Substring(11)

TextBox1.Text = respstr
TextBox2.Text = sessionKey

Button1.Enabled = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
TextBox2.Text = ""
Button2.Enabled = False
Dim proxy As New voi.voi_web_server
Dim soapmesg As String
Dim respstr As String
soapmesg = "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" & _
"<cardtel_request>" & _
"<stop>stop</stop>" & _
"</cardtel_request>"
respstr = proxy.validate(soapmesg).ToString()

TextBox1.Text = respstr
TextBox2.Text = ""

Button2.Enabled = True
End Sub

Mar 3 '06 #4
You're welcome Cj,

Feel free to post here when there is anything we can help.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
Mar 6 '06 #5

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

Similar topics

6
by: Mark Carter | last post by:
I had a play with XML-RPC the other day, and it seemed really simple to use; which really made an impression on me. But you can't make data persist on the server (not without rolling your own...
2
by: cj | last post by:
I've been trying all week to write a VB.net soap client. I've finally gotten a connection after figuring out I needed to change the name of a ..xml file I was given to .wsdl and add it as a web...
2
by: furrypop | last post by:
Hi, I'm trying to get the Perl SOAP::Lite examples to work on a Windows PC, running Apache 2.2.4. Apache is definitely serving CGI scripts, as I've tested a dummy Hello World thing. I'm also...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.