From groscurt at mpiz-koeln.mpg.de Mon Dec 15 04:52:09 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Mon, 15 Dec 2008 10:52:09 +0100 Subject: [MOBY-dev] Request for Java web service implementation Message-ID: <494628C9.9000604@mpiz-koeln.mpg.de> Hi all, I would like to make a request about the implementation of Biomoby java web services and i would like to have a discussion about it. Actually there are two points I like to mention. 1. If a service requires a collection as output the automatic generated skeleton accepts only an array of objects. Why does it not allow to pass a collection ? As usally the web service will produce a collection and then has to retransform it into an array to pass it to the skeleton it would be way more convienent and understandable to pass the collection directly. Would it be possible to change the automatic generation of the skeleton so that it accepts a collection ? So my suggestion would be to offer an additional method in the skeleton which accepts a collection and either to transform there the collection into an array or adding a new methods in MobyJob which accepts a collection and then sets the data (basically does the same as setDataSet(MobyObject[] data, String name, int index) only with a collection as parameter). 2. If a datatype has a String as attribute the generated moby classes offers the possibilty for the set method to pass the String or the MobyString. For any other primitives this is not the case. So if a datatype has an Integer as attribute there is only the set method which accepts the MobyInteger, but not Integer itself. Is there a reason for that ? because in this way it looks inconsequent.... I would suggest to either always accept only the Mobyxxx primitive or to add additional methods which also accepts the java equivalent... Thanks for the answers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From groscurt at mpiz-koeln.mpg.de Tue Dec 16 09:04:30 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Tue, 16 Dec 2008 15:04:30 +0100 Subject: [MOBY-dev] BUG in MobyRequest Message-ID: <4947B56E.7040005@mpiz-koeln.mpg.de> Hi, I guess I found a bug in the MobyRequest system.... I want to call the service ID2Taxonomy from our institute more than once with several inputs. Therefore i wrote the following program, which works fine. But if I change e.g. the second identifier (NP_080073.1) to AC144389_35.2, which does not return a result for the webservice, then NO result is returned at all. So, if apparently an input does not return a result, none (or some) also do not return a result, although they should. Basically there are different results depending at which position the identifier with no result appears. 1. AC144389_35.2 is at first position - the other return a result... (so thats ok) 2. AC144389_35.2 is at second position - no input returns any result :-( 3. AC144389_35.2 is at third position - only the second returns a result :-( and its getting even more confusing... if i use the same string for the job identifier as for the mobyobject identifier (e.g. in both cases NP_510335.2), then no result is returned. As soon as i changed the job identifier to anything different than NP_510335.2 - it works again and I get back a result. Did i do anything wrong or is this a bug ? Thanks and cheers Andreas public static void main( String[] args ) throws Exception { Central central = new CentralDigestCachedImpl(); MobyRequest mobyRequest = new MobyRequest( central ); MobyDataObject dataObject1 = new MobyDataObject( "", "NP_510335.2" ); MobyDataObject dataObject2 = new MobyDataObject( "", "NP_080073.1" ); MobyDataObject dataObject3 = new MobyDataObject( "", "NP_491931.1" ); MobyContentInstance instance = new MobyContentInstance(); MobyDataJob job = new MobyDataJob(); job.put( "obj1", dataObject1 ); instance.put( "obj1", job ); job = new MobyDataJob(); job.put( "obj2", dataObject2 ); instance.put( "obj2", job ); job = new MobyDataJob(); job.put( "obj3", dataObject3 ); instance.put( "obj3", job ); mobyRequest.setInput( instance ); MobyService mobyservice = new MobyService(); mobyservice.setName( "ID2Taxonomy" ); mobyservice = central.findService( mobyservice )[ 0 ]; mobyRequest.setService( mobyservice ); instance = mobyRequest.invokeService(); for ( String string : instance.keySet() ) { System.out.println( "key " + string ); MobyDataJob dataJob = instance.get( string ); MobyDataInstance[] instances = dataJob.getPrimaryData(); for ( MobyDataInstance mobyDataInstance : instances ) { MobyDataComposite composite = ( MobyDataComposite ) mobyDataInstance; System.out.println( "DATA " + composite.getId() + " - " + composite.get( "Name" ) ); } } } -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From gordonp at ucalgary.ca Tue Dec 16 09:43:02 2008 From: gordonp at ucalgary.ca (Paul Gordon) Date: Tue, 16 Dec 2008 07:43:02 -0700 Subject: [MOBY-dev] BUG in MobyRequest In-Reply-To: <4947B56E.7040005@mpiz-koeln.mpg.de> References: <4947B56E.7040005@mpiz-koeln.mpg.de> Message-ID: <4947BE76.5060005@ucalgary.ca> Hi Andreas, I'll check it out. That sounds a bit strange. Are you using the synchronous or asynchronous mode for invokeService()? Can you send me youe exact code/input? Andreas Groscurth wrote: > Hi, > > I guess I found a bug in the MobyRequest system.... > > I want to call the service ID2Taxonomy from our institute more than > once with several inputs. Therefore i wrote the following program, > which works fine. > But if I change e.g. the second identifier (NP_080073.1) to > AC144389_35.2, which does not return a result for the webservice, then > NO result is returned at all. > So, if apparently an input does not return a result, none (or some) > also do not return a result, although they should. > > Basically there are different results depending at which position the > identifier with no result appears. > > 1. AC144389_35.2 is at first position - the other return a result... > (so thats ok) > 2. AC144389_35.2 is at second position - no input returns any result :-( > 3. AC144389_35.2 is at third position - only the second returns a > result :-( > > and its getting even more confusing... if i use the same string for > the job identifier as for the mobyobject identifier (e.g. in both > cases NP_510335.2), then no result is returned. As soon as i changed > the job identifier to anything different than NP_510335.2 - it works > again and I get back a result. > > Did i do anything wrong or is this a bug ? > > Thanks and cheers > Andreas > > public static void main( String[] args ) throws Exception { > Central central = new CentralDigestCachedImpl(); > MobyRequest mobyRequest = new MobyRequest( central ); > MobyDataObject dataObject1 = new MobyDataObject( "", > "NP_510335.2" ); > MobyDataObject dataObject2 = new MobyDataObject( "", > "NP_080073.1" ); > MobyDataObject dataObject3 = new MobyDataObject( "", > "NP_491931.1" ); > > MobyContentInstance instance = new MobyContentInstance(); > MobyDataJob job = new MobyDataJob(); > job.put( "obj1", dataObject1 ); > instance.put( "obj1", job ); > > job = new MobyDataJob(); > job.put( "obj2", dataObject2 ); instance.put( "obj2", > job ); > > job = new MobyDataJob(); > job.put( "obj3", dataObject3 ); > instance.put( "obj3", job ); > > mobyRequest.setInput( instance ); > > MobyService mobyservice = new MobyService(); > mobyservice.setName( "ID2Taxonomy" ); > mobyservice = central.findService( mobyservice )[ 0 ]; > mobyRequest.setService( mobyservice ); > > instance = mobyRequest.invokeService(); > for ( String string : instance.keySet() ) { > System.out.println( "key " + string ); > MobyDataJob dataJob = instance.get( string ); > MobyDataInstance[] instances = dataJob.getPrimaryData(); > for ( MobyDataInstance mobyDataInstance : instances ) { > MobyDataComposite composite = ( MobyDataComposite ) > mobyDataInstance; > System.out.println( "DATA " + composite.getId() + " - " > + composite.get( "Name" ) ); > } > } > } > > From groscurt at mpiz-koeln.mpg.de Thu Dec 18 06:52:01 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Thu, 18 Dec 2008 12:52:01 +0100 Subject: [MOBY-dev] test registry not working Message-ID: <494A3961.2060605@mpiz-koeln.mpg.de> Hi, when i try to register anything at the test repository i receive ===ERROR=== Fault details: [stackTrace: null] [hostname: null] Fault string: DBI connect('moby_central:bioinfo.icapture.ubc.ca:3306','moby',...) failed: Can't connect to MySQL server on 'bioinfo.icapture.ubc.ca' (111) at /usr/lib/perl5/site_perl/5.8.5/MOBY/Adaptor/moby/queryapi/mysql.pm line 93 Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server Fault actor: null When calling: http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl =========== Cheers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From groscurt at mpiz-koeln.mpg.de Thu Dec 18 07:26:53 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Thu, 18 Dec 2008 13:26:53 +0100 Subject: [MOBY-dev] ant problem Message-ID: <494A418D.8070804@mpiz-koeln.mpg.de> Hi, sorry for bugging the list with all this, but however errors occur to me when i playing around ;-) so its either me, my bad luck or just an unknown error. If I run the ant commands ant cleanall compile on Unix and with a fresh moby checkout - it breaks with an ClassCastException: org.codehaus.plexus.DefaultPlexusContainer This occurs after the cleanall task is done and then while the initmaven task is proceed. on Windows it breaks with a NullPointerException - no more information is given, but at the same step. e.g. clean-services: clean-datatypes: cleanall: [delete] Deleting directory /home/proj/biomoby/moby-live/Java/build checkmaven: initmaven: BUILD FAILED java.lang.ClassCastException: org.codehaus.plexus.DefaultPlexusContainer (on linux) C:\workspace\moby\xmls\maven.xml:85: java.lang.NullPointerException (on windows) Running ant clean compile does work normally without any exceptions. Any ideas ? Cheers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From markw at illuminae.com Thu Dec 18 09:53:52 2008 From: markw at illuminae.com (Mark) Date: Thu, 18 Dec 2008 06:53:52 -0800 Subject: [MOBY-dev] test registry not working In-Reply-To: <494A3961.2060605@mpiz-koeln.mpg.de> References: <494A3961.2060605@mpiz-koeln.mpg.de> Message-ID: We're having LOTS of problems with that machine at the moment. I'm in the process of setting up a new server (two, actually) that will replace the bioinfo machine. The address will, unfortunately, change for the test registry but I'll try to convince our IT team to set-up auto-forwarding. Thanks for your patience, M On Thu, 18 Dec 2008 03:52:01 -0800, Andreas Groscurth wrote: > Hi, > > when i try to register anything at the test repository i receive > > ===ERROR=== > Fault details: > [stackTrace: null] > [hostname: null] > Fault string: DBI > connect('moby_central:bioinfo.icapture.ubc.ca:3306','moby',...) failed: > Can't connect to MySQL server on 'bioinfo.icapture.ubc.ca' (111) at > /usr/lib/perl5/site_perl/5.8.5/MOBY/Adaptor/moby/queryapi/mysql.pm line > 93 > > Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server > Fault actor: null > When calling: > http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl > =========== > > Cheers > Andreas > -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ From groscurt at mpiz-koeln.mpg.de Mon Dec 15 09:52:09 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Mon, 15 Dec 2008 10:52:09 +0100 Subject: [MOBY-dev] Request for Java web service implementation Message-ID: <494628C9.9000604@mpiz-koeln.mpg.de> Hi all, I would like to make a request about the implementation of Biomoby java web services and i would like to have a discussion about it. Actually there are two points I like to mention. 1. If a service requires a collection as output the automatic generated skeleton accepts only an array of objects. Why does it not allow to pass a collection ? As usally the web service will produce a collection and then has to retransform it into an array to pass it to the skeleton it would be way more convienent and understandable to pass the collection directly. Would it be possible to change the automatic generation of the skeleton so that it accepts a collection ? So my suggestion would be to offer an additional method in the skeleton which accepts a collection and either to transform there the collection into an array or adding a new methods in MobyJob which accepts a collection and then sets the data (basically does the same as setDataSet(MobyObject[] data, String name, int index) only with a collection as parameter). 2. If a datatype has a String as attribute the generated moby classes offers the possibilty for the set method to pass the String or the MobyString. For any other primitives this is not the case. So if a datatype has an Integer as attribute there is only the set method which accepts the MobyInteger, but not Integer itself. Is there a reason for that ? because in this way it looks inconsequent.... I would suggest to either always accept only the Mobyxxx primitive or to add additional methods which also accepts the java equivalent... Thanks for the answers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From groscurt at mpiz-koeln.mpg.de Tue Dec 16 14:04:30 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Tue, 16 Dec 2008 15:04:30 +0100 Subject: [MOBY-dev] BUG in MobyRequest Message-ID: <4947B56E.7040005@mpiz-koeln.mpg.de> Hi, I guess I found a bug in the MobyRequest system.... I want to call the service ID2Taxonomy from our institute more than once with several inputs. Therefore i wrote the following program, which works fine. But if I change e.g. the second identifier (NP_080073.1) to AC144389_35.2, which does not return a result for the webservice, then NO result is returned at all. So, if apparently an input does not return a result, none (or some) also do not return a result, although they should. Basically there are different results depending at which position the identifier with no result appears. 1. AC144389_35.2 is at first position - the other return a result... (so thats ok) 2. AC144389_35.2 is at second position - no input returns any result :-( 3. AC144389_35.2 is at third position - only the second returns a result :-( and its getting even more confusing... if i use the same string for the job identifier as for the mobyobject identifier (e.g. in both cases NP_510335.2), then no result is returned. As soon as i changed the job identifier to anything different than NP_510335.2 - it works again and I get back a result. Did i do anything wrong or is this a bug ? Thanks and cheers Andreas public static void main( String[] args ) throws Exception { Central central = new CentralDigestCachedImpl(); MobyRequest mobyRequest = new MobyRequest( central ); MobyDataObject dataObject1 = new MobyDataObject( "", "NP_510335.2" ); MobyDataObject dataObject2 = new MobyDataObject( "", "NP_080073.1" ); MobyDataObject dataObject3 = new MobyDataObject( "", "NP_491931.1" ); MobyContentInstance instance = new MobyContentInstance(); MobyDataJob job = new MobyDataJob(); job.put( "obj1", dataObject1 ); instance.put( "obj1", job ); job = new MobyDataJob(); job.put( "obj2", dataObject2 ); instance.put( "obj2", job ); job = new MobyDataJob(); job.put( "obj3", dataObject3 ); instance.put( "obj3", job ); mobyRequest.setInput( instance ); MobyService mobyservice = new MobyService(); mobyservice.setName( "ID2Taxonomy" ); mobyservice = central.findService( mobyservice )[ 0 ]; mobyRequest.setService( mobyservice ); instance = mobyRequest.invokeService(); for ( String string : instance.keySet() ) { System.out.println( "key " + string ); MobyDataJob dataJob = instance.get( string ); MobyDataInstance[] instances = dataJob.getPrimaryData(); for ( MobyDataInstance mobyDataInstance : instances ) { MobyDataComposite composite = ( MobyDataComposite ) mobyDataInstance; System.out.println( "DATA " + composite.getId() + " - " + composite.get( "Name" ) ); } } } -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From gordonp at ucalgary.ca Tue Dec 16 14:43:02 2008 From: gordonp at ucalgary.ca (Paul Gordon) Date: Tue, 16 Dec 2008 07:43:02 -0700 Subject: [MOBY-dev] BUG in MobyRequest In-Reply-To: <4947B56E.7040005@mpiz-koeln.mpg.de> References: <4947B56E.7040005@mpiz-koeln.mpg.de> Message-ID: <4947BE76.5060005@ucalgary.ca> Hi Andreas, I'll check it out. That sounds a bit strange. Are you using the synchronous or asynchronous mode for invokeService()? Can you send me youe exact code/input? Andreas Groscurth wrote: > Hi, > > I guess I found a bug in the MobyRequest system.... > > I want to call the service ID2Taxonomy from our institute more than > once with several inputs. Therefore i wrote the following program, > which works fine. > But if I change e.g. the second identifier (NP_080073.1) to > AC144389_35.2, which does not return a result for the webservice, then > NO result is returned at all. > So, if apparently an input does not return a result, none (or some) > also do not return a result, although they should. > > Basically there are different results depending at which position the > identifier with no result appears. > > 1. AC144389_35.2 is at first position - the other return a result... > (so thats ok) > 2. AC144389_35.2 is at second position - no input returns any result :-( > 3. AC144389_35.2 is at third position - only the second returns a > result :-( > > and its getting even more confusing... if i use the same string for > the job identifier as for the mobyobject identifier (e.g. in both > cases NP_510335.2), then no result is returned. As soon as i changed > the job identifier to anything different than NP_510335.2 - it works > again and I get back a result. > > Did i do anything wrong or is this a bug ? > > Thanks and cheers > Andreas > > public static void main( String[] args ) throws Exception { > Central central = new CentralDigestCachedImpl(); > MobyRequest mobyRequest = new MobyRequest( central ); > MobyDataObject dataObject1 = new MobyDataObject( "", > "NP_510335.2" ); > MobyDataObject dataObject2 = new MobyDataObject( "", > "NP_080073.1" ); > MobyDataObject dataObject3 = new MobyDataObject( "", > "NP_491931.1" ); > > MobyContentInstance instance = new MobyContentInstance(); > MobyDataJob job = new MobyDataJob(); > job.put( "obj1", dataObject1 ); > instance.put( "obj1", job ); > > job = new MobyDataJob(); > job.put( "obj2", dataObject2 ); instance.put( "obj2", > job ); > > job = new MobyDataJob(); > job.put( "obj3", dataObject3 ); > instance.put( "obj3", job ); > > mobyRequest.setInput( instance ); > > MobyService mobyservice = new MobyService(); > mobyservice.setName( "ID2Taxonomy" ); > mobyservice = central.findService( mobyservice )[ 0 ]; > mobyRequest.setService( mobyservice ); > > instance = mobyRequest.invokeService(); > for ( String string : instance.keySet() ) { > System.out.println( "key " + string ); > MobyDataJob dataJob = instance.get( string ); > MobyDataInstance[] instances = dataJob.getPrimaryData(); > for ( MobyDataInstance mobyDataInstance : instances ) { > MobyDataComposite composite = ( MobyDataComposite ) > mobyDataInstance; > System.out.println( "DATA " + composite.getId() + " - " > + composite.get( "Name" ) ); > } > } > } > > From groscurt at mpiz-koeln.mpg.de Thu Dec 18 11:52:01 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Thu, 18 Dec 2008 12:52:01 +0100 Subject: [MOBY-dev] test registry not working Message-ID: <494A3961.2060605@mpiz-koeln.mpg.de> Hi, when i try to register anything at the test repository i receive ===ERROR=== Fault details: [stackTrace: null] [hostname: null] Fault string: DBI connect('moby_central:bioinfo.icapture.ubc.ca:3306','moby',...) failed: Can't connect to MySQL server on 'bioinfo.icapture.ubc.ca' (111) at /usr/lib/perl5/site_perl/5.8.5/MOBY/Adaptor/moby/queryapi/mysql.pm line 93 Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server Fault actor: null When calling: http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl =========== Cheers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From groscurt at mpiz-koeln.mpg.de Thu Dec 18 12:26:53 2008 From: groscurt at mpiz-koeln.mpg.de (Andreas Groscurth) Date: Thu, 18 Dec 2008 13:26:53 +0100 Subject: [MOBY-dev] ant problem Message-ID: <494A418D.8070804@mpiz-koeln.mpg.de> Hi, sorry for bugging the list with all this, but however errors occur to me when i playing around ;-) so its either me, my bad luck or just an unknown error. If I run the ant commands ant cleanall compile on Unix and with a fresh moby checkout - it breaks with an ClassCastException: org.codehaus.plexus.DefaultPlexusContainer This occurs after the cleanall task is done and then while the initmaven task is proceed. on Windows it breaks with a NullPointerException - no more information is given, but at the same step. e.g. clean-services: clean-datatypes: cleanall: [delete] Deleting directory /home/proj/biomoby/moby-live/Java/build checkmaven: initmaven: BUILD FAILED java.lang.ClassCastException: org.codehaus.plexus.DefaultPlexusContainer (on linux) C:\workspace\moby\xmls\maven.xml:85: java.lang.NullPointerException (on windows) Running ant clean compile does work normally without any exceptions. Any ideas ? Cheers Andreas -- /*************************************************** Dipl. Bioinf. Andreas Groscurth Software developer Plant Computational Biology group Max-Planck Institute for plant breeding research Carl-von-Linne Weg 10 50829 Cologne Germany +49(0) 221 5062449 ***************************************************/ From markw at illuminae.com Thu Dec 18 14:53:52 2008 From: markw at illuminae.com (Mark) Date: Thu, 18 Dec 2008 06:53:52 -0800 Subject: [MOBY-dev] test registry not working In-Reply-To: <494A3961.2060605@mpiz-koeln.mpg.de> References: <494A3961.2060605@mpiz-koeln.mpg.de> Message-ID: We're having LOTS of problems with that machine at the moment. I'm in the process of setting up a new server (two, actually) that will replace the bioinfo machine. The address will, unfortunately, change for the test registry but I'll try to convince our IT team to set-up auto-forwarding. Thanks for your patience, M On Thu, 18 Dec 2008 03:52:01 -0800, Andreas Groscurth wrote: > Hi, > > when i try to register anything at the test repository i receive > > ===ERROR=== > Fault details: > [stackTrace: null] > [hostname: null] > Fault string: DBI > connect('moby_central:bioinfo.icapture.ubc.ca:3306','moby',...) failed: > Can't connect to MySQL server on 'bioinfo.icapture.ubc.ca' (111) at > /usr/lib/perl5/site_perl/5.8.5/MOBY/Adaptor/moby/queryapi/mysql.pm line > 93 > > Fault code: {http://schemas.xmlsoap.org/soap/envelope/}Server > Fault actor: null > When calling: > http://bioinfo.icapture.ubc.ca/cgi-bin/mobycentral/MOBY-Central.pl > =========== > > Cheers > Andreas > -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/