|
Summary |
[17:32:00 | by: beyond30lyc] |
Recently learned SOAP, WSDL, JAX-RPC, JAX-WS, I feel a lot of GAINS, the following is a brief introduction: Let's start with WSDL: It is a standard above the standard, because it is based on the XML standard between the customer and the Service, is the contract between the service provider and the service client, because of this contract, heterogeneous clients and servers can communicate with each other. WSDL is first used to describe the service provider. It defines the communication rules and URLs of services and services through seven important elements of the WSDL namespace. The types element uses the XML schema language to declare the complex types used in other locations in the WSDL document. It can also be defined in other files outside the WSDL Import them through import. The message element uses the data number type defined in the type of the WSDL document. It describes the message's payload, usually the body element in the SOAP message. The porttype Element and Its Operation element describe the Web service interfaces and define their methods. Operation uses one or more message type elements. Defines the load of input and output messages. Binding assigns the porttype and operation elements to a special protocol and encoding style. The Service Element assigns the URL to a specific binding. Let's talk about the implementation mechanism of JAX-WS: In the JAX-WS implementation mechanism, the first is to use Java to WSDL protocol, according to the Java code to generate the WSDL file. annotation needs to name WebService and webmethod and Some other rules, such as binding rules. At the same time, the JAX-API also generates some intermediate classes and some descriptions during this process. You can package this result and deploy it on the javaee Server Medium. At this time, the client can generate client files based on the WSDL file location, such as some intermediate files. The two most important services I think are service interfaces and services. The service class inherits the service class, It is used to generate specific soap messages and parse soap messages, which is equivalent to the placeholder program in rpc. At this time, the client can call the Web Service through the JAX-WS customer API. Because the JAX-WS specification has not been read, some details are not particularly understood, the above summary welcome everyone to criticize and testify, In addition, the problem that occurs on the client that uses one service as another service has not been solved in time, so we need to study it in depth. |
|
|