HTTPRIO ContentType应用程序/ soap + xml的Delphi SOAP请求

时间:2019-02-21 14:29:13

标签: delphi soap

我正在开发一个用于连接到https服务器的SOAP客户端请求。 服务器要求内容类型为application / soap + xml,芽HTTPRIO可以发送text / html。

我发现const ContentType12UTF8 ='application / soap + xml; charset = utf-8';

function THTTPReqResp.GetContentType: string;
begin
  Result := '';
  if not (wnoSOAP12 in GetWebNodeOptions) then
  begin
    if UseUTF8InHeader then
      Result := ContentTypeUTF8
    else
      Result := ContentTypeNoUTF8;
  end
  else
  begin
    if UseUTF8InHeader then
      Result := Format(ContentTypeWithActionNoLabelFmt, [ContentType12UTF8, GetSOAPAction])
    else
      Result := Format(ContentTypeWithActionNoLabelFmt, [ContentType12NoUTF8, GetSOAPAction]);
  end;
end;

设置了HTTPRIO1.HTTPWebNode.WebNodeOption wnoSOAP12 还设置UseUTF8InHeader:= True

Delphi XE7

0 个答案:

没有答案