This documentation is archived and is not being maintained.

ServiceDescriptionImportStyle Enumeration

Specifies whether the Import is made to the server or to the client computer.

[Visual Basic]
<Serializable>
Public Enum ServiceDescriptionImportStyle
[C#]
[Serializable]
public enum ServiceDescriptionImportStyle
[C++]
[Serializable]
__value public enum ServiceDescriptionImportStyle
[JScript]
public
   Serializable
enum ServiceDescriptionImportStyle

Remarks

An import made to the client computer will generate a proxy class with synchronous and asynchronous methods for invoking each method within an XML Web service. A server import, on the other hand, will generate an abstract class with abstract members, which you must override to provide the implementation you need.

Members

Member name Description
Client Specifies that the Import should be made to the client computer.
Server Specifies that the Import should be made to the server.

Example

[Visual Basic] 
Imports System
Imports System.Web.Services.Description

Namespace MyServiceDescription
   Class MyImporter
      Public Shared Sub Main()
         Try
            Dim myServiceDescription As ServiceDescription = _
                                       ServiceDescription.Read("Sample_vb.wsdl")
            Dim myImporter As New ServiceDescriptionImporter()
            myImporter.ProtocolName = "Soap"
            myImporter.AddServiceDescription(myServiceDescription, "", "")
            Dim myStyle As ServiceDescriptionImportStyle = myImporter.Style
            Console.WriteLine("Import style: " + myStyle.ToString())
         Catch e As Exception
            Console.WriteLine("Following exception was thrown: " + e.ToString())
         End Try
      End Sub 'Main
   End Class 'MyImporter
End Namespace 'MyServiceDescription

[C#] 
using System;
using System.Web.Services.Description;

namespace MyServiceDescription
{
   class MyImporter
   {
      public static void Main()
      {
         try
         {
            ServiceDescription myServiceDescription = 
               ServiceDescription.Read("Sample_CS.wsdl");

            ServiceDescriptionImporter myImporter = 
               new ServiceDescriptionImporter();
            
            myImporter.ProtocolName = "Soap";
            myImporter.AddServiceDescription(myServiceDescription, "", "");
            ServiceDescriptionImportStyle myStyle = myImporter.Style;
            Console.WriteLine("Import style: " + myStyle.ToString());
         }
         catch (Exception e)
         {
            Console.WriteLine("Following exception was thrown: " 
               + e.ToString());
         }
      }
   }
}

[C++] 
#using <mscorlib.dll>
#using <System.Web.Services.dll>
#using <System.Xml.dll>
using namespace System;
using namespace System::Web::Services::Description;

int main() 
{
   try 
   {
      ServiceDescription* myServiceDescription =
         ServiceDescription::Read(S"Sample_cpp.wsdl");

      ServiceDescriptionImporter* myImporter = new ServiceDescriptionImporter();

      myImporter->ProtocolName = S"Soap";
      myImporter->AddServiceDescription(myServiceDescription, S"", S"");
      ServiceDescriptionImportStyle myStyle = myImporter->Style;
      Console::WriteLine(S"Import style: {0}",__box( myStyle));
   } 
   catch (Exception* e) 
   {
      Console::WriteLine(S"Following exception was thrown: {0}", e);
   }
}

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Namespace: System.Web.Services.Description

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: System.Web.Services (in System.Web.Services.dll)

See Also

System.Web.Services.Description Namespace

Show: