Five steps written by WSDL

zhaozj2021-02-16  104

Description: This article is translated from the BPEL1.1 specification 16.2.

This article discusses an example of a simple loan approval of Web services. In this example, the customer sends a loan approval request, including the customer's personal letter.

Interest and loan amount. WEB services for loan approvals use this information to run a simple process to get "consent loans" or "refusal loans"

result. For loans below $ 10,000 and have a good credit customer, the approval is automatic. For high loans and credit uncertain customers

Households, we need to use the features provided by the other two web services. "Risk Assessment Service" is used to check the credit risk of a certain person, "

Home Evaluation Services "is used to obtain specific assessments of the project.

1. Service Description We assume that XMLns: lns = "http://loans.org/wsdl/loan-approval", the service description file is as follows:

H: Credit information message. The message is equivalent to our value object. h: Approval Message h: risk assessment message h: error message

H: Understand PortType as the method in our OO! It specifies input, output, error processing.

H: PartnerLinkType is used to distinguish roles.

We will explain the cases above.

1) Declaring namespace must provide a variety of namespaces in elements. Three must do the external namespace declaration is WSDL, SOAP and XSD (XML mode definition) XMLns = "http: //schemas.xmlsoap .org / wsdl / "is the WSDL namespace XMLns: soap =" http://schemas.xmlsoap.org/wsdl/soap/ "is the SOAP namespace, here is because it is used to make BPEL4WS, so

No need to this name space XMLns: XSD = "http://www.w3.org/2001/xmlschema" is the XSD namespace

2) Write a service element contains one or more elements, in fact, each element is a series you want to represent

Operation. Alternatively, you can also view a single porttype element as a logical grouping of various methods into classes. We call

PortType is the service - this is the origin of the name "Web Service".

Class, we can see as a service.

3) Specify the parameter OPERATION Specifies the parameters of the input parameters and output, in the WSDL term, all parameters are called "messages". A message can have multiple Part elements, Part Elements Specify Names and Types. 4) Binding the SOAP WSDL defines operations and messages in an abstraction method without considering the details of implementation . In fact, the WSDL task is to define or describe the web.

Services, then provide a reference to an external framework to define how WSDL users will implement them. You can use this frame as

WSDL abstract definitions and the Binding "between their implementations. Generally, it is bound to SOAP, of course, it is not necessary.

5) Specify the implementation When you publish a web service in the UDDI Register, it uses it. The last two steps combine the WSDL with SOAP / UDDI.

转载请注明原文地址:https://www.9cbs.com/read-11103.html

New Post(0)