As best I can figure this should return me something from the host but
it hangs on RESPONSE = REQUEST.GetResp onse()
Any ideas?
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim REQUEST As Net.HttpWebRequ est
Dim RESPONSE As Net.HttpWebResp onse
REQUEST = CType(System.Ne t.WebRequest.Cr eateDefault(New
System.Uri("htt ps://webtsdtest.tnsi .com/soap/servlet/rpcrouter")),
HttpWebRequest)
REQUEST.Method = "POST"
REQUEST.Accept = "text/xml"
Dim loginRequest As String = "<?xml version=""1.0""
encoding=""ISO-8859-1""?>" & _
"<cardtel_reque st>" & _
"<login>mylogin id</login>" & _
"<password>mypa ssword</password>" & _
"</cardtel_request >"
Dim objStream As System.io.Strea mWriter
objStream = New StreamWriter(RE QUEST.GetReques tStream(),
Encoding.UTF8)
objStream.Write (loginRequest)
RESPONSE = REQUEST.GetResp onse()
Dim oString As IO.Stream
Dim RESP_STRING As String
oString = RESPONSE.GetRes ponseStream
RESP_STRING = New IO.StreamReader (oString).ReadT oEnd
RESPONSE.Close( )
Debug.WriteLine ("Response: " & RESP_STRING)
End Sub
it hangs on RESPONSE = REQUEST.GetResp onse()
Any ideas?
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As
System.EventArg s) Handles Button1.Click
Dim REQUEST As Net.HttpWebRequ est
Dim RESPONSE As Net.HttpWebResp onse
REQUEST = CType(System.Ne t.WebRequest.Cr eateDefault(New
System.Uri("htt ps://webtsdtest.tnsi .com/soap/servlet/rpcrouter")),
HttpWebRequest)
REQUEST.Method = "POST"
REQUEST.Accept = "text/xml"
Dim loginRequest As String = "<?xml version=""1.0""
encoding=""ISO-8859-1""?>" & _
"<cardtel_reque st>" & _
"<login>mylogin id</login>" & _
"<password>mypa ssword</password>" & _
"</cardtel_request >"
Dim objStream As System.io.Strea mWriter
objStream = New StreamWriter(RE QUEST.GetReques tStream(),
Encoding.UTF8)
objStream.Write (loginRequest)
RESPONSE = REQUEST.GetResp onse()
Dim oString As IO.Stream
Dim RESP_STRING As String
oString = RESPONSE.GetRes ponseStream
RESP_STRING = New IO.StreamReader (oString).ReadT oEnd
RESPONSE.Close( )
Debug.WriteLine ("Response: " & RESP_STRING)
End Sub
Comment