diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms')
2 files changed, 21 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObject.java b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObject.java index 7e39f696bd..a485d2b5ec 100644 --- a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObject.java +++ b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObject.java @@ -32,6 +32,10 @@ import org.apache.tuscany.sca.assembly.WireFormat; public class WireFormatJMSObject implements WireFormat { public static final QName WIRE_FORMAT_JMS_BYTES_QNAME = new QName(Constants.SCA10_TUSCANY_NS, "wireFormat.jmsObject"); + public static final String WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR = "wrapSingle"; + + private boolean wrappedSingleInput = false; + public QName getSchemaName() { return WIRE_FORMAT_JMS_BYTES_QNAME; } @@ -42,4 +46,12 @@ public class WireFormatJMSObject implements WireFormat { public void setUnresolved(boolean unresolved) { } + + public void setWrappedSingleInput(boolean wrappedSingleInput) { + this.wrappedSingleInput = wrappedSingleInput; + } + + public boolean isWrappedSingleInput() { + return wrappedSingleInput; + } } diff --git a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObjectProcessor.java b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObjectProcessor.java index 806b713931..d38701d29b 100644 --- a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObjectProcessor.java +++ b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsobject/WireFormatJMSObjectProcessor.java @@ -52,7 +52,13 @@ public class WireFormatJMSObjectProcessor extends BaseStAXArtifactProcessor impl public WireFormatJMSObject read(XMLStreamReader reader) throws ContributionReadException, XMLStreamException { WireFormatJMSObject wireFormat = new WireFormatJMSObject(); - + + String wrappedSingleInput = reader.getAttributeValue(null, WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR); + if (wrappedSingleInput != null && wrappedSingleInput.length() > 0) { + if ("true".equalsIgnoreCase(wrappedSingleInput)) { + wireFormat.setWrappedSingleInput(true); + } + } return wireFormat; } @@ -64,6 +70,8 @@ public class WireFormatJMSObjectProcessor extends BaseStAXArtifactProcessor impl getArtifactType().getNamespaceURI()); writer.writeNamespace("tuscany", Constants.SCA10_TUSCANY_NS); + writer.writeAttribute(WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR, String.valueOf(wireFormat.isWrappedSingleInput())); + writer.writeEndElement(); } |