Skip to content

Fix WSDL import ignoring backendBasepath with -overrideSpecBasePath - #595

Merged
rathnapandi merged 1 commit into
Axway-API-Management-Plus:developfrom
wv01:fix/wsdl-backend-basepath
Nov 5, 2026
Merged

rathnapandi merged 1 commit into
Axway-API-Management-Plus:developfrom
wv01:fix/wsdl-backend-basepath

Conversation

@wv01

@wv01 wv01 commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Problem

Running apim api import -overrideSpecBasePath on a WSDL-based API ignores backendBasepath from the API config. The backend URL from the WSDL is used instead.

Cause

WSDLSpecification.parse() turns overrideSpecBasePath off because WSDLs don't support it. But this happens after an early return true for spec locations ending in ?wsdl, .wsdl or ?singlewsdl. For those, the flag stays on, so CreateNewAPI / UpdateExistingAPI skip applying backendBasepath.
Also, parse() runs while probing other spec types (WSDL is checked before WADL/OData), so it could turn the flag off for non-WSDL specs.

Fix

Move the reset into WSDLSpecification.configureBasePath(), which always runs for the selected spec. WADLSpecification already does it this way.

Tests

  • overrideSpecBasePathIsResetForWSDLUrl: a ?wsdl URL with the flag on now applies backendBasepath.
  • parseDoesNotResetOverrideSpecBasePath: probing non-WSDL content leaves the flag unchanged.
    Both fail without the fix. All APISpecification*Test tests pass.

🤖 Generated with Claude Code

WSDLSpecification reset the overrideSpecBasePath flag in parse(), but
only after an early return for spec locations ending in ?wsdl, .wsdl or
?singlewsdl. For those, the flag stayed enabled, so CreateNewAPI and
UpdateExistingAPI skipped applying backendBasepath and the endpoint from
the WSDL was used instead.

Move the reset to configureBasePath(), which always runs for the chosen
specification (same approach as WADLSpecification). This also stops
parse() from clearing the flag while probing non-WSDL specifications.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wv01
wv01 requested a review from a team as a code owner November 5, 2026 14:43
@rathnapandi
rathnapandi merged commit 1d233b1 into Axway-API-Management-Plus:develop Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants