public void writeSchema(XMLStreamWriter out) throws XMLStreamException, JAXBException { out.writeStartElement("xsd", "schema", W3C_XML_SCHEMA_NS_URI); out.writeAttribute("version", "1.0"); out.writeAttribute("targetNamespace", _namespace); out.writeNamespace(TARGET_NAMESPACE_PREFIX, _namespace); _context.generateSchemaWithoutHeader(out); for (AbstractAction action : _actionNames.values()) action.writeSchema(out, _namespace, _context); out.writeEndElement(); // schema out.flush(); }