Php learning path: WSDL (2 ). Php learning path: WSDL (II) 3. define the logic message used by the service when the service operation is called, the service is defined as message exchange. In the wsdl document, these messages are defined as the learning path of mess php: WSDL (2)
3. define the logical message used by the service
When a service operation is called, the service is defined as message exchange. In the wsdl document, these messages are defined as message elements. These messages are composed of parts called part elements.
A service operation is defined by specifying logical messages. When an operation is called, logical messages are exchanged. (That is, logical messages represent service operations) these logical messages define the data transmitted over the network as xml documents. It contains all the parameters that are part of a method call. (That is, the parameters in a logical message are a set of parameters for the method corresponding to the operation)
Message and parameter list: each operation exposed by a service can have only one input message and one output message. The input message defines all messages received by the service when the operation is called. The output message defines all messages returned by the service when the operation is complete. A fault message defines the data returned when the service returns an error.
In addition, each operation can have a certain number of fault messages. This fault message defines the data returned when a service error occurs. These messages usually have a part that provides sufficient information to let consumers know what the error is.
Message design is used to integrate the inherent system: if you define an existing application as a service, you must ensure the method (the method to implement the operation) each parameter used in the message can be found in the message. You must ensure that the return value is also in the output message of the operation.
One way to define your message is the RPC style. When RPC is used, you define a part for each parameter in the parameter list. Each message part is based on the type at the top of types.
Your input message corresponds to one part for each input parameter, and the output message corresponds to one part for each output parameter. Add a part to return the value. If a parameter is both input and output, it is listed as input and output messages.
The RPC-style message definition is useful when the service enables the stock of the system. It is transmitted in a mode similar to TIBCO or CORBA. These systems are designed around processes and methods. Because of this, they are the easiest way to use messages for modeling. RPC is also a clear ing between services and applications.
Design the message for the SOAP service: When the RPC style is used to model the inventory system, the service Association strongly prefers the packaging document style. In the packaging document style, each message has a part. The part of the message references a packaging element, which is defined in the types element. Packaging elements have the following features: