Skip to content

Martini Generating Services when Consuming SOAP Services

Martini's "Consume an API" interface is designed to facilitate the creation of services that can consume SOAP APIs by leveraging the information provided in WSDL documents. Below are the steps to generate services using Martini's interface with the help of the provided image.

Steps to Generate Services from a SOAP WSDL

  1. Open the Consume API Interface

    • Access the Martini interface and locate the "Consume an API" option.
    • This can typically be found within the Navigator view or by using the menu options to navigate to API integration tools.
  2. Select the Service Location

    • In the "Location" field, specify the directory within your project where you would like the generated services to be placed.
    • For example, in the image provided, the location is set to /demo-api-crm/code.
  3. Choose the SOAP API Schema Type

    • In the interface, you will see a list of schema types. Select "WSDL/Web Service" to generate services for a SOAP API.
    • This ensures the service generation process utilizes the correct protocol and message formats associated with SOAP services.
  4. Input the WSDL Source

    • In the "File/URL" field, provide the source of the SOAP WSDL.
    • You can either drag and drop the WSDL file, browse to it locally, or enter the URL where the WSDL is hosted.
  5. Configure Logging (Optional)

    • If you wish to log requests for tracking or debugging purposes, check the "Log requests to Tracker" option.
  6. Generate the Services

    • After all the information has been entered, click the "Consume" button to initiate the service generation process.
    • Martini will then process the WSDL and create services that correspond to the operations defined within the WSDL.

Reviewing Generated Services

After the services are generated, they will appear in the specified location within your project. It is recommended to:

  • Review the generated services for accuracy.
  • Customize the services as needed to fit your business logic or integration patterns.
  • Test the services to ensure they are correctly consuming the SOAP API.