This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Accessing Reactome.Org Using Soap And Curl?

Hi all,

I'm trying to send a SOAP query to Reactome using curl.

I want to call the remote method queryPathwaysForReferenceIdentifiers defined in http://www.reactome.org:8080/caBIOWebApp/services/caBIOService?wsdl

I created the following SOAP/XML file: soap.xml


<SOAP-ENV:Envelope xmlns:xsi="&lt;a href=" http:="" www.w3.org="" 1999="" XMLSchema-instance"="" rel="nofollow">http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:r="http://www.reactome.org:8080/caBIOWebApp/services/caBIOService" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:reactome="http://www.reactome.org/caBIOWebApp/schema">
<SOAP-ENV:Body>
<r:queryPathwaysForReferenceIdentifiers>
<r:referenceIdentifiers>
<soapenc:Array soapenc:arrayType="soapenc:string[3]">
<soapenc:string>Q9Y266</soapenc:string>
<soapenc:string>P17480</soapenc:string>
<soapenc:string>P2048</soapenc:string>
</soapenc:Array>
</r:referenceIdentifiers>
</r:queryPathwaysForReferenceIdentifiers>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

and I sent it with curl using the following command:

curl -d @soap.xml \
      -H "Content-Type: application/soap+xml" \
      -H 'SOAPAction: ""' \
      "http://www.reactome.org:8080/caBIOWebApp/services/caBIOService"

But the response is empty:


<soapenv:Envelope xmlns:soapenv="&lt;a href=" http:="" schemas.xmlsoap.org="" soap="" envelope="" "="" rel="nofollow">http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance">
  <soapenv:Body>
    <ns1:queryPathwaysForReferenceIdentifiersResponse xmlns:ns1="&lt;a href=" http:="" www.reactome.org:8080="" caBIOWebApp="" services="" caBIOService"="" rel="nofollow">http://www.reactome.org:8080/caBIOWebApp/services/caBIOService" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <queryPathwaysForReferenceIdentifiersReturn xmlns:ns2="&lt;a href=" http:="" www.reactome.org="" caBIOWebApp="" schema"="" rel="nofollow">http://www.reactome.org/caBIOWebApp/schema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" soapenc:arrayType="ns2:Pathway[0]" xsi:type="soapenc:Array"/>
    </ns1:queryPathwaysForReferenceIdentifiersResponse>
  </soapenv:Body>
</soapenv:Envelope>

is there an error in my Request ? where ?

Many thanks !

Pierre

Note: cross-posted on Stack-Overflow http://stackoverflow.com/questions/4970668

webservice

Hi, Pierre. You might take a look at the biomart API for reactome. The web version is here.

@Casbon, sorry but are you sure you know what you are talking about??

1 answer

You need to omit the Array and I removed xmlns:reactome from the envelope. Try this:


<SOAP-ENV:Envelope xmlns:xsi="&lt;a href=" http:="" www.w3.org="" 1999="" XMLSchema-instance"="" rel="nofollow">http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:r="http://www.reactome.org:8080/caBIOWebApp/services/caBIOService" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<r:queryPathwaysForReferenceIdentifiers>
<r:referenceIdentifiers>
<soapenc:string>Q9Y266</soapenc:string>
<soapenc:string>P17480</soapenc:string>
<soapenc:string>P2048</soapenc:string>
</r:referenceIdentifiers>
</r:queryPathwaysForReferenceIdentifiers>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I received a message faultstring="org.xml.sax.SAXParseException: Content is not allowed in prolog". But my xml is correctly formated.

Hm. I just copied and pasted the XML into a file "soap.xml" and then ran the command you gave above. Works fine for me.

It definitely works with curl. I tried it under Linux with curl 7.15.5 and OSX with curl 7.19.7 and both return a result page.

As for the Java exception, I ran a modified example of http://www.java2s.com/Code/Java/XML/SAXDemo.htm on both "soap.xml" and the XML that was returned by curl and both did fine.

Yes ! I don't know what I did wrong with your xml the first time :-) Thanks !

Log in to answer this question.