Hi Syed, Tom, I'll address both of you in one email :) See inline for comments.
2009/1/28 Syed Haider <[email protected]> > Hi Tom, > > > Allyson Lister wrote: > >> Hi all, > >> > >> Just bumping up the bit of my previous email (below) that hasn't had a > >> response yet. Does anyone have any ideas on this one? How can a results > >> "table" (if you imagine it as such) with data rows and an arbitrary > >> number of attribute columns be squished into a java List<String>, as the > >> mart xsd is saying the response will be? > > > > Simple answer is that the XSD fragment is wrong. Should be sequence of > > xsd:any. Of course, your SOAP stack won't be able to make sensible > > auto-generated mappings from that! > > > > The comprimise would be to have a structure that used attribute rather > > than element names to specify the result columns, so rather than > > <resultsRow><someData>...</someData></resultsRow> you'd have > > <resultsRow><item column="someData">...</item></resultsRow>. This would > > be easy to express in the schema and would result in CXF generating (I > > imagine) an Item class with a getColumn method. > > Of course its doable and makes more sense. On BioMart side, we are happy > to amend the reponse. Allyson, could you confirm if the problem lies > exactly there. This is what I believe the problem to be. As there aren't many users of the SOAP service yet, could we put the change in place and I and others could test it immediately? It would be great that the Item class would then have both a getValue() (the equivalent of Tom's getColumn() i think) and a getName() or similar for getting the name of the column/attribute. > > > > > > It's still not really clear to me what the benefit of this interface is > > over the (much faster) http stream though? Sure, it's got tags, but when > > you're returning a massive amount of data they're just extra bytes to > > deal with and process. We certainly wouldn't want to use this with > > Taverna, I very much hope the 'old' form will remain there as well. > > The old http stream based service would remain functional and maintained - > not going anywhere :) Yes, I wouldn't want this to replace anything else either! For me, I have a nice, smallish project that won't need to draw huge responses from Biomart, and I like the interface I get from cxf and the wsdl2java - it's easy for me. To be honest, I haven't tried to use any other programmatic method of accessing biomart yet, either. Thanks very much! Allyson :) > > > Syed > > > > > Tom > > > >> Thanks very much! :) > >> > >> Allyson > >> > >> 2009/1/26 Allyson Lister <[email protected] > >> <mailto:[email protected]>> > >> > >> 1. The soap client I'm using is NOT one I've written - it is > >> autogenerated, via Apache CXF (a freely-available, widely-used > >> SOAP app). Therefore *anyone* who may wish to use the Biomart > >> SOAP instance you have via Apache CXF's wsdl2java feature > >> *will* run into exactly the same problem. I think the problem > >> may stem from the following part of martxsd: > >> <xs:element name="queryResponse"> > >> <xs:complexType> > >> <xs:sequence> > >> <xs:element minOccurs="0" > >> maxOccurs="unbounded" > >> name="resultsRow" > >> type="xs:string"/> > >> </xs:sequence> > >> </xs:complexType> > >> </xs:element> > >> This states that the query response will always be a sequence > >> of xs:string, or in Java, a List<String>. This does not allow > >> for the varied types of responses one can get based on the > >> attributes of the query that they've written. Therefore I > >> think that the java code is trying to fit in the response > >> (such as the one Syed showed and which I copied a portion of > >> into #1 above) into a sequence of xs:string, and this just > >> isn't working. I can create an empty maven project that builds > >> the Java code and runs the unit tests if it would help - then > >> you could download that project, and just run it on your own > >> system to see what the problem is and possible ways of > >> resolving it. Perhaps there is some way to change the > >> queryResponse? Because, as it stands, how does the > >> queryResponse element above match the actual response given by > >> the soap UI? > >> > >> Thanks very much! :) > >> > >> > >> > > > > > ====================================== > Syed Haider. > EMBL-European Bioinformatics Institute > Wellcome Trust Genome Campus, Hinxton, > Cambridge CB10 1SD, UK. > ====================================== > > -- Allyson Lister http://lurena.vox.com CISBAN, http://www.cisban.ac.uk Newcastle University
