SIMULTANEOUS API EXPOSURE FOR MESSAGES

Abstract
Embodiments described herein provide for a message object that simultaneously exposes an XML view and Type view for a message infoset. In this embodiment, interaction with a message can occur using either an XML or Type application program interface (API), which are synced. More specifically, embodiments herein provide or expose a common set of headers (e.g., SOAP headers) as “typed” properties (e.g., CLR properties), which allow for getting and/or setting a value thereof In other words, the Type API reads/writes values for typed properties without regard to how the message is encoded with XML. Moreover, the two APIs are synced such that a value can be set using one API and retrieved using the other. For example, an XML API may be used as a writing mechanism for interacting with a value, while the Type API can read that same value, and vise-versa.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

In order to describe the manner in which the above-recited and other advantages and features of the invention can be obtained, a more particular description of the invention briefly described above will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. Understanding that these drawings depict only typical embodiments of the invention and are not therefore to be considered to be limiting of its scope, the invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:



FIG. 1 illustrates a distributed system configured to utilize an open-ended object model in accordance with example embodiments;



FIG. 2A illustrates the use of a message contract to create a general message object in accordance with example embodiments;



FIG. 2B illustrates using a message formatter for communication with a service operation in accordance with example embodiments;



FIG. 3 illustrates a flow diagram for a method of using a single message object to create message instances of multiple messaging formats in accordance with example embodiments;



FIGS. 4A and 4B illustrate flow diagrams for methods of simultaneously exposing a message infoset as both an XML view and a Type view in accordance with example embodiments;



FIG. 5 illustrates a flow diagram for a method of indexing headers for a SOAP message as an array in accordance with example embodiments;



FIGS. 6A and 6B illustrate flow diagrams for methods of efficiently processing a SOAP message by attaching thereto properties representing processing state for portions of the message in accordance with example embodiments;



FIG. 7 illustrates a flow diagram for a method of formatting a layout of a message object using a message contract in accordance with example embodiments;



FIG. 8 illustrates a flow diagram for a method of creating an instance of a message object by using a message contract in accordance with example embodiments;



FIG. 9 illustrates a flow diagram for a method of automatically creating a NPDL contract in accordance with example embodiments; and



FIG. 10 illustrates a flow diagram for a method of determining a type of encoding to use for a SOAP message in accordance with example embodiments.


Claims
  • 1. In a distributed messaging system, a method of simultaneously exposing a message infoset as both an XML view and a Type view such that at least a portion of the message infoset can be written using an XML API and read using a Type API in order to efficiently process values of the message infoset, the method comprising: receiving a message infoset written using an XML writer, the message infoset including a common set of headers that exposes one or more values as both XML and typed properties; andretrieving the one or more values using a Typed API, which can read one or more of the type properties without regard to how the message is encoded using XML.
  • 2. The method of claim 1, wherein the typed properties are URI string values.
  • 3. The method of claim 1, wherein the infoset is a SOAP object.
  • 4. In a distributed messaging system, a method of simultaneously exposing a message infoset as both an XML view and a Type view such that at least a portion of the message infoset can be written using a Type API and read using an XML API in order to efficiently process values of the message infoset, the method comprising: receiving a message infoset that includes a common set of headers that exposes one or more values as both XML and typed properties, wherein the type properties are set using a Typed API; andretrieving the one or more values using an XML reader, which reads the type properties as encoded XML.
  • 5. The method of claim 4, wherein the typed properties are URI string values.
  • 6. The method of claim 4, wherein the infoset is a SOAP object.
  • 7. The method of claim 4, wherein the retrieving of the one or more values further comprises: identifying an index to a header using a XML name encapsulating the one or more values;retrieving an XML dictionary reader specific to the header that includes a read operation; andpassing the header to the read operation for creating a typed representation of the header.
  • 8. The method of claim 7, wherein the XML name is a qualified name including a name and namespace.
  • 9. In a distributed messaging system, a computer program product for implementing a method of simultaneously exposing a message infoset as both an XML view and a Type view such that at least a portion of the message infoset can be written using a Type API and read using an XML API in order to efficiently process values of the message infoset, the computer program product comprising one or more computer readable media having stored thereon computer executable instructions that, when executed by a processor, can cause the distributed messaging system to perform the following: receive a message infoset that includes a common set of headers that exposes one or more values as both XML and typed properties, wherein the type properties are set using a Typed API; andretrieve the one or more values using an XML reader, which reads the type properties as encoded XML.
  • 10. The computer program product of claim 9, wherein the typed properties are URI string values.
  • 11. The computer program product of claim 9, wherein the infoset is a SOAP object.
  • 12. The computer program product of claim 9, wherein the computer program product further comprising executable instructions that cause the distributed messaging system to perform the following when retrieving the one or more values: identify an index to a header using a XML name encapsulating the one or more values;retrieve an XML dictionary reader specific to the header that includes a read operation; andpass the header to the read operation for creating a typed representation of the header.
  • 13. The computer program product of claim 9, wherein the XML name is a qualified name including a name and namespace.
Provisional Applications (2)
Number Date Country
60764124 Jan 2006 US
60764306 Feb 2006 US