Saturday, October 13, 2012

AIA 11g - Extend ABCS (Call external web service from ABCS extension point)

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.


AIA 11g - Design & Develop extension enable ABCS (Application Business Connector Service)- Part 2

In previous post (Part-1) we created Requester ABCS which is extension enabled. In this post we will move further and see what steps we need to perform before deploying Extension enabled ABCS.

Follow below steps before deployment of Extension enabled ABCS.
  • Create a concrete wsdl from abstract wsdl that is generated in last part. To create concrete wsdl  from abstract wsdl we need to add binding and service tag inside abstract wsdl.
    • Take a copy of  abstract wsdl and change it's name (remove abstract and add concrete at last). e.g "CreateAccountSiebelReqABCSImplExtensionConcrete"
    • Add Binding and Service tags inside above created wsdl file to make it concrete. Take care of naming convention while adding these tags. Below is example service tag.
                      <service name="CreateAccountSiebelReqABCSImplV1Extension">
                          <port name="CreateAccountSiebelReqABCSImplV1ExtensionServicePort"
                              binding="abcsext:CreateAccountSiebelReqABCSImplV1ExtensionServiceBinding">
                          <soap:address location="http://endpoint"/>
                        </port>
                     </service>
    • Initially, at time of development, the concrete wsdl points to sample Extension service that is shipped with foundation pack. so change your location attribute and below is example of modified service tag.
                     <service name="CreateAccountSiebelReqABCSImplV1Extension">
                          <port name="CreateAccountSiebelReqABCSImplV1ExtensionServicePort"
                              binding="abcsext:CreateAccountSiebelReqABCSImplV1ExtensionServiceBinding">
                          <soap:address location="http://localhost:8001/MirrorServlet/mirror"/>
                        </port>
                     </service>
    • MirrorServlet is a service which comes with foundation pack, function of this service is to send same data is response as it gets in request.
Here is the sample concrete wsdl file.
  • Now we should push concrete wsdl into MDS repository to the folder "ExtensionServiceLibrary".
  • In Composite.xml of the Requester ABCS a runtime wsdl with concrete binding must be specified to invoke external reference service. In composite , attributes of the element, binding.ws, cannot be empty.
  • To deploy the composite that references external web service, which is defined using an abstract wsdl, the attribute of the element binding.ws must be populated. Here WSDL refer to concrete wsdl.
<binding.ws port="[namespace of the extension service as defined in the WSDL]/V1#wsdl.endpoint(<Name of the Service as given in the WSDL>/<Name of the Porttypeas given in the WSDL>" location="[location of the concrete WSDL in the MDS]" xmlns:ns="http://xmlns.oracle.com/sca/1.0"/>
  • Below is the example of binding.ws.
<binding.ws port="http://xmlns.oracle.com/ABCSImpl/Siebel/CreateAccountSiebelCoreReqABCSImplExtension/V1#wsdl.endpoint(CreateAccountSiebelReqABCSImplV1Extension/CreateAccountSiebelReqABCSImplV1ExtensionServicePort)"
 location="oramds:/apps/AIAMetaData/AIAComponents/ExtensionServiceLibrary/Siebel/V1/CreateAccountSiebelReqABCSImplExtensionConcrete.wsdl"  xmlns:ns="http://xmlns.oracle.com/sca/1.0"/>

  • Now deploy Requester ABCS to your server.

You can download Requester ABCS Code from here.


Next post explain how we can invoke external web service from one of the ABCS extension point.