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
- Read the message suffix and stderr (console.error on line 1127) — they carry the original error and stack.
- Isolate the stage: log wsdlData after parser.parse to confirm parsing succeeded before schema validation.
- 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
- Pre-validate the WSDL string (type + root element) before calling.
- Keep @usebruno/schema and bruno-converters versions aligned.
- Log the parsed wsdlData before schema validation to isolate parse vs. validate failures.
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
- Import collection failed: ${err.message}
- The Collection has an invalid schema: ${err.message}
- No definitions found in WSDL
- Error in environment ${index + 1} from ${fileName}: ${err.me
- Error processing ${fileName}: ${err.message}
AI-assisted analysis of usebruno/bruno@9bdd81c7bd (2026-08-13).
Data as JSON: /api/errors/43b58ce2f5bba8c1.
Report an issue: GitHub.