writer.writeStartDocument();
writer.writeStartElement(version.getPrefix(),"EndpointReference", version.nsUri);
writer.writeNamespace(version.getPrefix(),version.nsUri);
writer.writeStartElement(version.getPrefix(),"Address", version.nsUri);
writer.writeCharacters(address);
writer.writeEndElement();
if(referenceParameters != null) {
writer.writeStartElement(version.getPrefix(),"ReferenceParameters", version.nsUri);
for (Element e : referenceParameters)
DOMUtil.serializeNode(e, writer);
writer.writeEndElement();