LibraryToggle FramesPrintFeedback

A service’s operations are defined by specifying the logical messages that are exchanged when an operation is invoked. These logical messages define the data that is passed over a network as an XML document. They contain all of the parameters that are a part of a method invocation.

Logical messages are defined using the message element in your contracts. Each logical message consists of one or more parts, defined in part elements.

[Tip]Tip

While your messages can list each parameter as a separate part, the recommended practice is to use only a single part that encapsulates the data needed for the operation.

While RPC style is useful for modeling existing systems, the service’s community strongly favors the wrapped document style. In wrapped document style, each message has a single part. The message’s part references a wrapper element defined in the types element of the contract. The wrapper element has the following characteristics:

  • It is a complex type containing a sequence of elements. For more information see Defining complex data types.

  • If it is a wrapper for an input message:

    • It has one element for each of the method’s input parameters.

    • Its name is the same as the name of the operation with which it is associated.

  • If it is a wrapper for an output message:

    • It has one element for each of the method’s output parameters and one element for each of the method’s inout parameters.

    • Its first element represents the method’s return parameter.

    • Its name would be generated by appending Response to the name of the operation with which the wrapper is associated.

Comments powered by Disqus