Java Reference
In-Depth Information
Using Web Service Partners
Problem
You want to define a business process that uses external web services as partners in perform-
ing the work of the process. These partners represent services that this process will invoke.
Solution
Define a <partnerLink> and <partnerLinkType> for the web service you want to invoke.
Discussion
Partner links and partner link types are important in BPEL. If you want your orchestration to
be able to invoke other web services—and you surely do—you need to define the relation-
ship between the web services involved. So a partner link represents a possible interaction
between two services by indicating the port types used in the relationship. Partner links rep-
resent an extension to WSDL definitions, and because the relationship is defined using port
types, it quickly becomes obvious that possible invocations from within a BPEL are restricted
to services exposing a WSDL. The latest version of ActiveVOS Professional does allow you
to invoke RESTful services by translating the XML to standard WSDL messages.
Each partner link is characterized by a partner link type. The BPEL 2.0 specification defines
partner link types as follows: “A <partnerLinkType> characterizes the conversational rela-
tionship between two services by defining the roles played by each of the services in the con-
versation and specifying the portType provided by each service to receive messages withing
the context of the conversation.”
Every partner link in a BPEL has an associated partner link type that indicates how two ser-
vices will interact. Partner links are made available within a BPEL document by adding the
namespace of xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype" .
Partner link types frequently define two roles: myRole , which indicates the role of the process
itself in the relationship, and partnerRole , which indicates the role of the partner.
It is also common for a partner link type to define only a single role. Creating the partner link
type in this way indicates that the partner is able to link with any other partner, without addi-
tional requirements.
Search WWH ::




Custom Search