Tag Archives: SCA

SCA Diagrammer

SCAWhile doing some research on the web I came across a Service Component Architecture Diagram Generator. The script generates diagrams for applications based on the Service Component Architecture (SCA) model. This can be a great aid to understand the relations between components in large BPEL or SOA applications.

Download the tool here. The readme is over here. The script runs on Linux/Unix and has primarily been tested with Oracle Fusion Middleware 11g applications but should work with other BPEL or SOA frameworks.

Sharing artifacts using the MDS Repository

Both during development and maintenance of code, deployment strategies relying on copying of artifacts will fail, or at least complicate the task at hand and frustrate reuse. SOA Suite offers a centralized storage for artifacts (like WSDL, XSD, and XSL files) that can be accessed both at design time and at run-time. It is called the MDS Repository, and comes with Metadata Services on top of it. It is part of the SOA Suite and doesn’t require additional installation. This blogpost will show you how to upload an artifact to the central MDS Repository, and how to use the uploaded artifact in your source code.

Locate and copy the WSDL

Locate the WSDL file in your project on the local file system, for example: C:\JDeveloper\mywork\AIApocBOUW\CreateInventoryTransactionRIBRMSProvABCSImpl.wsdl. In which a convention like C:\JDeveloper\mywork\__Workspace__\__project__ is used. You can also determine this path in JDeveloper by selecting the WSDL file and use CRTL-SHIFT-C (or by selecting contextmenu – Copy Path).

Use an FTP tool to move the file to the server running the SOA Suite. The path to use on the server depends on the application, version and component type. Typically in AIA there is a structure like $AIA_HOME/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/__Application__/__version__/__componentType__ . Where in AIA component types are ABCS Provider, ABCS Requestor, EBS, et cetera. In other environments you can create your own structure. Since you no longer need a local copy of the WSDL, remove it from your local file system.

Load the WSDL in the MDS Repository

To load the WSDL and other artifacts to the MDS repository there is an ANT script available on the server. To use ANT, make sure the needed environment settings are made correctly. When you installed AIA there is a Shell script available the will source both AIA and ANT environments: aiaenv.sh. This script can be found in ...../weblogic/aia30/aia_instances/aia30poc/bin. It can be convenient to copy this to your home directory.

  • Source AIA and ANT environment: source ./aiaenv.sh.
  • Alter the UpdateMetaDataDP.xml configuration file. It can be found in ...../weblogic/aia30/aia_instances/aia30poc/config.

In case your vi isn’t up to par use a tool like WinSCP and choose Edit in the context menu:

In the UpdateMetaDataDP.xml file alter the file set. In the example on which the screenshot is based
AIAComponents/ApplicationConnectorServiceLibrary/Retail/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl
is added.

And now you are ready to run ANT using the actual loading script:
ant –f /fs01/app/oracle/esbtst01/weblogic/aia30/Infrastructure/Install/scripts/UpdateMetaData.xml


Check the output of the ANT script:

  • check that the correct number of files has been copied.
  • the server gave a HTTP response 200.
  • The deployment of the composite was successful.

Another check to verify a correct load into the MDS Repository is to use the MDS Browser in JDeveloper to find the file you just uploaded. A refresh of the view could be needed to include the latest changes and additions.

Using the WSDL in the MDS Repository in your source code

The last step is to reference to the WSDL in the MDS Repository, since the file has been removed from the local file system. Double click the Exposed Service to open the wizard:

Choose Existing WSDL to select the WSDL from the MDS Repository:

Check the change using the source view. In the import of the WSDL in the composite.xml there should now be an URL referring to oramds:, like in the example below:

<import namespace="http://xmlns.oracle.com/ABCSImpl/LOCUS/Core/CreateStockChangeLOCUSReqABCSImpl/V1"
        location="oramds:/apps/AIAMetaData/AIAComponents/ApplicationConnectorServiceLibrary/Locus/V1/RequesterABCS/CreateStockChangeLOCUSReqABCSImpl.wsdl"
        importType="wsdl"/>

Reference binding to Service without WSDL

For the first time I had to make an integration to a service that had no WSDL deployed with it. Since the (SCA) Composite assumes a WSDL it takes some time to figure out how to realise this. Under default conditions a Reference in a (SCA) Composite in SOA Suite 11g looks something like:

<reference ui:wsdlLocation="SomeDataRef.wsdl"
                   name="SomeDataWebService">
  <interface.wsdl interface="http://ws.deltalounge.net/SomeDataService#wsdl.interface(SomeData)"
                  callbackInterface="http://ws.deltalounge.net/#wsdl.interface(SomeData)"/>
  <binding.ws port="http://ws.deltalounge.net/#wsdl.endpoint(SomeDataService/SomeData_pt)"
              location="http://ws.deltalounge.net/tstservices/SomeDataService?wsdl" />

The location of the binding.ws points to a WSDL. Which is no problem at compile time. However at runtime the WSDL can not be found and an error is raised.
This error can be prevented by pointing to the endpoint instead of to the WSDL. To accomplish this your Reference in a (SCA) Composite in SOA Suite 11g would look something like:

<reference ui:wsdlLocation="SomeDataRef.wsdl"
                   name="SomeDataWebService">
  <interface.wsdl interface="http://ws.deltalounge.net/SomeDataService#wsdl.interface(SomeData)"
                  callbackInterface="http://ws.deltalounge.net/#wsdl.interface(SomeData)"/>
  <binding.ws port="http://ws.deltalounge.net/#wsdl.endpoint(SomeDataService/SomeData_pt)"
              uri="http://ws.deltalounge.net/tst/services/SomeDataService"/>

Now there is an uri in the binding.ws refering to an endpoint.