Click here to Skip to main content
15,892,480 members
Articles / Web Development / ASP.NET

Universal Web Services Consumer Using HTTP POST

Rate me:
Please Sign up or sign in to vote.
3.11/5 (8 votes)
26 Jun 2007CPOL 55.1K   1K   31  
Call Web Services methods without adding a web reference.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class MainView
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()> _
    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
        Try
            If disposing AndAlso components IsNot Nothing Then
                components.Dispose()
            End If
        Finally
            MyBase.Dispose(disposing)
        End Try
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> _
    Private Sub InitializeComponent()
        Me.txtWSDLAddress = New System.Windows.Forms.TextBox
        Me.Label1 = New System.Windows.Forms.Label
        Me.txtMethod = New System.Windows.Forms.TextBox
        Me.Label2 = New System.Windows.Forms.Label
        Me.Label3 = New System.Windows.Forms.Label
        Me.txtParameterName = New System.Windows.Forms.TextBox
        Me.cmdAddParameter = New System.Windows.Forms.Button
        Me.GroupBox1 = New System.Windows.Forms.GroupBox
        Me.cmdClearParameterList = New System.Windows.Forms.Button
        Me.lstbxParameterList = New System.Windows.Forms.ListBox
        Me.txtParameterValue = New System.Windows.Forms.TextBox
        Me.Label4 = New System.Windows.Forms.Label
        Me.GroupBox2 = New System.Windows.Forms.GroupBox
        Me.txtWSResponse = New System.Windows.Forms.TextBox
        Me.cmdCallWS = New System.Windows.Forms.Button
        Me.GroupBox1.SuspendLayout()
        Me.GroupBox2.SuspendLayout()
        Me.SuspendLayout()
        '
        'txtWSDLAddress
        '
        Me.txtWSDLAddress.Location = New System.Drawing.Point(106, 18)
        Me.txtWSDLAddress.Name = "txtWSDLAddress"
        Me.txtWSDLAddress.Size = New System.Drawing.Size(306, 20)
        Me.txtWSDLAddress.TabIndex = 0
        Me.txtWSDLAddress.Text = "http://localhost/Project.WS.Auth/AuthService.asmx"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(12, 21)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(87, 13)
        Me.Label1.TabIndex = 1
        Me.Label1.Text = "WSDL's Address"
        '
        'txtMethod
        '
        Me.txtMethod.Location = New System.Drawing.Point(106, 57)
        Me.txtMethod.Name = "txtMethod"
        Me.txtMethod.Size = New System.Drawing.Size(152, 20)
        Me.txtMethod.TabIndex = 2
        '
        'Label2
        '
        Me.Label2.AutoSize = True
        Me.Label2.Location = New System.Drawing.Point(12, 60)
        Me.Label2.Name = "Label2"
        Me.Label2.Size = New System.Drawing.Size(43, 13)
        Me.Label2.TabIndex = 3
        Me.Label2.Text = "Method"
        '
        'Label3
        '
        Me.Label3.AutoSize = True
        Me.Label3.Location = New System.Drawing.Point(6, 25)
        Me.Label3.Name = "Label3"
        Me.Label3.Size = New System.Drawing.Size(35, 13)
        Me.Label3.TabIndex = 4
        Me.Label3.Text = "Name"
        '
        'txtParameterName
        '
        Me.txtParameterName.Location = New System.Drawing.Point(94, 22)
        Me.txtParameterName.Name = "txtParameterName"
        Me.txtParameterName.Size = New System.Drawing.Size(108, 20)
        Me.txtParameterName.TabIndex = 5
        '
        'cmdAddParameter
        '
        Me.cmdAddParameter.Location = New System.Drawing.Point(94, 78)
        Me.cmdAddParameter.Name = "cmdAddParameter"
        Me.cmdAddParameter.Size = New System.Drawing.Size(102, 23)
        Me.cmdAddParameter.TabIndex = 7
        Me.cmdAddParameter.Text = "Add Parameter"
        Me.cmdAddParameter.UseVisualStyleBackColor = True
        '
        'GroupBox1
        '
        Me.GroupBox1.Controls.Add(Me.cmdClearParameterList)
        Me.GroupBox1.Controls.Add(Me.lstbxParameterList)
        Me.GroupBox1.Controls.Add(Me.txtParameterValue)
        Me.GroupBox1.Controls.Add(Me.Label4)
        Me.GroupBox1.Controls.Add(Me.Label3)
        Me.GroupBox1.Controls.Add(Me.cmdAddParameter)
        Me.GroupBox1.Controls.Add(Me.txtParameterName)
        Me.GroupBox1.Location = New System.Drawing.Point(12, 95)
        Me.GroupBox1.Name = "GroupBox1"
        Me.GroupBox1.Size = New System.Drawing.Size(400, 114)
        Me.GroupBox1.TabIndex = 7
        Me.GroupBox1.TabStop = False
        Me.GroupBox1.Text = "Parameters"
        '
        'cmdClearParameterList
        '
        Me.cmdClearParameterList.Location = New System.Drawing.Point(260, 81)
        Me.cmdClearParameterList.Name = "cmdClearParameterList"
        Me.cmdClearParameterList.Size = New System.Drawing.Size(123, 23)
        Me.cmdClearParameterList.TabIndex = 10
        Me.cmdClearParameterList.Text = "Clear Parameter List"
        Me.cmdClearParameterList.UseVisualStyleBackColor = True
        '
        'lstbxParameterList
        '
        Me.lstbxParameterList.FormattingEnabled = True
        Me.lstbxParameterList.Location = New System.Drawing.Point(208, 19)
        Me.lstbxParameterList.Name = "lstbxParameterList"
        Me.lstbxParameterList.Size = New System.Drawing.Size(175, 56)
        Me.lstbxParameterList.TabIndex = 8
        '
        'txtParameterValue
        '
        Me.txtParameterValue.Location = New System.Drawing.Point(94, 52)
        Me.txtParameterValue.Name = "txtParameterValue"
        Me.txtParameterValue.Size = New System.Drawing.Size(108, 20)
        Me.txtParameterValue.TabIndex = 6
        '
        'Label4
        '
        Me.Label4.AutoSize = True
        Me.Label4.Location = New System.Drawing.Point(9, 55)
        Me.Label4.Name = "Label4"
        Me.Label4.Size = New System.Drawing.Size(34, 13)
        Me.Label4.TabIndex = 8
        Me.Label4.Text = "Value"
        '
        'GroupBox2
        '
        Me.GroupBox2.Controls.Add(Me.txtWSResponse)
        Me.GroupBox2.Location = New System.Drawing.Point(12, 244)
        Me.GroupBox2.Name = "GroupBox2"
        Me.GroupBox2.Size = New System.Drawing.Size(400, 176)
        Me.GroupBox2.TabIndex = 8
        Me.GroupBox2.TabStop = False
        Me.GroupBox2.Text = "Web Service Response"
        '
        'txtWSResponse
        '
        Me.txtWSResponse.Location = New System.Drawing.Point(9, 19)
        Me.txtWSResponse.Multiline = True
        Me.txtWSResponse.Name = "txtWSResponse"
        Me.txtWSResponse.ScrollBars = System.Windows.Forms.ScrollBars.Both
        Me.txtWSResponse.Size = New System.Drawing.Size(374, 151)
        Me.txtWSResponse.TabIndex = 0
        '
        'cmdCallWS
        '
        Me.cmdCallWS.Location = New System.Drawing.Point(312, 215)
        Me.cmdCallWS.Name = "cmdCallWS"
        Me.cmdCallWS.Size = New System.Drawing.Size(100, 23)
        Me.cmdCallWS.TabIndex = 9
        Me.cmdCallWS.Text = "Call Web Service"
        Me.cmdCallWS.UseVisualStyleBackColor = True
        '
        'MainView
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(433, 432)
        Me.Controls.Add(Me.cmdCallWS)
        Me.Controls.Add(Me.GroupBox2)
        Me.Controls.Add(Me.GroupBox1)
        Me.Controls.Add(Me.Label2)
        Me.Controls.Add(Me.txtMethod)
        Me.Controls.Add(Me.Label1)
        Me.Controls.Add(Me.txtWSDLAddress)
        Me.Name = "MainView"
        Me.Text = "Universal Web Services Consumer"
        Me.GroupBox1.ResumeLayout(False)
        Me.GroupBox1.PerformLayout()
        Me.GroupBox2.ResumeLayout(False)
        Me.GroupBox2.PerformLayout()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub
    Friend WithEvents txtWSDLAddress As System.Windows.Forms.TextBox
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents txtMethod As System.Windows.Forms.TextBox
    Friend WithEvents Label2 As System.Windows.Forms.Label
    Friend WithEvents Label3 As System.Windows.Forms.Label
    Friend WithEvents txtParameterName As System.Windows.Forms.TextBox
    Friend WithEvents cmdAddParameter As System.Windows.Forms.Button
    Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
    Friend WithEvents txtParameterValue As System.Windows.Forms.TextBox
    Friend WithEvents Label4 As System.Windows.Forms.Label
    Friend WithEvents lstbxParameterList As System.Windows.Forms.ListBox
    Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
    Friend WithEvents txtWSResponse As System.Windows.Forms.TextBox
    Friend WithEvents cmdCallWS As System.Windows.Forms.Button
    Friend WithEvents cmdClearParameterList As System.Windows.Forms.Button

End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Web Developer
Mexico Mexico
I am Pedro Ramirez from mexico, work for www.sciodev.com, the company is located in Mexico, we do outsourcing and nearshore development, we are focused on SaaS nearshore development, I started with VB.Net, but now I am ambidextrous using VB.Net or C#.

Comments and Discussions