Project

Profile

Help

Bug #6173

closed

Namespace with empty uri when using Saxon-11.5

Added by Shabu SF over 1 year ago. Updated about 1 year ago.

Status:
Duplicate
Priority:
High
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2023-08-16
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
11
Fix Committed on Branch:
11
Fixed in Maintenance Release:
Platforms:
Java

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

Is duplicate of Saxon - Bug #5951: XQuery with DOMResult - empty prefixed namespace bindings added to children elementsResolvedMichael Kay2023-04-01

Actions
Actions #1

Updated by Debbie Lockett about 1 year ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
  • Applies to branch 11 added
  • Fix Committed on Branch 11 added
  • Fixed in Maintenance Release 11.6 added

Bug fix applied in the Saxon 11.6 maintenance release.

Actions #2

Updated by Michael Kay about 1 year ago

  • Is duplicate of Bug #5951: XQuery with DOMResult - empty prefixed namespace bindings added to children elements added
Actions #3

Updated by Michael Kay about 1 year ago

  • Status changed from Closed to Duplicate

Please register to edit this issue

Also available in: Atom PDF