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

wsa:to element is not optional [SWS-1031] #1100

Closed
gregturn opened this issue Aug 9, 2018 · 4 comments
Closed

wsa:to element is not optional [SWS-1031] #1100

gregturn opened this issue Aug 9, 2018 · 4 comments
Assignees
Labels
Milestone

Comments

@gregturn
Copy link
Contributor

gregturn commented Aug 9, 2018

Leandro opened SWS-1031 and commented

The WS-Addressing 1.0 W3C Recomendation says the wsa:to property is optional:

This OPTIONAL element (whose content is of type xs:anyURI) provides the value for the [destination] property. If this element is NOT present then the value of the [destination] property is "http://www.w3.org/2005/08/addressing/anonymous".

But org.springframework.ws.soap.addressing.client.ActionCallback.getTo() initializes the wsa:to property.

And even then, at AbstractAddressingVersion.addAddressingHeaders(), sets mustUnderstand = true to element.

So resulting message is:

<SOAP-ENV:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
    <wsa:To SOAP-ENV:mustUnderstand="1">https://example.com/ws/bla</wsa:To>
    ...
</SOAP-ENV:Header>

The wsa:to property must be optional and if set, it would be nice to have the chance to configure the mustUderestand attribute value.


Affects: 2.4.2, 3.0.3

Reference URL: https://stackoverflow.com/questions/51538667/spring-ws-wsato-element-is-not-optional

Referenced from: pull request #115

@gregturn
Copy link
Contributor Author

Greg Turnquist commented

Digging through https://www.w3.org/Submission/2004/SUBM-ws-addressing-20040810/, that document states wsa:To is a REQUIRED attribute.

@gregturn
Copy link
Contributor Author

Greg Turnquist commented

So a little more digging on my end, it appears there are TWO specs governing WS Addressing. And they conflict with each other.

Both of these specs have a DIFFERENT wsa namespaces, correspondingly:

This is why Spring Web Services has:

  • org.springframework.ws.soap.addressing.version.Addressing10
  • org.springframework.ws.soap.addressing.version.Addressing200408

These two different concrete instances of AbstractAddressingVersion target each of these specs, allowing users to pick which spec they wish to follow.

If there is a gap in what's provided and what's needed, by all means let's dive in and solve it. But the provided pull requests is inadequate to tackle it. We would need test cases for both specs, showing with and without the "to" attribute supplied, ensuring the framework acts correctly.

@gregturn
Copy link
Contributor Author

Leandro commented

You are right Greg.
I have just committed some changes and tests.

@MaskeZen
Copy link

How can set the value of the header wsa:To if it is different that the seted in the WebServiceGatewaySupport as the DefaultUri?

gregturn added a commit that referenced this issue Apr 10, 2023
Related: #1100.
Original pull request: #115.
@gregturn gregturn self-assigned this Apr 10, 2023
@gregturn gregturn added this to the 4.0.3 milestone Apr 10, 2023
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