Solved ! Just this line missing : HttpCli1.ContentTypePost := 'text/xml; charset="utf-8"';
Bruno Bruno Mannina a écrit : > Dear ICS Users, > > I tried, there are two or three months, to use HttpCli to connect to a > SoapService. ok no problem. > But the SoapService has changed and now I have Internal server Error. > > I changed all necessary parameters, but without success. > > Could you help me please to understand what happends ? > Many thanks for your help ! If you want to do a test, all informations > about server and other are below in the log of SoapUI > > My prog is : > .... > HttpCli1.RcvdStream := Stream; > buf := ''; > HttpCli1.URL := TURL_OPSV2[0]+TTYPE_OPSV2[0]; > HttpCli1.ContentActionSoap := TTYPE_OPSV2[0]; > Buf := Format(sSOAPSearchV2, [TTYPE_OPSV2[0], Query, '1', > '1', TTYPE_OPSV2[0]]); > > HttpCli1.SendStream := TMemoryStream.Create; > HttpCli1.SendStream.Write(Buf[1], Length(Buf)); > HttpCli1.SendStream.Seek(0, 0); > Try > HttpCli1.Post; > Except > result:=False; > end; > ... > ... > procedure TSearchPropertys.HttpCli1BeforeHeaderSend(Sender: TObject; > const Method: String; Headers: TStrings); > begin > Headers.Add('SOAPAction: '+HttpCli1.ContentActionSoap); > end; > > ... > The service has no problem if I use SoapUI2.0.2 all is ok. > With SoapUI my log is : > > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "POST > /soap-services/biblio-search HTTP/1.1[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "Content-Type: > text/xml;charset=UTF-8[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "SOAPAction: "biblio-search"[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "User-Agent: Jakarta > Commons-HttpClient/3.0.1[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "Host: ops-i.epo.org[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "Content-Length: 320[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "[\r][\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "<soapenv:Envelope > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" > xmlns:ops="http://ops.epo.org">[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " <soapenv:Header/>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " <soapenv:Body>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " <ops:biblio-search>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " > <ops:query>TA=rabbit</ops:query>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " <ops:range begin="1" > end="1"/>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " </ops:biblio-search>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> " </soapenv:Body>[\n]" > Wed Oct 01 15:03:44 CEST 2008:DEBUG:>> "</soapenv:Envelope>" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "HTTP/1.1 200 OK[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "Date: Wed, 01 Oct 2008 13:03:52 > GMT[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "Server: Apache[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "Accept: text/xml, text/html, > image/gif, image/jpeg, *; q=.2, */*; q=.2[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "SOAPAction: ""[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "Content-Length: 701[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "Content-Type: > text/xml;charset=utf-8[\r][\n]" > Wed Oct 01 15:03:45 CEST 2008:DEBUG:<< "<SOAP-ENV:Envelope > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header/><SOAP-ENV:Body><ops:world-patent-data > > xmlns:ops="http://ops.epo.org"><ops:meta name="elapsed-time" > value="1"/><ops:biblio-search total-result-count="2423"><ops:query > syntax="CQL">TA=rabbit</ops:query><ops:range begin="1" > end="1"/><ops:search-result><ops:publication-reference > data-format="docdb" family-id="39762930" system="ops.epo.org" > xmlns:exch="http://www.epo.org/exchange"><document-id><country>US</country><doc-number>2008226611</doc-number><kind>A1</kind></document-id></ops:publication-reference></ops:search-result></ops:biblio-search></ops:world-patent-data></SOAP-ENV:Body></SOAP-ENV:Envelope>" > > > > -- To unsubscribe or change your settings for TWSocket mailing list please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket Visit our website at http://www.overbyte.be