Compartilhar via


Soapsuds Tool (Soapsuds.exe)

The Soapsuds tool helps you compile client applications that communicate with XML Web services using a technique called remoting. Soapsuds.exe performs the following functions:

  • It creates XML schemas that describe services that are exposed in a common language runtime assembly.

  • It creates runtime assemblies to access services that are described by XML schemas. A schema definition can be a local file or it can be dynamically downloaded from the Internet.

soapsuds {-url:schemaUrl | -types:type1,assemblyname[,serviceEndpoint]
[;type2,assemblyname][...]] | -is:schemafile | -ia:assemblyfile} [options]
Option Description

-domain: domain

or

-d: domain

Specifies the domain name to use when connecting to a server that requires a domain name for authentication.

-generatecode

or

-gc

Generates code. This option is equivalent to using -od:., where the additional period indicates that the code should be placed in the current directory.

-httpproxyname: name

or

-hpn: name

Specifies the HTTP proxy name to use when connecting to a server through an HTTP proxy server.

-httpproxyport: number

or

-hpp: number

Specifies the HTTP proxy port number to use when connecting to a server through an HTTP proxy server.

-inputassemblyfile: assemblyfile

or

-ia: assemblyfile

Specifies the input assembly file. The tool imports all types from the assembly. When you specify an input assembly, do not include the .exe or .dll extension.

-inputdirectory: directory

or

-id: directory

Specifies the directory location of input dynamic link library (DLL) files.

-inputschemafile: schemafile

or

-is: schemafile

Specifies the input XML schema file.

-nowrappedproxy

or

-nowp

Does not create a wrapped proxy. If you do not specify this option, the tool creates a wrapped proxy by default.

-outputassemblyfile: assemblyfile

or

-oa: assemblyfile

Saves output to the specified assembly file. Soapsuds.exe always generates source code when it generates an assembly.

-outputdirectory: outputdirectory

or

-od: outputdirectory

Saves output to the specified output directory.

-outputschemafile: schemafile

or

-os: schemafile

Saves output to the specified XML schema file.

-password: password

or

-p: password

Specifies the password to use when connecting to a server that requires authentication.

-proxynamespace: namespace

or

-pn

Specifies the namespace for the code in the generated proxy. Use this option only for interop namespaces.

-sdl

Generates service description language (SDL) schema. If you do not specify this option, the tool generates Web Services Description Language (WSDL) schema. For more information on SDL, see Web Service Description.

-serviceendpoint: URL

or

-se: URL

Specifies the URL or the path to the URL for the service endpoint to place in the WSDL file.

-strongnamefile: filename

or

-sn: filename

Signs the assembly being generated with the key pair found in filename. You can generate this file using the Strong Name Tool (Sn.exe).

-types: type1,assemblyname[,serviceEndpoint] [;type2,assemblyname[,serviceEndpoint]] [...]

Specifies the input type list.

-urltoschema:schemaURL

or

-url:schemaURL

Specifies the URL from which to retrieve the XML schema.

-username: username

or

-u: username

Specifies the user name to use when connecting to a server that requires authentication.

-wrappedproxy

or

-wp

Creates a wrapped proxy. This is the default.

-wsdl

Generates WSDL schema. This is the default. For more information, see Web Service Description.

Remarks

Follow these steps to access an XML Web service from your client application:

  1. Download the XML schema for the XML Web service. (The tool's -urltoschema option allows you to reference this directly by its URL.) An XML Web service generates these schema files automatically when it publishes the XML Web service.

  2. Convert the XML schema into a run-time assembly using Soapsuds.exe. The tool always generates source code when it generates an assembly.

  3. Reference this assembly in your client application when you compile the application. You must also set up remoting so that your application recognizes the types in these assemblies as proxies to XML Web services. For more information, see .NET Remoting Overview.

Examples

The following command downloads a schema from a URL and saves it to an XML file.

soapsuds -url:https://localhost/Service/MyService.soap?wsdl 
-os:MyService.xml

The following command downloads a schema from a URL and generates code.

soapsuds -url:https://localhost/Service/MyService.soap?wsdl -gc

The following command downloads a schema from a URL, saves it to a file, and generates code.

soapsuds -url:https://localhost/Service/MyService.soap?wsdl 
-os:StockQuote.xml -gc

The following command downloads a schema from a URL, generates code, compiles, and generates an assembly.

soapsuds -url:https://localhost/Service/MyService.soap?wsdl 
-oa:StockQuote.dll

The following command converts a type to a schema and saves it to a file.

soapsuds -types:MyClass.MyMethod,Service -os:StockQuote.xml

The following command converts a type to a schema and generates code.

soapsuds -types:MyClass.MyMethod,Service -gc

The following command converts a type to a schema, saves it to a file, and generates code.

soapsuds -types:MyClass.MyMethod,Service -os:MyService.xml -gc 

See Also

Reference

.NET Framework Tools
Strong Name Tool (Sn.exe)
Web Services Description Language Tool (Wsdl.exe)
Web Services Discovery Tool (Disco.exe)
SDK Command Prompt

Concepts

XML Web Services Overview

Other Resources

.NET Framework Remoting Overview