Home arrow Web Services arrow Page 2 - Business Processes and Web Services
WEB SERVICES

Business Processes and Web Services


Last week we introduced you to the idea of using existing Web services to build more complex web services. This week, we're going to take a closer look at business processes and their role in constructing Web services. This article is excerpted from chapter 12 of Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418).

Author Info:
By: Sams Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 5
August 10, 2006
TABLE OF CONTENTS:
  1. · Business Processes and Web Services
  2. · WSDL Extensions for Interactions with a Business Process
  3. · Overall Structure of a Process
  4. · Basic and Structured Activities

print this article
SEARCH DEVARTICLES

Business Processes and Web Services - WSDL Extensions for Interactions with a Business Process
(Page 2 of 4 )

A business process can invoke Web services provided by other partners, provide Web services invoked by other partners, or both. The latter case can be an asynchronous response or a complex conversation that involves multiple messages flowing in both directions.

Each side of such a conversation provides Web services that are invoked by the other side. In order to describe the relationship between the two Web services, BPEL introduces a WSDL extension called partnerLinkTypes. PartnerLinkTypes contain one or two roles, which define the responsibilities of each side of the conversation. If only one partner offers a service and the other partner is only consuming this service without offering a callback operation, then the partnerLinkType only contains one role.

The role element of the partnerLinkType refers to a WSDL portType, where one partner provides one-way or request-response operations that are consumed by the other partner. Notification or solicit-response operations, described in Chapter 4, aren't supported; they're modeled by using one-way or request-response operations provided by the other side.

The following example shows the partnerLinkType for the SkatesTown portType discussed previously. This partnerLinkType has only one role: seller. The buyer role only initiates the process and doesn't offer Web service interfaces. Therefore, it isn't needed here:

<plnk:partnerLinkType
name="purchaseOrderPartnerLinkType"> <plnk:role name="seller"> <plnk:portType name="pos:poSubmissionPortType"/> </plnk:role> </plnk:partnerLinkType>

The seller role references the portType of the Web service provided to customers by SkatesTown. The implementation of this service is a BPEL process. The process refers to the portTypes that are named in the partnerLinkType roles.

In the next snippet, a partnerLinkType is shown that has two roles pointing to different portTypes. In this example, two partners are interacting with each other, and the portTypes of both partners are respectively referred to by the two roles. The portType of the seller role is another interface provided by the SkatesTown business process. It's used for asynchronous callbacks associated with an operation provided by the supplier role:

<plnk:partnerLinkType
name="orderSuppliesPartnerLinkType"> <plnk:role name="supplier"> <plnk:portType
name="sup:orderSuppliesPortType"/> </plnk:role> <plnk:role name="seller"> <plnk:portType
name="sup:orderSuppliesCallbackPortType"/> </plnk:role> </plnk:partnerLinkType>

Later, we'll discuss two additional WSDL extensions: property and property alias definitions.


blog comments powered by Disqus
WEB SERVICES ARTICLES

- Dealing with Loose Coupling in a Service-Ori...
- Loose Coupling in a Service-Oriented Archite...
- Safety, Idempotence, and the Resource-Orient...
- The Resource-Oriented Architecture in Action
- Features of the Resource-Oriented Architectu...
- The Resource-Oriented Architecture
- Getting Started with Flex
- Automated Billing and Faxing for the Web
- An Introduction to Web Services
- The Foundations of Web Services: From Novice...
- Web Services Reengineering: Finishing Touches
- Fault Handling with Web Services
- Flow and Web Services
- Process Lifecycles and Web Services
- Business Processes and Web Services

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials