官术网_书友最值得收藏!

Time for action – creating XML Schema for the BPEL process

Before we can start developing our BPEL process, we have to specify the XSD elements used for the input and output messages (for the request and the response message). Also, the XSD elements are used for variables within the BPEL process.

The XML schema has already been created and can be found in the BookstoreABPEL.xsd file. The default XSD elements for request and response contain only strings, which are not adequate for our example. Therefore, we will modify it.

First, we will rename it from BookstoreABPEL.xsd to BookstoreBPEL.xsd. The reason is that we might use same XSD for more than one bookstore, so we would like to have a generic XSD filename.

Our request element consists of the following elements: book ISSN, book title, edition, and date of publishing. The response element consists of the following elements: book ISSN and stock quantity.

We will perform the following steps:

  1. To rename XSD, right-click on the BookstoreABPEL.xsd file in the project tree, select Refactor, and then Rename:
  2. In the dialog box, enter the new name, BookstoreBPEL.xsd.
  3. Double-click on the BookstoreBPEL.xsd file in the Schemas folder and switch to source view.
  4. We have to define two complex elements. First, edit the existing process element, rename it to the BookData element, and enter the code shown in the following screenshot:
  5. Next, define the content of the processResponse element, which we will rename to BookDataResponse and add the two elements shown in the following screenshot:

Before we continue, let's save the XSD file.

What just happened?

We created the XSD elements used by the BPEL process. To be more accurate, we modified the autogenerated XSD file and specified the request element (BookData) and the response element (BookDataReponse).

The request element (BookData) is used as the input for the initial receive activity (receiveInput). The response element (BookDataReponse) is used by the final reply activity (replyOutput).

This is specified in the autogenerated WSDL file, which you can find in the WSDLs folder. It is named BookstoreABPEL.wsdl. Let's have a look at it.

主站蜘蛛池模板: 廉江市| 蒙自县| 崇文区| 新乡县| 马关县| 江陵县| 酒泉市| 青铜峡市| 巴里| 武定县| 武隆县| 顺昌县| 海晏县| 济阳县| 佳木斯市| 长治县| 马关县| 广灵县| 绍兴县| 周至县| 堆龙德庆县| 龙门县| 玉门市| 咸宁市| 普兰店市| 庄浪县| 云南省| 台中市| 沙田区| 乐东| 莱芜市| 宜昌市| 旺苍县| 新津县| 托克托县| 萝北县| 五莲县| 富锦市| 定襄县| 益阳市| 琼海市|