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

Incompatibility with namespace when marshalling WebFault with FaultInfo on call of WebService #1731

Closed
mjschwaiger opened this issue Aug 15, 2023 · 2 comments · Fixed by #1752

Comments

@mjschwaiger
Copy link

Updating the server to org.glassfish.jaxb:jaxb-runtime:4.0.3 introduced an incompatibility with any clients still using jaxb-runtime:4.0.2 or older. Therefore, old client installations will not work with the new server installation.

The problem appears when throwing an exception (WebFault) on the server when a service (WebService) is called from the client.

The changes in #1715 could cause this behavior.

Sample project

Sample project to illustrate the incompatibility in jaxb-ri 4.0.3: https://github.com/mjschwaiger/jaxws-jaxb-1715/blob/main

When debugging the server of the sample project and evaluating the value of Packet in method com.sun.xml.ws.server.sei.TieHandler.serializeResponse() the following differences between 4.0.2 and 4.0.3 are visible.

  • Packet of server using jaxb-impl/jaxb-runtime 4.0.2:
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>myMessage</faultstring><detail><ns2:MyFault xmlns:ns2="http://example.org/"><detailMessage>myDetailMessage</detailMessage></ns2:MyFault></detail></S:Fault></S:Body></S:Envelope>
  • Packet of server using jaxb-impl/jaxb-runtime 4.0.3:
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body><S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>myMessage</faultstring><detail><ns2:MyFault xmlns:ns2="http://example.org/"><ns2:detailMessage>myDetailMessage</ns2:detailMessage></ns2:MyFault></detail></S:Fault></S:Body></S:Envelope>

Difference in namespace of detailMessage:

  • Using jaxb-impl/jaxb-runtime 4.0.2:
<detailMessage>myDetailMessage</detailMessage>
  • Using jaxb-impl/jaxb-runtime 4.0.3:
<ns2:detailMessage>myDetailMessage</ns2:detailMessage>
@mjschwaiger
Copy link
Author

mjschwaiger commented Aug 24, 2023

@lukasj Would you please be so kind as to take a look at the sample program to make a statement as to whether we are doing something wrong here or whether you have an idea/any suggestions as to how we could solve this issue.
The main problem here is that we cannot do a "big bang update" and update all servers and clients at once.
The workaround for now is not to update to version 4.0.3, but this is not a long-term solution.
Many thanks in advance!

@cachescrubber
Copy link

I reported the same issue in #1724 but got no reaction so far.

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

Successfully merging a pull request may close this issue.

2 participants