Send POST and then Recive XML -

Posted on 2004-10-26
Last Modified: 2008-02-26
I need to be able to do this

POST /servlet/MainVCAServlet HTTP/1.0
Content-Type: text/xml
User-Agent: xLinkClient
Content-length: 544

<?xml version="1.0" standalone="no"?>
<!DOCTYPE request SYSTEM "">
<login>YOUR LOGIN ID</login>
<password>YOUR PASSWORD</password>
<subrequest type="serviceavailability">
<street1>1016 Asbury Way</street1>
<city>Mountain View</city>

I am thinking it can be done with
Question by:Vartana
    LVL 96

    Expert Comment

    by:Bob Learned
    Yes, you should be able to do this.  Have you started with any code?  Do you know how to form a web request?

    LVL 1

    Author Comment

    no I dont know how to use it ?
    LVL 96

    Accepted Solution

    LVL 1

    Author Comment

    Dim myRequest As WebRequest = WebRequest.Create("")
    Dim strPost As String = "textbox=simon"
    MessageBox.Show(myRequest.RequestUri.ToString)myRequest.Method = "post"
    myRequest.ContentLength = strPost.Length
    myRequest.ContentType = "application/x-www-form-urlencoded"
    Dim mystreamwriter As New StreamWriter(myRequest.GetRequestStream)

    ' Return the response.
    Dim myResponse As WebResponse = myRequest.GetResponse
    Dim mystream As Stream = myResponse.GetResponseStream
    Dim mystreamreader As New StreamReader(mystream)
    Do Until mystreamreader.Peek = -1
    TextBox1.Text += (mystreamreader.ReadLine.ToString())
    LVL 96

    Expert Comment

    by:Bob Learned

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
    Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    884 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now