public void write(HTTPBinding httpBinding, XMLStreamWriter writer, ProcessorContext context)
throws ContributionWriteException, XMLStreamException {
writeStart(writer, HTTPBinding.TYPE.getNamespaceURI(), HTTPBinding.TYPE.getLocalPart());
if (httpBinding.getName() != null) {
writer.writeAttribute(NAME, httpBinding.getName());
}
if (httpBinding.getURI() != null) {
writer.writeAttribute(URI, httpBinding.getURI());
}
if (httpBinding.getOperationSelector() != null) {
extensionProcessor.write(httpBinding.getOperationSelector(), writer, context);
}
if (httpBinding.getRequestWireFormat() != null) {
extensionProcessor.write(httpBinding.getRequestWireFormat(), writer, context);
}
if (httpBinding.getResponseWireFormat() != null && httpBinding.getRequestWireFormat() != httpBinding
.getResponseWireFormat()) {
writeStart(writer, RESPONSE_QNAME.getNamespaceURI(), RESPONSE_QNAME.getLocalPart());
extensionProcessor.write(httpBinding.getResponseWireFormat(), writer, context);
writeEnd(writer);
}
writeEnd(writer);
}