Thursday, 5 May 2016

Configuring Create Operation for Target Web Service


Configuring “CreateAssignment” for request:

This post illustrates about configuring create operation in SOA composite which would invoke target web-service's create.
  1. As mentioned in my previous post, open the SOA project in Jdeveloper.
  2. Open WSConnector.bpel and expand CreateOp.
 

3. Invoke an operation on the user service by dragging InvokeCreate onto the JiveWSEndPointLink.

  



4. For the create operation, select the operation relevant to create and specify the input and the output variables.

5. Click on + sign to add input/output variables.
6. You can select default names or give any name to variables.
7. Click Apply after creating variables and selecting operation.
8. Now map the input and the output variables to the target webservice variables by editing the 
    respective Assign activity, for example CreateAssignment, in the BPEL Process. 
9. For create operation, request will be from OIM to target, so one needs to map       
   “CreateOP_InputVariable” to “InvokeCreate_create_InputVariable” 
10. For all the out of box attributes, map as below, by just dragging line from source to target variable.












 11. For custom attributes/user defined fields ,map as follow. 
 12. Under “CreateOP_InputVariable”.expand otherattributes and establish a link between value and 
       target value as below:





 13. Then Edit the XPath as below:




14. Perform same steps for all custom fields. 
15. Right-click the mapping and select ignoreMissingFromData and insertMissingData for all the 
      non-mandatory fields. 
16. Save project.

Configuring Response:
This activity is used to map the response returned from target web service. 

1. Drag Drop and Assign activity after InvokeCreate and Rename it to 'CreateResponse'
2. Map the UniqueId from “InvokeCreate_create_OutputVariable” to uid of     CreateOP_OutputVariable
3. Assign the Unique Id of the account returned by the target webservice to createResponse or Uid field before CreateOpReply activity. The returned value will be considered as the unique identifier of the user or account which is used to refer to the created object. Subsequent updates of this user's attributes will send this value along with the updated attributes to the webservice connector composite.
4. Save the project. 
5. Compile and deploy the project. Test the operation from the Enterprise Manager. (See my blog on deployment here)
 


Read about : Configuring Delete Operation


Happy Reading!

3 comments: