This step is to configure four Assign activities:
To set the SOAHeader details for ship and debit SOAP request.
Note: You need to populate certain variables in the BPEL process for SOAHeader elements to pass values that may be required to set applications context during service execution. These SOAHeader elements are Responsibility, RespApplication, SecurityGroup, NLSLanguage, and Org_Id.
To set input payload for SOAP request.
To set input for SOAP request.
To set the SOAP response to output.
To add the first Assign activity to set SOAHeader details:
Assigning SOAHeader Parameters:
In Oracle JDeveloper, expand the BPEL Constructs from the Component Palette. Drag and drop the Assign activity into the center swim lane of the process diagram between the two Invoke activities you just created earlier.
Double-click the Assign activity to access the Edit Assign dialog box.
Click the General tab to enter the name for the Assign activity, such as 'SetSOAHeader'.
Select the Copy Rules tab to expand the target trees:
Click the Expression icon to invoke the Expression Builder dialog.
Enter 'OZF_USER' in the Expression box. Click OK. The Expression icon with the expression value ('OZF_USER') appears in the center of the Edit Assign dialog, between the From and To navigation tree nodes.
In the To navigation tree, navigate to Variables > Process > Variables > CREATE_SD_REQUEST_InputVariable > header > ns1:SOAHeader and select ns1:Responsibility. The To XPath value is displayed.
Drag the Expression icon to connect to the target node (ns1:Responsibility) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter second pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.
Enter 'OZF' in the Expression box. Click OK. The Expression icon with the expression value ('OZF') appears in the center of the Edit Assign dialog, between the From and To navigation tree nodes.
In the To navigation tree, navigate to Variables > Process > Variables > CREATE_SD_REQUEST_InputVariable > header > ns1:SOAHeader and select ns1:RespApplication. The To XPath field should contain your selected entry.
Drag the Expression icon to connect to the target node (ns1:RespApplication) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter the third pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.
Enter 'STANDARD' in the Expression box. Click OK. The Expression icon with the expression value ('STANDARD') appears in the center of the Edit Assign dialog, between the From and To navigation tree nodes.
In the To navigation tree, navigate to Variables > Process > Variables > CREATE_SD_REQUEST_InputVariable > header > ns1:SOAHeader and select ns1:SecurityGroup. The XPath field should contain your selected entry.
Drag the Expression icon to connect to the target node (ns1:SecurityGroup) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter the fourth pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.
Enter 'AMERICAN' in the Expression box. Click OK. The Expression icon with the expression value ('AMERICAN') appears in the center of the Edit Assign dialog, between the From and To navigation tree nodes.
In the To navigation tree, navigate to Variables > Process > Variables > CREATE_SD_REQUEST_InputVariable > header > ns1:SOAHeader and select ns1:NLSLanguage. The XPath field should contain your selected entry.
Drag the Expression icon to connect to the target node (ns1:NLSLanguage) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter the fifth pair of parameters by clicking the Expression icon to invoke the Expression Builder dialog.
Enter '204' in the Expression box. Click OK. The Expression icon with the expression value ('204') appears in the center of the Edit Assign dialog, between the From and To navigation tree nodes.
In the To navigation tree, select type Variable. Navigate to Variables > Process > Variables > CREATE_SD_REQUEST_InputVariable > header > ns1:SOAHeader and select ns1:Org_Id. The XPath field should contain your selected entry.
Drag the Expression icon to connect to the target node (ns1:Org_Id) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
The Edit Assign dialog box appears.
Click Apply and then OK to complete the configuration of the Assign activity.
To enter the second Assign activity to pass payload information to the Invoke_EBS_SDR_Service Invoke activity:
Add the second Assign activity by dragging and dropping the Assign activity from the BPEL Constructs in the Component Palette into the center swim lane of the process diagram, between the 'SetSOAHeader' Assign activity and the 'Invoke_EBS_SDR_Service' Invoke activity.
Repeat Step 2 to Step 3 described in creating the first Assign activity to add the second Assign activity called 'SetPayload'.
Select the Copy Rules tab and expand the source and target trees:
In the From navigation tree, navigate to Variable > Process > Variables > InputVariable > ReadPayload_OutVariable > body and select ns3:InputParameters. The From XPath field is also displayed.
In the To navigation tree, navigate to Variable > Process > Variables > CREATE_SD_REQUEST_InputVariable > body and select ns3:InputParameters. The To XPath field is also displayed.
Drag the source node (InputParameters) to connect to the target node (InputParameters) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Click Apply and then OK to complete the configuration of the second Assign activity.
Defining Schema for BPEL Process Input Request
Before setting the input request for the SOAP request, you need to define necessary schema for BPEL process request.
From the Applications Navigator window, expand the ShipDebitRequest > SOA Content > xsd folder to open the ShipDebitRequest.xsd file.
In the Design mode, expand 'process' to view elements within process request.
Click on element 'input' and change the property name from 'input' to 'request_number' in the XML Schema window.
Select and right-click on the 'request_number' element to open the pop-up menu.
Select the Insert after element - request_number > element option. New element 'element1' is displayed in the schema design window underneath the 'request_number' element.
From the element properties section, change the name from 'element1' to 'description' and enter type as 'string'.
Similarly, insert another element called 'req_max_qty' after element 'description'.
Enter default value as '200' and type as 'decimal'.
Right-click on mouse and select the Rebuild option.
Look for compilation messages in Log to ensure the successful compilation.
To set the third Assign activity to pass the input request to the Invoke_EBS_SDR_Service Invoke activity:
Add the third Assign activity by dragging and dropping the Assign activity from the BPEL Constructs in the Component Palette into the center swim lane of the process diagram, between the second Assign activity 'SetPayload' and the Invoke_EBS_SDR_Service Invoke activity.
Repeat Step 2 to Step 3 described in creating the first Assign activity to add the third Assign activity called 'SetInput'.
Select the Copy Rules tab and expand the source and target trees:
In the From navigation tree, navigate to Variable > Process > Variables > inputVariable > Payload > client:ShipDebitRequestProcessRequst and select client:request_number. The From XPath field is also displayed.
In the To navigation tree, navigate to Variable > Process > Variables > Create_SD_REQUEST_InputVariable > Body > ns4:InputParameters >ns4:P_SDR_HDR_REC and select ns4:REQUEST_NUMBER. The To XPath field is also displayed.
Drag the source node (client:request_number) to connect to the target node (ns4:REQUEST_NUMBER) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter the second pair of parameters with the following values:
In the From navigation tree, navigate to Variable > Process > Variables > inputVariable > Payload > client:ShipDebitRequestProcessRequst and select client:description. The XPath field should contain your selected entry.
In the To navigation tree, navigate to Variable > Process > Variables > Create_SD_REQUEST_InputVariable > Body > ns4:InputParameters >ns4:P_SDR_HDR_REC and select ns4:REQUEST_DESCRIPTION. The XPath field should contain your selected entry.
Drag the source node (client:description) to connect to the target node (ns4:REQUEST_DESCRIPTION) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Enter the third pair of parameters with the following values:
In the From navigation tree, navigate to Variable > Process > Variables > inputVariable > Payload > client:ShipDebitRequestProcessRequst and select client:req_max_qty. The XPath field should contain your selected entry.
In the To navigation tree, navigate to Variable > Process > Variables > Create_SD_REQUEST_InputVariable > Body > ns4:InputParameters >ns4:P_SDR_LINES_TBL > ns4:P_SDR_LINES_TBL_ITEM and select ns4:MAX_QTY. The XPath field should contain your selected entry.
Drag the source node (client:req_max_qty) to connect to the target node (ns4:MAX_QTY) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Click Apply and then OK to complete the configuration of the Assign activity.
To add the fourth Assign activity to set SOAP response to output:
Add the fourth Assign activity by dragging and dropping the Assign activity from the BPEL Constructs in the Component Palette into the center swim lane of the process diagram, between the Invoke_EBS_SDR_Service Invoke and the replyOutput activities.
Repeat Step 2 to Step 3 described in creating the first Assign activity to add the fourth Assign activity called 'SetResponse'.
Select the Copy Rules tab and expand the source and target trees:
In the From navigation tree, navigate to Variable > Process > Variables > CREATE_SD_REQUEST_OutputVariable> body > ns3:OutputParameters and select ns3:X_RETURN_STATUS.
In the To navigation tree, navigate to Variable > Process > Variables > outputVariable> payload and select client:processResponse.
Drag the source node (ns3:X_RETURN_STATUS) to connect to the target node (client:processResponse) that you just identified. This creates a line that connects the source and target nodes. The copy rule is displayed in the From and To sections at the bottom of the Edit Assign dialog box.
Click Apply and then OK to complete the configuration of the Assign activity.
Configuring Web Service Policies
Use the following steps to add a security policy at design time:
Navigate to SOA Content > Business Rules > composite.xml. Right click on the OZF_SD_REQUEST_PUB service and select "Configure WS Policies" from the drop-down list.
The Configure SOA WS Policies dialog appears.
In the Security section, click the Add icon (+). The Select Server Security Policies dialog appears.
Select 'oracle/wss_username_token_service_policy' and click OK.
The attached security policy is shown in the Security section.
A lock icon appears in the OZF_SD_REQUEST_PUB service of the composite.xml indicating that a security policy has been successfully attached.
From the navigation menu, select View > Property Inspector to display the Property Inspector window for OZF_SD_REQUEST_PUB service component.
In the Properties section, click the Add icon (+) for binding properties. The Create Property dialog appears.
Enter 'oracle.webservices.auth.username' in the Name field and enter 'operations' as the value.
Click OK.
Use the same approach by clicking the Add icon (+) again in the Properties section for binding properties. Enter 'oracle.webservices.auth.password' in the Name field. Enter the associated password for user 'operations' in the Value field.
Click OK.
Both selected property names and values appear in the Properties section.
Click the Source tab of the composite.xml and notice that the oracle.webservices.auth.username and oracle.webservices.auth.password property names and the associated values are added to the OZF_SD_REQUEST_PUB reference.