EndpointAddress Constructor (Uri^, EndpointIdentity^, AddressHeaderCollection^, XmlDictionaryReader^, XmlDictionaryReader^)
Initializes a new instance of the EndpointAddress class with a specified URI, identity, header collection, and metadata and extension readers.
Assembly: System.ServiceModel (in System.ServiceModel.dll)
public:
EndpointAddress(
Uri^ uri,
EndpointIdentity^ identity,
AddressHeaderCollection^ headers,
XmlDictionaryReader^ metadataReader,
XmlDictionaryReader^ extensionReader
)
Parameters
- uri
-
Type:
System::Uri^
The Uri that identifies the endpoint location.
- identity
-
Type:
System.ServiceModel::EndpointIdentity^
The EndpointIdentity for the endpoint.
- headers
-
Type:
System.ServiceModel.Channels::AddressHeaderCollection^
The AddressHeaderCollection that contains address information used to interact with the endpoint.
- metadataReader
-
Type:
System.Xml::XmlDictionaryReader^
The XmlDictionaryReader from which the endpoint metadata is obtained.
- extensionReader
-
Type:
System.Xml::XmlDictionaryReader^
The XmlDictionaryReader from which extensions are obtained.
The WS-Addressing specification allows for arbitrary extension elements to appear at the end of an Endpoint Reference (EPR) that can be obtained using an XmlDictionaryReader.
The following code shows how to instantiate a EndpointAddress that specifies a Uri, an EndpointIdentity, a headers collection, a metadata XmlDictionaryReader and an extension XmlDictionaryReader.
XmlDictionaryReader metadataReader = endpointAddress.GetReaderAtMetadata(); XmlDictionaryReader extensionReader = endpointAddress.GetReaderAtExtensions(); EndpointIdentity identity = EndpointIdentity.CreateUpnIdentity(WindowsIdentity.GetCurrent().Name); EndpointAddress endpointAddress2 = new EndpointAddress( new Uri("http://localhost:8003/servicemodelsamples/service/incode/identity"), identity, headers, metadataReader, extensionReader);
Available since 3.0