2016/05/28 - Apache Tuscany has been retired.

For more information, please explore the Attic.

 
 Apache Tuscany > Home > SCA Overview > SCA Java > Java SCA Documentation Menu > SCA Java Tools Guides User List | Dev List | Issue Tracker  

contrib2wsdl

Usage

java org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDL -c ./MyContribution -o ./myOutputDir

Description

When you use binding.ws as a service binding you can ask the runtime to generate a WSDL description of the service endpoint. For example, given the component description...

<component name="Component1">
  <implementation.java class="test.ComponentImpl"/>
  <service name="ComponentService">
    <binding.ws uri="http://localhost:8080/Component1/ComponentService"/>
  </service>
</component>

Then when you point your browser at http://localhost:8080/Component1?wsdl you will get the WSDL document that describes the Component1/ComponentService service.

The contrib2wsdl tool generates WSDL documents for all such service endpoints in the composite at the same time and writes the resulting WSDL documents to the specified directory. Given a contribution of the following structure...

MyDirectory
  MyContribution
    test
      CompoentImpl.class
    mycomposite.composite
      <composite>
        <component name="Component1">
          <implementation.java class="test.ComponentImpl"/>
          <service name="ComponentService">
            <binding.ws uri="http://localhost:8080/Component1/ComponentService"/>
          </service>
       </component>
        <component name="Component2">
          <implementation.java class="test.ComponentImpl"/>
          <service name="ComponentService">
            <binding.ws uri="http://localhost:8080/Component1/ComponentService"/>
          </service>
       </component>
     </composite>

WSDL files can be generated using the commands as follows...

cd MyDirectory
java org.apache.tuscany.tools.contrib2wsdl.Contrib2WSDL -c MyContribution -o MyOutput

This results in two WSDL files in the MyOutput directory. One for the Component1/ComponentService and one for the Component2/ComponentService.

Both -c and -o default to the current directory.

website stats