The EjbJar discoverer creates the model in an org.eclipse.emf.ecore.xmi.XMLResource. So, this resource can be serialized back to XML by using the standard EMF mechanism : just call save() on the resource.
org.eclipse.emf.ecore.xmi.XMLResource
save()