Skip to content

Conversation

@MortenHusted
Copy link

Summary

This PR potentially improves Wasabi's handling of WSDL documents that use external schemas and multiple namespaces, adding support for extracting detailed type information needed by SOAP clients like Savon.

Motivation

I ran into issues with enterprise WSDL documents where Savon needed more type information to construct requests correctly. This PR can address those gaps while keeping backward compatibility.

Disclosure

I had Claude do a bit of the heavy lifting here - but I've tested this implementation towards some of the use cases I've faced.

Let me know if you need any changes or have questions about the approach.

…nd external schema support

Enables wasabi to better parse WSDL for types, providing more
information/metadata to SOAP clients like Savon:

- Added `type_definition(type_name)` method returning rich type metadata
- Added `operation_input_type()` and `operation_output_type()` methods
- Type definitions include namespace, fields, order, and detailed field
attributes
- Field metadata includes: type, required, array, min/max occurs,
nillable

- Implemented type lookup with XSD precedence rules
- Added support for qualified type names (prefix:localname)
- Enhanced resolution for common WSDL patterns (TypeName vs
TypeNameType)

- Added `handle_include()` and `handle_import()` methods for XSD
includes/imports
- Support for both file system and HTTP-based external schemas
- Element processing handles both `name` and `ref` attributes -
Recursive parsing of nested external schemas

- Added `determine_base_path()` method supporting file paths and HTTP
URLs
- Resolves relative schema locations
- Integration between Document and Parser for consistent path handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant