Home All Groups Group Topic Archive Search About
Author
1 Mar 2006 8:55 PM
cj
As best I can figure this should return me something from the host but
it hangs on RESPONSE = REQUEST.GetResponse()

Any ideas?

     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
         Dim REQUEST As Net.HttpWebRequest
         Dim RESPONSE As Net.HttpWebResponse
         REQUEST = CType(System.Net.WebRequest.CreateDefault(New
System.Uri("https://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_request>" & _
         "<login>myloginid</login>" & _
         "<password>mypassword</password>" & _
         "</cardtel_request>"


         Dim objStream As System.io.StreamWriter
         objStream = New StreamWriter(REQUEST.GetRequestStream(),
Encoding.UTF8)
         objStream.Write(loginRequest)
         RESPONSE = REQUEST.GetResponse()

         Dim oString As IO.Stream
         Dim RESP_STRING As String

         oString = RESPONSE.GetResponseStream
         RESP_STRING = New IO.StreamReader(oString).ReadToEnd
         RESPONSE.Close()

         Debug.WriteLine("Response:  " & RESP_STRING)
     End Sub

Author
2 Mar 2006 6:21 AM
Steven Cheng[MSFT]
Hi Cj,

Thanks for posting. Regarding on this issue, I've posted my response and
suggestion in your another duplicated thread in the following newsgroup:

microsoft.public.dotnet.framework.webservices.enhancements
Author
2 Mar 2006 8:45 AM
Cor Ligthert [MVP]
Stephen,

If you just had answered it crossposted, than we could have seen it as well.

Cor