Hi Syed, Thanks for the response. I've had a look at the link you sent as well as http://www.w3schools.com/soap/soap_httpbinding.asp , and as you say, it does seem that the HTTP headers are allowed.
I've looked more into the code, and lots of googling, and I know my java client is getting a response that looks like what I included below, in my previous mail. What I think it might be, but have no direct way to test, is the word "Status". From the w3schools urls it seems that the response should start with the following: HTTP/1.1 200 OK [...] Whereas the biomart service returns: Status: 200 OK [...] Perhaps it is because the java cxf client knows that the HTTP portion of the response should start with HTTP and not anything else? Unfortunately, without being able to modify the biomart code to check, I can't be conclusive. However, one thing makes me think this is right. I have my own SOAP service that runs here ( http://bsu.ncl.ac.uk:8081/symba-lsid-ws-assigner/services/LsidAssigner?wsdl), if you want to compare the output of that with the output of your wsdl using soapUI. It's response (if you use the assignLSID method it doesn't require any arguments) is as follows: The RAW response: HTTP/1.1 200 OK Server: Apache-Coyote/1.1 SOAPAction: "" Content-Type: text/xml;charset=UTF-8 Content-Length: 306 Date: Sat, 10 Jan 2009 12:47:14 GMT <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:assignLSIDResponse xmlns:ns2="http://service.webservices.lsid.symba.sourceforge.net/ "><return>urn:lsid:cisban.cisbs.org: ?:31aa2143-c675-429a-b2ef-22ccb5756391</return></ns2:assignLSIDResponse></soap:Body></soap:Envelope> The "XML" response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns2:assignLSIDResponse xmlns:ns2=" http://service.webservices.lsid.symba.sourceforge.net/"> <return>urn:lsid:cisban.cisbs.org: ?:31aa2143-c675-429a-b2ef-22ccb5756391</return> </ns2:assignLSIDResponse> </soap:Body> </soap:Envelope> When I perform the same test with the biomart wsdl using soapUI, I get: RAW response: HTTP/1.1 200 OK Date: Sat, 10 Jan 2009 12:50:16 GMT Server: Apache/2.2.8 (Ubuntu) mod_perl/2.0.3 Perl/v5.8.8 Connection: close Transfer-Encoding: chunked Content-Type: text/plain Status: 200 OK Content-Length: 1697 Content-Type: text/xml; charset=utf-8 SOAPServer: SOAP::Lite/Perl/0.60 <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope[...] and the "XML" response: Status: 200 OK Content-Length: 1697 Content-Type: text/xml; charset=utf-8 SOAPServer: SOAP::Lite/Perl/0.60 <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope [...] (Again, "[...]" added by me so I don't need to show the entire response). What this is saying to me is that what should happen is that the Raw response should have a HTTP header that begins with this "HTTP/1.1" string rather than the "Status" string, and therefore will get correctly parsed to remove the HTTP part to create the XML response. This happens with my assignLsid method, but not the getRegistry method of biomart. Instead, it seems that the biomart response, while it does include a "HTTP" portion, is somehow not correctly formatted, and neither soapUI (which is a well-known debugging and testing tool, it seems!) nor apache CXF can correctly remove the entire header of the biomart response. The part beginning with "Status:" is incorrectly retained in the XML response, and this messes up the XML parsing that is trying to occur in the apache cxf client. Does this make sense? It seems there is a problem somewhere in your biomart response. Let me know if I'm not explaining my idea well enough :) thanks! 2009/1/9 Syed Haider <[email protected]> > 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>< >> 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 >> > -- 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
