Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]APIOPS can not work with SOAP service which have operation level policy #474

Closed
mmmbai opened this issue Feb 5, 2024 · 4 comments
Closed

Comments

@mmmbai
Copy link

mmmbai commented Feb 5, 2024

Release version

5.0.1

Describe the bug

APIOPS can not work with SOAP service which have operation level policy

Expected behavior

Publish tool should successfuly deploy SOAP service to second environment

Actual behavior

Publish tool failed with
2024-02-02T22:47:43.2572466Z System.Net.Http.HttpRequestException: HTTP request to URI
https://management.azure.com/subscriptions/31aa985b-4df3-43ab-87d3-92153f79500b/resourceGroups/AS-sy-APIMgmt-RG/providers/Microsoft.ApiManagement/service/as-sy-apimgmt01-apim/apis/b2bproxy-wcatappealservice-aixsproxy/operations/62b35e88397726132ca74e60/policies/policy?api-version=2022-04-01-preview&format=rawxml
failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"Entity with specified identifier not found","details":null}}'.

Reproduction Steps

  1. Create one SOAP service in APIM

  2. Click one operation, modify Inbound processing. For example " set-variable name="test" value="123" />".

  3. Run extract. We will see there is one folder under "operations" folder. The folder name is same with operation id.

  4. Run publish and we will get error like

2024-02-02T22:47:43.2572466Z System.Net.Http.HttpRequestException: HTTP request to URI
https://management.azure.com/subscriptions/31aa985b-4df3-43ab-87d3-92153f79500b/resourceGroups/AS-sy-APIMgmt-RG/providers/Microsoft.ApiManagement/service/as-sy-apimgmt01-apim/apis/b2bproxy-wcatappealservice-aixsproxy/operations/62b35e88397726132ca74e60/policies/policy?api-version=2022-04-01-preview&format=rawxml
failed with status code 400. Content is '{"error":{"code":"ValidationError","message":"Entity with specified identifier not found","details":null}}'.

Possible Root cause:
The operation id are randomly generated when we import the wsdl to dev. But after extract, there is no where save the operation id in the extracted files. When publish tool try to publish that to another environment, System generate randomly operation id which is different with dev. But when publish try to publish operation level policy based on dev. It will fail.

@waelkdouh
Copy link
Contributor

Did you check both open and closed issues? I feel I have this question come up before.

@mmmbai
Copy link
Author

mmmbai commented Feb 6, 2024

I didn't found similar report in open and closed issues. The root cause of this is compare to rest API, the extracted specification.yaml have operationId for each operation. Then publisher can create same operation based on operationId in another environment. But for SOAP, extracted specification.wsdl(and other extracted files) didn't have operationId for each method. Can extractor extract the operationId in somewhere and publisher that to another environment using same operationId?

@mmmbai
Copy link
Author

mmmbai commented Feb 6, 2024

image

@guythetechie
Copy link
Contributor

@mmmbai - see the discussion in #399. We unfortunately don't support that scenario. There are some potential workarounds discussed there, but they're all messy.

Closing as duplicate, please comment on the original issue if you have additional feedback.

@guythetechie guythetechie closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2024
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

No branches or pull requests

3 participants