Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Manage deployed applications using wsadmin.sh


Export WSDL and XSD documents using scripting

We can export WSDL and XML schema definition (XSD) documents used by a Service Component Architecture (SCA) composition unit to a location of your choice.

Your SCA business-level application must contain one or more composition units that use a WSDL or XSD document.

A WSDL document is a file that provides a set of definitions that describe a web service in WSDL, an XML-based description language.

An XSD document is an instance of an XML schema written in the XML schema definition language. The document has the extension .xsd. The prefix xsd in the XML elements of an XSD document indicates the XML schema namespace.

We can export WSDL and XSD documents used by an SCA composition unit using the exportWSDLArtifacts command.

Run the exportWSDLArtifacts command to extract from a specified composition unit the WSDL and XSD files that are required for web services client development. The command extracts files for the services exposed by the web service binding, binding.ws.


Procedure

  1. Start wsadmin.sh.

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

    ### Jython

    print AdminTask.help('exportWSDLArtifacts')
    

    ### Jacl

    $AdminTask help exportWSDLArtifacts
    

  3. Export the WSDL and XSD documents to a location of your choice.

    Use the exportWSDLArtifacts command to export the WSDL and XSD documents. The command has two required parameters, -cuName and -exportDir, both of type String.

    ### Jython

    AdminTask.exportWSDLArtifacts('[-cuName composition_unit_name -exportDir C:/my_directory]')
    

    ### Jacl

    $AdminTask exportWSDLArtifacts {-cuName composition_unit_name -exportDir C:/my_directory}
    


Results

After the exportWSDLArtifacts command runs, the following message displays in the command window:

'CWSAM0503I: WSDL Artifacts have been exported successfully.'


Example

Suppose to export WSDL or XSD documents in the HelloWorldAsync business-level application provided as a sample with the product. Run the following command in Jython to export documents in the helloworldws composition unit:

AdminTask.exportWSDLArtifacts('[-cuName helloworldws -exportDir C:/my_directory]')

To run the command, the my_directory directory must exist on the computer.

Run the exportWSDLArtifacts command adds the helloworldws_WSDLArtifacts.zip file to the specified directory. The helloworldws_WSDLArtifacts.zip file has one WSDL file, AsynchTranslatorComponentTranslatorService_wsdlgen.wsdl.


What to do next

Examine the exported files to ensure that they contain the intended WSDL and XSD documents.

You can export WSDL and XSD documents using the admin console. See "Exporting WSDL and XSD documents."
WSDL
Example: Create an SCA business-level application with scripting
Example: Creating an SCA business-level application with the console
Manage deployed applications using wsadmin.sh
Export WSDL and XSD documents

+

Search Tips   |   Advanced Search