2 // Microsoft.Web.Services.Addressing.EndpointReference
4 // Author: Todd Berman <tberman@gentoo.org>
6 // (C) 2003 Todd Berman
10 using Microsoft
.Web
.Services
.Xml
;
12 namespace Microsoft
.Web
.Services
.Addressing
15 public class EndpointReference
: EndpointReferenceType
, IXmlElement
18 public EndpointReference (Address address
) : base (address
)
22 public EndpointReference (Uri uri
) : base (uri
)
26 public EndpointReference (XmlElement element
) : base ()
31 public XmlElement
GetXml (XmlDocument document
)
33 if(document
== null) {
34 throw new ArgumentNullException ("document");
36 XmlElement element
= document
.CreateElement ("wsa",
38 "http://schemas.xmlsoap.org/ws/2003/03/addressing");
40 GetXmlAny (document
, element
);
44 public void LoadXml (XmlElement element
)
47 throw new ArgumentNullException ("element");
49 if(element
.LocalName
!= "EndpointReference" || element
.NamespaceURI
!= "http://schemas.xmlsoap.org/ws/2003/03/addressing") {
50 throw new ArgumentException ("Invalid Element Supplied");
55 public static implicit operator EndpointReference (Uri uri
)
57 return new EndpointReference (uri
);
60 public static implicit operator Uri (EndpointReference obj
)
65 return obj
.Address
.Value
;