The purpose of this exercise is to learn exception handling in Web service composition, by extending the created BPEL process in Exercise: Web Service Composition 1.
In the BPEL process of back translation in the exercise of Web service composition 1, the translation service is invoked twice. However, when invoking the translation service, exceptions might occur. For example, when invoking J-Server translation service, if the translation of English -> German is requested, exception will occur in the J-Server translation service since the language pair of English -> German is not supported. In this exercise, we will learn how to handle such exceptions in BPEL processes when invoking Web services.
Refer to Exercise: Web Service Composition 1 for the appoach of creating BPEL processes.
1.Project Preparation
2.Add Fault Handler





3.Deploy Process
| Added contents in the "catalog.xml" |
|---|
<wsdlEntry
location="project:/Backtrans/wsdl/KyotoUCLWT.wsdl"
classpath="wsdl/KyotoUCLWT.wsdl"
/>
|
Add the following contents in the "pdd:partnerLinks" tag. In the tags of "abp:User" and "abp:CleartextPassword" (the part of "******"), set the temporary ID and password (or the Language Grid user ID and password).
| Added contents in the "pdd:partnerLinks" tag |
|---|
<pdd:partnerLink name="TranslateAltPL">
<pdd:partnerRole endpointReference="static">
<wsa:EndpointReference
xmlns:wsa="http://schemas.xmlsoap.org/ws/2003/03/addressing"
xmlns:s="http://langrid.ai.soc.i.kyoto-u.ac.jp/langrid-service_1_2/services/CLWT">
<wsa:Address>http://langrid.nict.go.jp/langrid-1.2/invoker/KyotoUCLWT</wsa:Address>
<wsa:ServiceName PortName="Translation">s:KyotoUCLWT</wsa:ServiceName>
<wsp:Policy
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:abp="http://schemas.active-endpoints.com/ws/2005/12/policy">
<abp:Authentication direction="out">
<abp:User>********</abp:User>
<abp:CleartextPassword>********</abp:CleartextPassword>
</abp:Authentication>
</wsp:Policy>
</wsa:EndpointReference>
</pdd:partnerRole>
</pdd:partnerLink>
|
Add the following contents as the element of the "pdd:references" tag.
| Added contents in the "pdd:references" tag |
|---|
<pdd:wsdl
location="project:/Backtrans/wsdl/KyotoUCLWT.wsdl"
namespace="http://langrid.ai.soc.i.kyoto-u.ac.jp/langrid-service_1_2/services/CLWT"/>
|

4.Test
