TUSCANY-3971: JMSBindingProcessor.writeOperationProperties should trim() properties prior to writing them & update logic to write JMS attributes even if properties are null.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1197149 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d63998add
commit
cfa9ec20e1
1 changed files with 6 additions and 9 deletions
|
|
@ -1304,16 +1304,14 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
|
|||
Integer jmsPriority = jmsBinding.getOperationJMSPriority(opName);
|
||||
Map<String, Object> operationProperties = jmsBinding.getOperationProperties(opName);
|
||||
|
||||
if (operationProperties != null){
|
||||
if ((jmsType != null && jmsType.length() > 0) ||
|
||||
(jmsCorrelationId != null && jmsCorrelationId.length() > 0) ||
|
||||
jmsDeliveryMode != null || jmsTimeToLive != null ||
|
||||
jmsPriority != null) {
|
||||
|
||||
if ( (operationProperties != null && !operationProperties.isEmpty()) || (jmsType != null && jmsType.trim().length() > 0) ||
|
||||
jmsDeliveryMode != null || jmsTimeToLive != null ||
|
||||
jmsPriority != null) {
|
||||
|
||||
writer.writeStartElement(Constants.SCA11_NS, JMSBindingConstants.HEADERS);
|
||||
|
||||
if (jmsType != null && jmsType.length() > 0) {
|
||||
writer.writeAttribute("type", jmsType);
|
||||
if (jmsType != null && jmsType.trim().length() > 0) {
|
||||
writer.writeAttribute("type", jmsType.trim());
|
||||
}
|
||||
|
||||
if (jmsDeliveryMode != null) {
|
||||
|
|
@ -1336,7 +1334,6 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St
|
|||
writer.writeEndElement();
|
||||
// Strange bug. Without white space, headers end tag improperly read.
|
||||
// writer.writeCharacters( " " );
|
||||
}
|
||||
}
|
||||
|
||||
writer.writeEndElement();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue