Skip to content

Add SOAPAction header to generated curl commands for SOAP services - #2006

Merged
lbroudoux merged 4 commits into
masterfrom
copilot/add-soapaction-in-curl-content-type
Mar 24, 2026
Merged

lbroudoux merged 4 commits into
masterfrom
copilot/add-soapaction-in-curl-content-type

Conversation

Copilot AI commented Mar 23, 2026 •

Copy link
Copy Markdown
Contributor
  • Fix formatCurlCmd in service-detail.page.ts to add SOAPAction header for SOAP services when neither SOAPAction nor Content-Type with action= is already present in the exchange request headers
  • TypeScript type check passes
  • Code review feedback addressed (refactored null check into single variable)
  • Rebased onto latest master
Original prompt

This section details on the original issue you should resolve

<issue_title>Add SOAPAction in cURL content-type</issue_title>
<issue_description>### Describe the bug

When clicking on a generated curl command for a SOAP operation in Microcks, the SOAPAction in "content-type" header is never present. However, this header is required for some SOAP servers to correctly process the request. It would be helpful to either add it automatically or allow the user to specify it, to ensure SOAP calls work as expected.

Expected behavior

The generated curl command for SOAP operations should always include the appropriate SOAPAction in content-type header, or provide a way for the user to specify it, to ensure compatibility and avoid errors during development phase.

Actual behavior

No response

How to Reproduce?

No response

Microcks version or git rev

No response

Install method (docker-compose, helm chart, operator, docker-desktop extension,...)

No response

Additional information

No response</issue_description>

Comments on the Issue (you are @copilot in this section)

@lbroudoux To be a bit more specific: we expect the SOAP header (either `content-type=application/xml+soap;action=...` for SOAP 1.2 or `SOAPAction=...` for SOAP 1.1) to be there in the request headers. However, in some cases, it can happen that this header is not there. So the `curl` command that is built without it and thus it's possible that the mock couldn't not find the appropriate operation.

So the fix here would be: if there's no SOAP 1.2 or SOAP 1.1 action header already present, then add one explicitly when generating the curl command.</comment_new>


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] Add SOAPAction to cURL content-type header for SOAP operations Add SOAPAction header to generated curl commands for SOAP services Mar 23, 2026
Copilot AI requested a review from lbroudoux March 23, 2026 12:34

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbroudoux

Copy link
Copy Markdown
Member

@copilot Can you rebase this PR?

Copilot AI commented Mar 24, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Can you rebase this PR?

Done — the branch has been rebased onto the latest master (commit 8c017df).

Copilot AI requested a review from lbroudoux March 24, 2026 14:06
@sonarqubecloud

Copy link
Copy Markdown

@lbroudoux
lbroudoux marked this pull request as ready for review March 24, 2026 16:02
@lbroudoux
lbroudoux requested a review from yada as a code owner March 24, 2026 16:02

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbroudoux
lbroudoux merged commit af37c2c into master Mar 24, 2026
21 checks passed
@lbroudoux
lbroudoux deleted the copilot/add-soapaction-in-curl-content-type branch March 24, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SOAPAction in cURL content-type

2 participants