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

Namespace Prefix #1109

Closed
nguyenvuhoang opened this issue Jan 9, 2025 · 3 comments
Closed

Namespace Prefix #1109

nguyenvuhoang opened this issue Jan 9, 2025 · 3 comments
Labels

Comments

@nguyenvuhoang
Copy link

I'd need to generate a namespace prefix for the response object. The sample response object has the namespace as an attribute in the response object, however i need to use a prefix instead.

This is a sample of my object using a [ServiceContract(Namespace=@"http://freshfighter.net/text.xsd")] attribute.

<s:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>

Hello

</s:Body>
</s:Envelope>
The following is what I would like the response object to look like.

<s:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://freshfighter.net/test.xsd">
<s:Body>
ns1:testResponse
ns1:messageHello</ns1:message>
</ns1:testResponse>
</s:Body>
</s:Envelope>

@ola-olus
Copy link

ola-olus commented Jan 9, 2025

You can follow the solution provided here to get a custom response
https://justsimplycode.com/2020/03/29/adding-custom-suffix-in-namespaces-in-soap-web-service-xml-response-with-soapcore/

Copy link

github-actions bot commented Feb 9, 2025

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Feb 9, 2025
Copy link

This issue was closed because it has been inactive for 14 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants