new marshaller instance ensures we use marshalling properties and correct validation...
[vamsas.git] / src / uk / ac / vamsas / client / VorbaXmlBinder.java
index dadd3fa..9462494 100644 (file)
@@ -167,7 +167,8 @@ public class VorbaXmlBinder implements UnmarshalListener {
     if (doc.__vorba==null)
       doc.__vorba = vorba;
     doc.__ensure_instance_ids(); // this may take a while. Do we allow for cyclic references ? 
-    doc.marshal(outstream);
+    Marshaller mshl = new Marshaller(outstream);
+    mshl.marshal(doc);
 
   }
   /**
@@ -216,8 +217,9 @@ public class VorbaXmlBinder implements UnmarshalListener {
     Unmarshaller unmarshaller = new Unmarshaller(root);
     unmarshaller.setIDResolver(new IDResolver() {
       public Object resolve(String id) {
+        // TODO: allow for external ID resolution
         VorbaXmlBinder.log.warn("Warning - id " + id
-            + " is not found in the Vamsas XML!");
+            + " is not found in the Vamsas XML! (TODO: Ignore if this is a forward reference!)");
         return null;
       }
     });