ArcObjects Library Reference  

Form1

About the Simple SOAP SOE Sample

[C#]

Form1.cs

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SimpleSoapSOAPClient.localhost;

namespace SimpleSoapSOAPClient
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                //create instance of proxy
                USA_SimpleSoapSOE echoService = new USA_SimpleSoapSOE();
                echoService.Url = "http://localhost/ArcGIS/services/USA/MapServer/SimpleSoapSOE";

                label2.Text = echoService.EchoInput(textBox1.Text);
            }
            catch (Exception ex)
            {
                label2.Text = ex.Message;
            }
        }
    }
}

[Visual Basic .NET]

Form1.vb

Imports Microsoft.VisualBasic
Imports System
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Imports SimpleSoapSOAPClient_VBNet.localhost
Namespace SimpleSoapSOAPClient_VBNet
    Partial Public Class Form1
        Inherits Form
        Public Sub New()
            InitializeComponent()
        End Sub

        Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
            Try
                'create instance of proxy
                Dim echoService As New USA_SimpleSoapSOE_VBNet()
                echoService.Url = "http://localhost/ArcGIS/services/USA/MapServer/SimpleSoapSOE_VBNet"

                label2.Text = echoService.EchoInput(textBox1.Text)
            Catch ex As Exception
                label2.Text = ex.Message
            End Try
        End Sub
    End Class
End Namespace