Skip to main content
Convert a WSDL file into a Bruno collection of SOAP requests you can open in the app or run with the CLI.
You do not need a script to import a WSDL file. The Bruno app imports one through Import Collection (see Import collections), and the CLI does it in one command: bru import wsdl --source <service.wsdl> --output <output-folder> (see bru import). Use the script below when you want to process the collection in your own code.
WSDL import is available in Bruno v2.14.0 and later.

External schema references

Bruno resolves xsd:import and xsd:include references that point to local files through schemaLocation. Bruno follows nested import and include chains. It resolves each schemaLocation relative to the file that declares it. The generated request bodies include types defined across all referenced files.
  • Referenced files must be local .xsd or .wsdl files, up to 10 MB each.
  • Bruno does not fetch remote (http:// or https://) schema locations.
  • Keep the referenced files at the relative paths the WSDL expects before you import it.

Convert the WSDL

Install both packages:
The converter returns a JavaScript object. Pass that object to writeCollection from @usebruno/io to write an OpenCollection YAML folder Bruno can open.
The script needs Node.js 18 or later.

1. Read the arguments

Import the converter, writeCollection from @usebruno/io, and Node’s file helpers. Take the paths from the command line and print a usage line if any are missing.

2. Convert and write

wsdlToBruno resolves to the Bruno collection. Pass it to writeCollection to save an OpenCollection YAML folder. See the API Reference for the full signature.

3. Run the script

Where:
  • <service.wsdl>: The WSDL file
  • <output-folder>: The folder to create the Bruno collection in. It is created if it does not exist
The output folder looks like this:

Full script

Open the collection in the app or run it with the CLI

Open the folder in the app, or run it with the CLI:
  1. Click the + button in the top-left corner and select Import Collection.
  2. Choose Bruno Collection, then browse to the output folder.
  3. Click Import.
See Import Collections for more detail.