SOA implementations query information based on dynamic number of IDs

Source: Internet
Author: User

Today we use SOA to implement a program that queries employee information based on a dynamic number of IDs. It is then encapsulated into a OSB interface.

The effect of SOA implementation is as follows

Create an SOA project, named Blogtestsoaapp, and create a schema file in the schema of the directory, named Blogtestservice.xsd, and the resulting file structure is as follows

Then we set the input parameters and output parameters in our created schema file, where we use a Employees table
Input parameters: employee_id
Output parameters: Employee_Name

The final interface results are as follows

We're going to build a new brother in Blogtestservice. According to EMPLOYEE_ID query employee name Dbadapter

The new dpadapter into the process no longer repeat, the final interface is as follows

Then create a new BPEL

Note that the Input and output correspond to the Requestparam and Responseparam in our new blogtestservice.xsd.

Once the BPEL is finished, connect it to our dbadapter.

Double-click Bpel to enter the edit page. Create a new invoke link it to our blogtestservice.
Click the + number, the corresponding input and output settings are as follows

Then add two assign to each of the two assign and an invoke sleeve before and after the invoke, and finally the entire interface is laid out as follows

Then there are three more steps to complete the program.
Set up a foreach Countervalues first

Next we set up ASSIGN1

The expression on the left side of the employeeId corresponds to: $inputVariable. Payload/ns2:employeeid[position () = $ForEach 1Counter]
Where the Foreach1counter is the counter Name in foreach

Finally, let's set up a Assign2.

Note: The above picture resolution is large, can not see the right key directly on the new tab open.

Finally, the program is complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.