usebruno/bruno · error · Error

Import WSDL collection failed: ${err.message}

Error message

Import WSDL collection failed: ${err.message}

What it means

Thrown by the top-level wsdlToBruno catch when any stage of the WSDL import pipeline fails. It wraps the original error's message (err.message) into 'Import WSDL collection failed: ...' and logs the full error via console.error. Stages covered: type check, WSDLParser.parse, parseWSDLCollection, transformItemsInCollection, hydrateSeqInCollection, validateSchema.

Source

Thrown at packages/bruno-converters/src/wsdl/wsdl-to-bruno.js:1128

export const wsdlToBruno = async (wsdlContent) => {
  try {
    if (typeof wsdlContent !== 'string') {
      throw new Error('WSDL content must be a string');
    }

    // Parse WSDL using enhanced parser
    const parser = new WSDLParser();
    const wsdlData = await parser.parse(wsdlContent);

    const collection = parseWSDLCollection(wsdlData);
    const transformedCollection = transformItemsInCollection(collection);
    const hydratedCollection = hydrateSeqInCollection(transformedCollection);
    const validatedCollection = validateSchema(hydratedCollection);

    return validatedCollection;
  } catch (err) {
    console.error(err);
    throw new Error('Import WSDL collection failed: ' + err.message);
  }
};

export { WSDLParser, XMLSampleGenerator };
export default wsdlToBruno;

View on GitHub (pinned to 9bdd81c7bd)

Solutions

  1. Read the message suffix and stderr (console.error on line 1127) — they carry the original error and stack.
  2. Isolate the stage: log wsdlData after parser.parse to confirm parsing succeeded before schema validation.
  3. Validate the WSDL with a standalone SOAP/WSDL validator first.

Example fix

// before
const col = await wsdlToBruno(content);

// after
try {
  const col = await wsdlToBruno(content);
} catch (e) {
  console.error('wsdl import failure, content snippet:', content.slice(0, 200));
  throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

if (typeof wsdlContent !== 'string' || !/<wsdl:definitions|<definitions/.test(wsdlContent)) {
  throw new Error('Provide a valid WSDL string with a <definitions> root.');
}

Try / catch

try {
  return await wsdlToBruno(content);
} catch (e) {
  console.error('wsdl import failed; first 200 chars:', content.slice(0, 200));
  throw e;
}

Prevention

When it happens

Trigger: Any failure inside the pipeline: the type guard (error 131), 'No definitions' (error 130), schema validation failure (error 129), or an exception inside parseWSDLCollection/transformItemsInCollection.

Common situations: Corrupt WSDL; missing WSDL features the Bruno translator expects (e.g. no bindings or services); @usebruno/schema version mismatch producing a validation failure.

Related errors


AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13). Data as JSON: /api/errors/43b58ce2f5bba8c1. Report an issue: GitHub.