Saturday, October 13, 2012

In my previous two posts Part-1 and Part-2, I explained how we can design & develop extension enabled connector service (Requester or Provider ABCS). In this post I will show you how we can call external web service from ABCS extension points.

Follow below steps to invoke external web service from ABCS extension point.

Step 1.)  Create a simple composite (external web service) which will be called from ABCS extension point.
  • Create a composite with name "CreateAccountSiebelReqABCSImplExtensionService". We should follow naming conventions while creating external web service that we are going to call from ABCS extension point.
                                       {ABCSName}ExtensionService
  • Change the service name during creating BPEL process to match that we have in concrete wsdl.
Create External Web Service

  • Choose "Based on a WSDL" template and use abstract wsdl (CreateAccountSiebelReqABCSImplExtensionAbstract.wsdl) which is there in ABCS project folder to create external web service. If you don't have that abstract wsdl then you can take concrete wsdl from MDS repository "ExtensionServiceLibrary" folder. But before using concrete wsdl don't forget to remove binding and service tag to make it abstract wsdl.

choose Abstract wsdl
  • Now go to composite.xml file and check what is the port Name. If it is not same as there is concrete wsdl then change it to match with that.
<service name="CreateAccountSiebelReqABCSImplV1Extension"
           ui:wsdlLocation="CreateAccountSiebelReqABCSImplExtensionAbstract.wsdl">
    <interface.wsdl interface="http://xmlns.oracle.com/ABCSImpl/Siebel/CreateAccountSiebelCoreReqABCSImplExtension/V1#wsdl.interface(CreateAccountSiebelReqABCSImplV1ExtensionService)"/>
    <binding.ws port="http://xmlns.oracle.com/ABCSImpl/Siebel/CreateAccountSiebelCoreReqABCSImplExtension/V1#wsdl.endpoint(CreateAccountSiebelReqABCSImplV1Extension/CreateAccountSiebelReqABCSImplV1ExtensionServicePort)"/>
  </service>
  • Choose operation, means for which extension point you want to call this service.
Choose Operation
  • Add whatever logic want to add in BPEL as per your requirment. I just added one assign activity to keep it simple.
External web service BPEL
  • Now deploy this composite to server.
Step 2.) Make configuration changes for ABCS to call above created web service.
  • Change location attribute value for service tag inside extension concrete wsdl of ABCS which is there in MDS "ExtensionServiceLibrary" folder. Earlier it was pointing to Mirror service which comes default with foundation pack, but now it should point to external service endpoint.
<service name="CreateAccountSiebelReqABCSImplV1Extension">
      <port name="CreateAccountSiebelReqABCSImplV1ExtensionServicePort"
            binding="abcsext:CreateAccountSiebelReqABCSImplV1ExtensionServiceBinding">
         <soap:address location="http://localhost:8001/soa-infra/services/default/CreateAccountSiebelReqABCSImplExtensionService/CreateAccountSiebelReqABCSImplV1Extension"/>
      </port>
   </service>

Here is the sample of the Modified concrete wsdl.
  • Change Service Configuration property inside AIAConfigurationProperties.xml file to enable extension.
Change Service Configuration Properties

Now we are ready to call external web service from one of the ABCS extension point. Test ABCS and see the results.

Test Results


You can download the code from here.


Go through previous posts (Post-1, Post-2) to create Extension Enabled ABCS.


4 comments :

  1. Hi,
    I am new to AIA.
    Recently I was trying to extend ProcessFulfillmentOrderBillingBRMCommsAddSubProcess with pre and post invokeEBM extensions.
    I am using same composite for both. But when entry for both pre and post invoke is present in composite.xml i am not able to call the pre invoke and i get timeout error. but when i comment the entry for post. pre is getting called.
    Can you please help me with this.

    Thanks,
    Swapnil

    ReplyDelete
    Replies
    1. Hi Swapnil,

      To extend ABCS for more than one extension point, consider below points.

      1.) You can create/call different extension service (External Web Service) for each extension point and call it from ABCS.

      2.) If you use same extension service(External Web Service) then you need to use "Pick" activity or recieve activity for each operation.


      In your case as you mentioned you are trying to extend your ABCS at pre & post invokeEBM extension point, that means now you have two different opeartion as below.

      pre Invoke EBM operation - PreInvokeEBSEBM
      post Invoke EBM operation - PostInvokeEBSEBM


      Now if you are using only one extension service (External web service) then you need to have both the operation configured inside that composite. For this either you can use "Pick" activity which can handle multiple operations or you can use recieve activity for each operation.

      Thanks
      Vivek Garg

      Delete
  2. Hi Vivek,

    Sorry for the delayed reply, I used pick activity and included both flows in single bpel process and it worked for me.
    Thanks a lot man.

    Regards,
    Swapnil

    ReplyDelete
  3. Follow below steps to invoke external web service from ABCS extension point.learn web deisgn

    ReplyDelete