Web Services Description Language (WSDL) is an XML based interface definition that is used to describe the functionality offered by a web service. The WSDL file contains a machine-readable description on all the details of a web service, which includes:

  • The service calling mechanism.
  • The expected parameters.
  • The data structures it returns.

When a developer updates a web service that in-turn affects the respective SOAP API, he/she needs to ensure to regenerate the corresponding WSDL file:

  • Cloud Controller (CC) - CloudControllerService.wsdl
  • Auto-scaler (AS) - AutoScalerService.wsdl

As the Java2WSDL plug-in has been added to Apache Stratos, developers can now seamlessly generate a WSDL without deploying the component into the server.

Generating a WSDL file and updating the service stub

Follow the instructions below to regenerate a WSDL file based on the Java source:

  1. Add or update the SOAP API.
  2. Build the respective component (e.g., If the change is relevant to CC, build CC).
    As the java2wsdl plugin has been added to Apache Stratos, the Java class will be automatically converted to a WSDL file and saved in the target/generated-resources/wsdl directory.
  3. Copy the WSDL file into the respective service stubs directory.

    ComponentService stubs folder path
    CC/stratos/service-stubs/org.apache.cloud.controller.service.stub/src/main/resources
    AS/stratos/service-stubs/org.apache.stratos.autoscaler.service.stub/src/main/resources
  4. Build the corresponding service stubs component.
  • No labels