Hi Trevor,

please scroll down to see the reply,

> another  example  of failing to bind a response to the schema
>
>          <queryResponse xmlns="http://www.biomart.org/MartServiceSoap";>
>             <resultsRow>
>                <item attribute="ensembl_gene_id" xsi:type="xsd:string"
> modelReference="http://www.embracegrid.info/ws/sawsdl/spec/ontology/data
> bases#gene">Ensembl Gene ID</item>
>                <item attribute="start_position" xsi:type="xsd:string"
> modelReference="">Gene Start (bp)</item>
>                <item attribute="end_position" xsi:type="xsd:string"
> modelReference="">Gene End (bp)</item>
>             </resultsRow>
>
>
> the <item> attribute called attribut is not in the schema ( nor are its
> other attributes)
>
> infact Item is declared as a simple TextContent element
> <xs:complexType name="resultsRow">
>     <xs:sequence>
>         <xs:element name="item" type="xs:string" minOccurs="0"
> maxOccurs="unbounded"/>
>     </xs:sequence>
> </xs:complexType>
>
> so the resultsRows cant be bound to JAXB
>
> and we need to look at the structure of the response XML to be able to
> parse it...
>
> presumably there is a one to one correspondence between the
> <Attibute><name> value set in the query with the <Item attribute.value>?
>
> with guaranteed  order?
>

Yes, the 1-1 correspondence is guaranteed .

Cheers
Syed


> trevor
>
>
> Trevor Paterson PhD
> new email [email protected]
> <mailto:[email protected]>
>
> Bioinformatics
> The Roslin Institute
> Edinburgh University
> Scotland EH25 9PS
> phone +44 (0)131 5274477
> http://www.roslin.ed.ac.uk <http://www.roslin.ed.ac.uk/>
> http://www.comparagrid.org <http://www.comparagrid.org/>
> http://www.thearkdb.org <http://www.thearkdb.org/>
>
> Please consider the environment before printing this e-mail
>
> The University of Edinburgh is a charitable body, registered in Scotland
> with registration number SC005336
> Disclaimer:This e-mail and any attachments are confidential and intended
> solely for the use of the recipient(s) to whom they are addressed. If
> you have received it in error, please destroy all copies and inform the
> sender.
>
>
>
>
> ________________________________
>
>       From: [email protected] [mailto:[email protected]]
> On Behalf Of trevor paterson (RI)
>       Sent: 27 March 2009 13:52
>       To: [email protected]
>       Subject: [mart-dev] Biomart SOAP responses are not schema valid
>
>
>       I think i understand some of the reasons why JAXB binding of
> biomart webservice responses might be failing
>
>       the data returned is not 100% valid with the schema at
> http://www.biomart.org/biomart/martxsd
>
>       for example, the response to a query includes
>
>                   <mart>
>                      <name xsi:type="xsd:string">ensembl</name>
>                      <displayName xsi:type="xsd:string">ENSEMBL 53
> GENES (SANGER UK)</displayName>
>                       . . .
>                      <redirect xsi:nil="true" xsi:type="xsd:int" />
> **********i.e. an empty element************
>                   </mart>
>
>       which is not valid against the schema type
>
>       <xs:complexType name="mart">
>           <xs:sequence>
>               <xs:element name="name" type="xs:string"/>
>               <xs:element name="displayName" type="xs:string"/>
>               . . .
>               <xs:element name="redirect" type="xs:int"/>
>           </xs:sequence>
>       </xs:complexType>
>
>
>       for this data to be valid the redirect element need to be set to
>
>
>       <xs:element name="redirect" type="xs:int" nillable="true"/>
>
>       [there may be other invalid stuff in there....and dealing with
> the namespaces when pulling apart SOAP elements to JAXB unmarshall is
> also problematic (no suprise there!)]
>
>       So when you try to bind/unmarshall the content of the SOAP
> response - it finds no <mart>s in the response..........
>
>       I guess JAXB binding of the SOAP responses is not the way to go
> unless the responses where guaranteed valid....or the binding code is
> hacked
>
>       so Tom Oinn was right - i will just parse XML myself in the
> client.......... and forget about doing anything 'clever'!
>
>
>       Trevor
>
>       Trevor Paterson PhD
>       new email [email protected]
> <mailto:[email protected]>
>
>       Bioinformatics
>       The Roslin Institute
>       Edinburgh University
>       Scotland EH25 9PS
>       phone +44 (0)131 5274477
>       http://www.roslin.ed.ac.uk <http://www.roslin.ed.ac.uk/>
>       http://www.comparagrid.org <http://www.comparagrid.org/>
>       http://www.thearkdb.org <http://www.thearkdb.org/>
>
>       Please consider the environment before printing this e-mail
>
>       The University of Edinburgh is a charitable body, registered in
> Scotland with registration number SC005336
>       Disclaimer:This e-mail and any attachments are confidential and
> intended solely for the use of the recipient(s) to whom they are
> addressed. If you have received it in error, please destroy all copies
> and inform the sender.
>
>
>
>


======================================
Syed Haider.
EMBL-European Bioinformatics Institute
Wellcome Trust Genome Campus, Hinxton,
Cambridge CB10 1SD, UK.
======================================

Reply via email to