Bug #6173
closedNamespace with empty uri when using Saxon-11.5
100%
Description
Summary of the Issue:
We are using Saxon-11.5. When invoking a webservice (SOAP) using Spring-integration’s SimpleWebServiceOutboundGateway, the generated request contains namespace with empty URI causing a validation error at the receiving end. Spring uses Saxon if Saxon is present in the deployment. We could understand that this issue is fixed in Saxon version 12.2. But our project has a dependency specifically on Saxon version 11.5, and hence can the fix be patched on top of version 11.5 (probably a new maintenance release version on the 11 branch).
Code Snippet to Reproduce the Issue: We were able to recreate the issue with a sample project with same dependencies as we have in our Application. Following is the code snippet
import org.springframework.integration.support.MessageBuilder;
import org.springframework.integration.ws.SimpleWebServiceOutboundGateway;
import org.springframework.messaging.Message;
import org.springframework.ws.transport.http.HttpUrlConnectionMessageSender;
String reqBody="<NumberToWords><ubiNum>500</ubiNum></NumberToWords>";
Message<String> message = MessageBuilder.withPayload(reqBody).build();
SimpleWebServiceOutboundGateway gateway = new SimpleWebServiceOutboundGateway("http://localhost:8016/webservicesserver/NumberConversion.wso");
gateway.setMessageSenders(httpUrlConnectionMessageSender);
gateway.handleRequestMessage(message);
Upon inspecting the soap request sent, we could see namespace with empty URI in SOAP envelope
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><NumberToWords xmlns:SOAP-ENV="" ><ubiNum>500</ubiNum></NumberToWords></SOAP-ENV:Body></SOAP-ENV:Envelope>
Related issues
Please register to edit this issue