[fpc-pascal] WST SOAP HTTP CONTENT TYPE
Inoussa OUEDRAOGO
inoussa12 at gmail.com
Wed Jun 4 17:12:37 CEST 2014
Hi
2014-06-03 10:17 UTC, Dimitrios Chr. Ioannidis <d.ioannidis at nephelae.eu>:
> Hi,
>
> FYI, in a wst soap client talking to a .net web service i find out,
> that for SOAP calls, if the CONTENT-TYPE http header ( i'm using
> fpc-http-protocol ) doesn't have the 'text/xml' plus the 'charset=UTF-8'
> like this 'text/xml; charset=UTF-8', the server chocks. So, i changed
> the const sSOAP_CONTENT_TYPE in base_soap_formatter.pas to
> sSOAP_CONTENT_TYPE = 'text/xml; charset=UTF-8', and all is working fine.
>
> I don't know if this is a bug or not.
You can change the content using the service reference :
var
serviceRef : IMyService;
sp : IServiceProtocol;
begin
serviceRef := <create the service as in wst_CreateInstance_IMyService() >
sp := serviceRef as IServiceProtocol;
sp.GetSerializer().GetPropertyManager().SetProperty('ContentType','WhatYouWantHere');
....
end;
--
Inoussa O.
More information about the fpc-pascal
mailing list