[MOBY-l] jMoby bug?

Paul Gordon gordonp at ucalgary.ca
Wed Feb 2 18:00:08 UTC 2005


Hi Ben,

    The class seems to work fine (see the example program below).  Are 
you sure that the right XML mode set for your intended use?

----------------

coe01:/export/home/gordonp/projects/moby-live/Java/src/main 132 % cat 
TestMDSI.java

import org.biomoby.shared.MobyDataSimpleInstance;
import org.biomoby.shared.MobyDataType;

public class TestMDSI{
  public static void main(String[] args){
    MobyDataSimpleInstance mdsi = new MobyDataSimpleInstance(new 
MobyDataType("Object"), "NCBI_gi", "111076");

    mdsi.setXmlMode(MobyDataSimpleInstance.CENTRAL_XML_MODE);
    System.out.println("Central mode: ");
    System.out.println(mdsi.toXML());

    mdsi.setXmlMode(MobyDataSimpleInstance.SERVICE_XML_MODE);
    System.out.println("Service mode: ");
    System.out.println(mdsi.toXML());

  }
}
coe01:/export/home/gordonp/projects/moby-live/Java/src/main 133 % javac 
-classpath ../../lib/axis.jar:../../lib/jaxrpc.jar:. TestMDSI.java
coe01:/export/home/gordonp/projects/moby-live/Java/src/main 134 % java 
-cp .:../../lib TestMDSI                        Central mode:
<Simple xmlns="http://www.biomoby.org/moby">
<objectType>Object</objectType>
</Simple>
Service mode:
<Simple xmlns="http://www.biomoby.org/moby" 
xmlns:moby="http://www.biomoby.org/moby" 
moby:articleName="NCBI_gi"><Object namespace="" id="111076"/></Simple>






More information about the moby-l mailing list