Repository navigation
Limitations
guythetechie edited this page Jun 18, 2024
·
2 revisions
SOAP API operation policies (issue)
SOAP APIs don't store operation IDs in their specification files. As a result, APIM generates new operation IDs every time a WSDL file is imported. Because these IDs don't match what was extracted, the publisher fails when applying operation-level policies.
Here are reproduction steps:
- Create a SOAP API with an operation. APIM will generate a random ID for that operation.
- Assign a policy to the operation.
- Run the extractor. The artifacts below get generated:
-
artifacts/apis/apiA/operations/operation1/policy.xml(operation1is the randomly-generated ID). -
artifacts/apis/apiA/specification.wsdl(this specification file does not include the generated IDoperation1)
-
- Run the publisher. It fails when applying the operation policy.
- First, it creates
apiAand imports thespecification.wsdlfile. Because the WSDL file doesn't store operation IDs, APIM will create the operation with a new ID (operation2). - It then tries to apply the contents of
policy.xmltooperation1. This fails, as there's nooperation1underapiA. That original operation has been recreated with a new ID (operation2).
- First, it creates
Unfortunately there is currently no workaround for this, short of converting SOAP APIs to REST while importing WSDL files (see screenshot below). REST APIs do include operation IDs in their specification files.

If you have ideas on how to address this, please feel free to comment on the linked issue in the title.