ServiceContractAttribute::Namespace Property
.NET Framework (current version)
Gets or sets the namespace of the <portType> element in Web Services Description Language (WSDL).
Assembly: System.ServiceModel (in System.ServiceModel.dll)
Property Value
Type: System::String^The WSDL namespace of the <portType> element. The default value is "http://tempuri.org".
The following code example shows how to use the Name and Namespace properties of the ServiceContractAttribute to set the corresponding values in WSDL.
The following code example shows an Windows Communication Foundation (WCF) client for the preceding service that imported WSDL using the ServiceModel Metadata Utility Tool (Svcutil.exe). This client uses a HelloWorldClient client rather than a SampleServiceClient client (as is the case with the sample in the Example section of ServiceContractAttribute).
Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Show: