Export (0) Print
Expand All
Expand Minimize

SoapBindingUse Enumeration

Specifies whether the message parts are encoded as abstract type definitions or concrete schema definitions.

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

Remarks

This enumeration applies to extensibility elements which specify that data transmissions use the SOAP protocol, and which are added to FaultBinding, InputBinding and OutputBinding instances.

For more information about specifying protocols for XML Web services, see Building XML Web Services Using ASP.NET. For more information about Web Services Description Language (WSDL), see the specification at http://www.w3.org/TR/wsdl/.

Members

Member name Description
Default

Supported by the .NET Compact Framework.

Specifies an empty string ("") value for the corresponding XML use attribute.
Encoded

Supported by the .NET Compact Framework.

The message parts are encoded using given encoding rules.
Literal

Supported by the .NET Compact Framework.

The message parts represent a concrete schema.

Example

[Visual Basic] 
<%@ WebService Language="VB" Class="ShoppingCart" %>
 
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Services.Description
Imports System

Public Class ShoppingCart
        
    ' Specify that the XML Web service method uses encoded SOAP messages.
    <SoapDocumentMethod(Use:=SoapBindingUse.Encoded), _
     WebMethod()> _
    Public Sub PlaceOrder(O as OrderItem)
        
        ' Process the order on the back end.
    End Sub
End Class

Public Class OrderItem
  Public Count As Integer
  Public Description as String
  Public OrderDate as DateTime
  Public CustomerID as Long
  Public Cost as Decimal

End Class

[C#] 
<%@ WebService Language="C#" Class="ShoppingCart" %>
 
 using System.Web.Services;
 using System.Web.Services.Protocols;
 using System.Web.Services.Description;
 using System;

 public class ShoppingCart 
 {
       [ SoapDocumentMethod(Use=SoapBindingUse.Encoded) ]
       [ WebMethod]
       public void PlaceOrder(OrderItem O) 
       {
        // Process the order on the back end.
       }      
 }

public class OrderItem
{
  public int Count;
  public int Description;
  public DateTime OrderDate;
  public long CustomerID;
  public Decimal Cost;
}


[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic 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, .NET Compact Framework

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

See Also

System.Web.Services.Description Namespace | SoapBodyBinding | SoapFaultBinding | SoapHeaderBinding | SoapHeaderFaultBinding

Show:
© 2014 Microsoft