public void write(WireFormatJMSObject wireFormat, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException { String prefix = "tuscany"; writer.writeStartElement(prefix, getArtifactType().getLocalPart(), getArtifactType().getNamespaceURI()); writer.writeNamespace("tuscany", Constants.SCA11_TUSCANY_NS); writer.writeAttribute(WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR, String.valueOf(wireFormat.isWrappedSingleInput())); writer.writeEndElement(); }
public WireFormatJMSObject read(XMLStreamReader reader, ProcessorContext context) 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); } else if ("false".equalsIgnoreCase(wrappedSingleInput)) { wireFormat.setWrappedSingleInput(false); } else { throw new ContributionReadException(WireFormatJMSObject.WIRE_FORMAT_JMS_BYTES_QNAME.toString() + ": " + wrappedSingleInput + " is not a valid attribute value for " + WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR); } } return wireFormat; }
} else if ("ObjectMessage".equalsIgnoreCase(messageProcessorName)) { jmsBinding.setRequestWireFormat(new WireFormatJMSObject()); jmsBinding.setResponseWireFormat(jmsBinding.getRequestWireFormat()); jmsBinding.setResponseWireFormatIsDefault(true);
} else if ("ObjectMessage".equalsIgnoreCase(messageProcessorName)) { jmsBinding.setRequestWireFormat(new WireFormatJMSObject()); jmsBinding.setResponseWireFormat(jmsBinding.getRequestWireFormat()); jmsBinding.setResponseWireFormatIsDefault(true);
public void write(WireFormatJMSObject wireFormat, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException { String prefix = "tuscany"; writer.writeStartElement(prefix, getArtifactType().getLocalPart(), getArtifactType().getNamespaceURI()); writer.writeNamespace("tuscany", Constants.SCA11_TUSCANY_NS); writer.writeAttribute(WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR, String.valueOf(wireFormat.isWrappedSingleInput())); writer.writeEndElement(); }
public WireFormatJMSObject read(XMLStreamReader reader, ProcessorContext context) 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); } else if ("false".equalsIgnoreCase(wrappedSingleInput)) { wireFormat.setWrappedSingleInput(false); } else { throw new ContributionReadException(WireFormatJMSObject.WIRE_FORMAT_JMS_BYTES_QNAME.toString() + ": " + wrappedSingleInput + " is not a valid attribute value for " + WireFormatJMSObject.WIRE_FORMAT_JMS_OBJECT_WRAP_SINGLE_ATTR); } } return wireFormat; }
wrapSingle = ((WireFormatJMSObject) this.binding.getRequestWireFormat()).isWrappedSingleInput();
if (!((WireFormatJMSObject) this.binding.getRequestWireFormat()).isWrappedSingleInput()){ List<Operation> opList = reference.getReference().getInterfaceContract().getInterface().getOperations();