EndpointAddress.ReadFrom Method (AddressingVersion, XmlReader)

 

Reads an endpoint address for a specified address version from a specified XML reader.

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

public static EndpointAddress ReadFrom(
	AddressingVersion addressingVersion,
	XmlReader reader
)

Parameters

addressingVersion
Type: System.ServiceModel.Channels.AddressingVersion

The AddressingVersion of the current endpoint address.

reader
Type: System.Xml.XmlReader

The XmlReader from which the endpoint address is obtained.

Return Value

Type: System.ServiceModel.EndpointAddress

The EndpointAddress read from the XML reader.

The following code shows how to read in an endpoint address from an XML dictionary reader.

          XmlReader reader = XmlReader.Create("addressdata.xml");
          XmlDictionaryReader dictReader = XmlDictionaryReader.CreateDictionaryReader(reader);
          EndpointAddress createdEA = EndpointAddress.ReadFrom
(AddressingVersion.WSAddressing10,
 dictReader,
 "EndpointReference",
 "http://www.w3.org/2005/08/addressing");

.NET Framework
Available since 3.0
Return to top
Show: