17. WSE 2.0: Addressing Namespace Stores the reply to address for the response as an endpoint reference. ReplyTo Stores the destination address as an endpoint reference. From Stores the source address as a URI To Indicates the collection of properties that add additional description elements for an endpoint. ReferenceProperties Stores endpoint reference information, which is binding information for a service. EndPointReference Occurs when there is an invalid WS-Router header in the message, or when an exception occurs along the message path. AddressingFault Indicates the collection of properties that address a message, including To, From, ReplyTo, and MessageID. AddressingHeaders Stores a binding-specific address, and may be assigned to other classes, including To, From, and ReplyTo. The properties of the Address class correspond to classes that are based on endpoint references. For example, the Address.To property corresponds to the WS-Addressing To class, which is an endpoint reference. Address Specifies the XML qualified name of the operation that the SOAP message is intended for. Action Description Class
18.
19. WSE 2.0: Messaging Namespace The Context property enables you to modify the SOAP message contents within a custom WSE filter; or to process the SOAP message contents within a SoapReceiver processing class. SoapContext Context Retrieves the SOAP fault from the envelope, if there is one, and returns an Exception class. Exception Fault The header contains optional extended information for the SOAP message. The WS-Specification settings are stored in the header. XmlElement Header The body element is required for all SOAP messages. It contains qualified XML for the request and response messages. XmlElement Body The envelope is the root element of the message XML. It contains the message body and message header elements. XmlElement Envelope Description Type Property
20. WSE 2.0: SoapEnvelope SoapEnvelope message = CreateSoapMessage(); Uri toUri = new Uri( http://bluestonepartners.com/StockTrader.asmx ); SoapSender soapSender = new SoapSender(toUri); soapSender.Send(message); public SoapEnvelope CreateSoapMessage() { SoapEnvelope message = new SoapEnvelope(); RequestQuote q = new RequestQuote(); RequestQuote.Symbol = "MSFT"; message.SetBodyObject(q); // Assign the addressing SOAP message headers message.Context.Addressing.Action = new Action( "http://bluestonepartners.com/schemas/StockTrader/RequestQuote"); message.Context.Addressing.From = new From(fromUri); message.Context.Addressing.ReplyTo = new ReplyTo(fromUri); return message; }
22. WS-Routing vs. WS-Addressing Reprinted from “Moving from WS-Routing to WS-Addressing Using WSE 2.0” by Aaron Skonnard, MSDN: Web Services Developer Center