WAS v8.5 > Script the application serving environment (wsadmin) > Manage deployed applications using wsadmin.sh

Export SCA composite definitions using scripting

We can export information about the definition of a Service Component Architecture (SCA) composite to a file of your choice.

An SCA composite must be a composition unit in a business-level application.

The composite definition provides data on the composite, such as component names and service references. We can view an SCA composite definition in the dmgr console or by exporting it to a file using scripting. Exporting an SCA composite definition enables you to preserve information about the composite.

This topic describes how to export a composite definition using scripting.

You might export a composite definition before updating SCA business-level applications or before migrating to a later version of the product.

  1. Start the wsadmin scripting tool.

  2. Optional: View online help for the exportSCDL command.

    Jython:

      print AdminTask.help('exportSCDL')

    Jacl:

      $AdminTask help exportSCDL
  3. Export information about SCA composites in a domain to a file of your choice.

    Use the exportSCDL command to export the information. The command has two parameters, cuName and -exportFile, both of type String. Both parameters are required.

    Jython:

      AdminTask.exportSCDL('[-cuName SCA_composition_unit_name -exportFile /my_file]')

      AdminTask.exportSCDL('[-cuName SCA_composition_unit_name -exportFile C:/my_file]')

    Jacl:

      $AdminTask exportSCDL {-cuName SCA_composition_unit_name -exportFile /my_file}

      $AdminTask exportSCDL {-cuName SCA_composition_unit_name -exportFile C:/my_file}

    exportSCDL command elements. Run the exportSCDL command with the -cuName and -exportFile parameters.

    Variable Description
    $ is a Jacl operator for substituting a variable name with its value
    AdminTask is an object to run administrative commands with wsadmin
    exportSCDL is an AdminTask command
    SCA_composition_unit_name is the name of an SCA composition unit whose information is exported
    /my_file is the name of the file to which the composite definition is written


Results

After the exportSCDL command runs, information about the composite definition in the SCA domain is written to the specified file. WAS v8.5 displays the following message:

We can view the same composite definition information in the dmgr console. Click Applications > Application Types > Business-level applications > application_name > SCA_deployed_asset_name > View composite.


Example

Suppose the HelloWorldAsync business-level application provided as a sample with the product is installed. Run the exportSCDL command to export the composite definition information for the helloworldws composition unit:

Jython:

Jacl:

Running the exportSCDL command writes composite definition information resembling the following to the specified file:

<composite xmlns="http://www.osoa.org/xmlns/sca/1.0" targetNamespace="http://helloworld" 
    name="helloworldws"> 
    <component name="AsynchTranslatorComponent"> 
      <implementation.java class="helloworld.impl.AsynchTranslatorComponent" /> 
      <service name="AsynchTranslatorService">         <interface.java interface="helloworld.AsynchTranslatorService"
                callbackInterface="helloworld.HelloWorldCallback"/>        
        <binding.ws/>         <callback>             <binding.ws/>         </callback>      
      </service>     </component> 
</composite>

Examine the exported file to ensure that it contains the intended information.


Related concepts:

SCA composites


Related


Start the wsadmin scripting client using wsadmin.sh
View SCA composite definitions
Example: Creating an SCA business-level application with scripting
Example: Creating an SCA business-level application with the console
Manage deployed applications using wsadmin.sh


+

Search Tips   |   Advanced Search