String name = getString(reader, NAME); if (name != null) { httpBinding.setName(name); String uri = getURIString(reader, URI); if (uri != null) { httpBinding.setURI(uri);
public void write(HTTPBinding httpBinding, XMLStreamWriter writer, ProcessorContext context) throws ContributionWriteException, XMLStreamException { // writer.writeStartElement(Constants.SCA10_NS, BINDING_HTTP); writeStart(writer, HTTPBinding.TYPE.getNamespaceURI(), HTTPBinding.TYPE.getLocalPart()); // Write binding name if (httpBinding.getName() != null) { writer.writeAttribute(NAME, httpBinding.getName()); } // Write binding URI if (httpBinding.getURI() != null) { writer.writeAttribute(URI, httpBinding.getURI()); } // Write operation selectors if (httpBinding.getOperationSelector() != null) { extensionProcessor.write(httpBinding.getOperationSelector(), writer, context); } // Write wire formats 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); // writer.writeEndElement(); }