Hi Allyson,
regarding Status, Content-Length etc etc in server response, its
perfectly valid response from BioMart server as per W3C recommendations,
http://www.w3schools.com/soap/soap_example.asp
I guess it would be good if you check with your Java client framework
writers what they have to say about this,
Thanks
Syed
Allyson Lister wrote:
Hi all,
I've been trying to get the SOAP service on biomart.org
<http://biomart.org> talking to my Java client, which uses CXF. As you
can see from previous posts, this hasn't completely been plain
sailing. However, I've gotten over a few hurdles, and hopefully just
have one more left.
When calling the getRegistry() method of the Biomart service sitting
at http://www.biomart.org:80/biomart/martsoap using soapUI (a great
little testing program), it returns the following as the XML (NOT the
raw) result:
Status: 200 OK
Content-Length: 16812
Content-Type: text/xml; charset=utf-8
SOAPServer: SOAP::Lite/Perl/0.710.08
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><getRegistryResponse
xmlns="http://www.biomart.org:80/MartServiceSoap"><mart><name
xsi:type="xsd:string">ensembl</name><displayName
xsi:type="xsd:string">ENSEMBL 52 GENES (SANGER
UK)</displayName><database
xsi:type="xsd:string">ensembl_mart_52</database><host
xsi:type="xsd:string">www.biomart.org
<http://www.biomart.org></host><path
xsi:type="xsd:string">/biomart/martservice</path><port
xsi:type="xsd:string">80</port><visible
xsi:type="xsd:int">1</visible><default
xsi:type="xsd:int">1</default><serverVirtualSchema
xsi:type="xsd:string">default</serverVirtualSchema><includeDatasets
xsi:type="xsd:string" /><martUser xsi:type="xsd:string" /><redirect
xsi:nil="true" xsi:type="xsd:int" /></mart> [...]
</getRegistryResponse></soap:Body></soap:Envelope>
("[...]" added by me so I wouldn't have to print out the entire
response. Suffice to say that the entire set of marts was correctly
returned.)
You'll notice that this result is NOT actually just XML. This is a
problem for my java client, which expects only XML in the response. It
begins with text, i.e. "Status: 200 OK" and so on. This results in
another weird error message when I call getRegistry() from my java client:
INFO: Creating Service
{http://www.biomart.org:80/MartServiceSoap}BioMartSoapService
<http://www.biomart.org:80/MartServiceSoap%7DBioMartSoapService> from
WSDL:
file:/media/share/unsynched/IdeaProjects/saint/trunk/src/main/resources/biomart.wsdl
09-Jan-2009 15:23:12 org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
[...]
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character 'S' (code 83) in prolog; expected '<' at [row,col
{unknown-source}]: [1,1]
As you can see, it's hung up on a capital "S", which implies that it
is the beginning of the response that it doesn't know how to interpret.
This is a problem for anyone wanting to use a cxf java client, I think
(which could be quite a few people). Is there any way for either me,
the user, or the biomart developers to ensure that only XML is
returned by the soap server?
thanks very much!
--
Thanks,
Allyson :)
Allyson Lister
Research Associate
Centre for Integrated Systems Biology for Ageing and Nutrition
Newcastle University
http://www.cisban.ac.uk
School of Computing Science
Newcastle University
Newcastle upon Tyne, NE1 7RU