Introduction
Open standards are used by enterprises as the primary means of reducing high integration and maintenance costs. A variety of heterogeneous software systems in the real world make it necessary to use policies that involve open standards, and WEB services quickly become an important part of the way to address this dilemma. Until now, it is tedious to construct an interface-friendly GUI client to interact with these systems. Part of the problem is that Web Service Description Language (Web Services Description Language, WSDL) is tending to be the only descriptive language of service endpoints, which sometimes makes it very difficult to comply, Especially for designers and user interface developers in your organization. Flex is a Rich Internet application platform developed by Macromedia, which bridges a bridge between user interface designers and more traditional server-side developers. Traditional background programmers can assemble an attractive client application by leveraging a large number of compelling visual controls, performance, layout, and existing Flash components, plus their deep knowledge of service endpoints. At any time, no matter what type of resources are available in your project, the end result is easy to create a highly interactive and tempting application that consolidates your investment in WEB services.
Understanding WSDL
To exchange messages between different SOAP service endpoints (in Flex, where the SOAP message is limited to using the HTTP protocol transport Mechanism), Flex uses the existing WSDL definition by referencing the URL of the WSDL document. The following table lists the elements that are often present in a WSDL document:
Table 1. Common WSDL elements
Element name |
Describe |
Types |
Defines the types of data that WEB service messages can use. |
Message |
Defines the format of the data to be transferred in a WEB service operation. |
PortType |
Defines one or more actions to be provided by a WEB service. |
Operation |
Defines the combination of input, output, and error messages. |
Input |
Indicates the message that the Web service client wants, such as a Flex application, to occur to the Web service. |
Output |
Indicates a message that the WEB service will send to a client, such as a Flex application. |
Fault |
Indicates the error value returned when processing a message error. |
Binding |
Indicates the network protocol that is used when communicating with a WEB service. Existing SOAP bindings include HTTP GET, HTTP POST, and MIME protocol. Flex now only points to SOAP bindings. |
Service |
Defines the set of ports. Each service element corresponds to a PORTTYPE element, which specifies different ways to access the operations defined in the PortType element. |
Port |
WEB service endpoint, which indicates the association between the binding and the network address. |
These can help us to have a unified understanding of how these elements work together to define different WEB services in a WSDL document. However, Flex manages to hide the complexity of the developer's definition of WEB services, and for most people, it's pretty much enough to know what functionality the service is offering.
It is also important to note that WSDL provides two distinct ways to describe service operations: Remote Procedure invocation (Sqlremote Procedure call,rpc) and document-oriented (document-oriented) methods. For a Flex call to an RPC service operation, it sends a SOAP message that indicates the action to invoke and the parameters required by the operation. For a Flex call to a document-oriented operation, it sends a SOAP message encapsulated as an XML document. Flex is available in both ways, but because they use a special tag, this hints at subtle differences between the two approaches. At the end of the article, the author will explain the use of these two ways in detail through various examples.
Understanding WSDL
To exchange messages between different SOAP service endpoints (in Flex, where the SOAP message is limited to using the HTTP protocol transport Mechanism), Flex uses the existing WSDL definition by referencing the URL of the WSDL document. The following table lists the elements that are often present in a WSDL document:
Table 1. Common WSDL elements
Element name |
Describe |
Types |
Defines the types of data that WEB service messages can use. |
Message |
Defines the format of the data to be transferred in a WEB service operation. |
PortType |
Defines one or more actions to be provided by a WEB service. |
Operation |
Defines the combination of input, output, and error messages. |
Input |
Indicates the message that the Web service client wants, such as a Flex application, to occur to the Web service. |
Output |
Indicates a message that the WEB service will send to a client, such as a Flex application. |
Fault |
Indicates the error value returned when processing a message error. |
Binding |
Indicates the network protocol that is used when communicating with a WEB service. Existing SOAP bindings include HTTP GET, HTTP POST, and MIME protocol. Flex now only points to SOAP bindings. |
Service |
Defines the set of ports. Each service element corresponds to a PORTTYPE element, which specifies different ways to access the operations defined in the PortType element. |
Port |
WEB service endpoint, which indicates the association between the binding and the network address. |
These can help us to have a unified understanding of how these elements work together to define different WEB services in a WSDL document. However, Flex manages to hide the complexity of the developer's definition of WEB services, and for most people, it's pretty much enough to know what functionality the service is offering.
It is also important to note that WSDL provides two distinct ways to describe service operations: Remote Procedure invocation (Sqlremote Procedure call,rpc) and document-oriented (document-oriented) methods. For a Flex call to an RPC service operation, it sends a SOAP message that indicates the action to invoke and the parameters required by the operation. For a Flex call to a document-oriented operation, it sends a SOAP message encapsulated as an XML document. Flex is available in both ways, but because they use a special tag, this hints at subtle differences between the two approaches. At the end of the article, the author will explain the use of these two ways in detail through various examples.