dcsimg
Results 1 to 2 of 2

Thread: Trying to get stock data from webservicex.net

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    8

    Trying to get stock data from webservicex.net

    My textbox never gets any data:
    Code:
    Imports System
    Imports System.IO
    Imports System.Net
    Imports System.Text
    
    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Dim request As HttpWebRequest
            Dim response As HttpWebResponse = Nothing
            Dim reader As StreamReader
    
            Try
    
                request = WebRequest.Create("http://www.webservicex.net/stockquote.asmx?F")
                request.Method = "POST"
                ' Get response   
                request.ContentType = "text/xml"
                request.Headers.Add("SOAPAction", "http://webserviceX.NET/GetQuote")
    
                response = DirectCast(request.GetResponse(), HttpWebResponse)
    
                reader = New StreamReader(response.GetResponseStream())
                txtOutput1.Text = (reader.ReadToEnd())
    
            Finally
                If Not response Is Nothing Then response.Close()
            End Try
    
        End Sub

  2. #2

    Thread Starter
    New Member
    Join Date
    Dec 2008
    Posts
    8

    Re: Trying to get stock data from webservicex.net

    Anyone?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width