ServiceContractAttribute.Namespace Property

Gets or sets the namespace of the <portType> element in Web Services Description Language (WSDL).

Namespace:  System.ServiceModel
Assembly:  System.ServiceModel (in System.ServiceModel.dll)

public string Namespace { get; set; }

Property Value

Type: System.String
The WSDL namespace of the <portType> element. The default value is "http://tempuri.org".


//The following code contains an example of a duplex contract that contains a callback contract.
[ServiceContract(
    Name = "SampleContract", 
    Namespace = "Silverlight", 
    CallbackContract = typeof(IDuplexClient))]
public interface IDuplexService
{
    [OperationContract(IsOneWay = true)]
    void Order(string name, int quantity);
}

[ServiceContract]
public interface IDuplexClient
{
    [OperationContract(IsOneWay = true)]
    void Receive(Order order);
}


Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: