[MOBY-l] jMoby bug?

Benjamin Good bmg at sfu.ca
Wed Feb 2 18:18:57 UTC 2005


Sorry, the example I sent was in the wrong mode, but the problem is the
same.  The problem is not apparent until you try to use a
MobyDataSimpleInstance as part of a template to find services.

Here is my code:

    Central worker = new CentralImpl ();
    worker.setDebug(true);
    MobyService templateService = new MobyService("dummy");
    MobyDataType type = new MobyDataType("AminoAcidSequence");

    MobyDataSimpleInstance input = new MobyDataSimpleInstance ("");
        input.setDataType (type);
        input.addNamespace (new MobyNamespace ("NCBI_gi"));
        input.setId("111076");  
        
    //query the registry for services
    input.setXmlMode(MobyDataSimpleInstance.CENTRAL_XML_MODE);
    templateService.addInput(input);
                                       
    MobyService[] validServices = worker.findService(templateService);
 
and here I get the error from moby central.


problem org.biomoby.shared.MobyException: ===ERROR===
Fault details:
[stackTrace: null]
Fault string: org.xml.sax.SAXException: SimpleDeserializer encountered a
child element, which is NOT expected, in something it was trying to
deserialize.
Fault code:  
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
Fault actor:  null
When calling:
	http://mobycentral.cbr.nrc.ca/cgi-bin/MOBY05/mobycentral.pl
===========


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

In this case, the inputs part of the template service looked like
<Input>
<Simple xmlns="http://www.biomoby.org/moby">
<objectType>AminoAcidSequence</objectType>
<Namespace>NCBI_gi</Namespace>
</Simple></Input>

If I change it to look like this

<Input>
<Simple>
<objectType>AminoAcidSequence</objectType>
<Namespace>NCBI_gi</Namespace>
</Simple></Input>

then it works.

So basically moby central doesn't like to see the xml namespace in there
any more, though I'm pretty sure this worked last summer.

-Ben




On Wed, 2005-02-02 at 10:00, Paul Gordon wrote:
> 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