pojo to xml complete

added method on certificate elements for use when generating xml; added declarative service to expose factory outside of bundle