The ginseng: & lt; ? The XML version="1.0" encoding="utf-8"?>
16:12:29 raw ginseng: & lt; The soap: Envelope XMLNS: soap="http://schemas.xmlsoap.org/soap/envelope/" & gt;
The second into the participation and the reference
The ginseng: & lt; Soapenv: Envelope XMLNS: soapenv="http://schemas.xmlsoap.org/soap/envelope/" XMLNS: ser="http://server.webservice.smartpay.zhijieyun.com/" & gt;
20:21:22 raw ginseng: & lt; The soap: Envelope XMLNS: soap=" http://schemas.xmlsoap.org/soap/envelope/"& gt;
At [the row, col {unknown - source}] : [1192]
The great god for help,,,,,,, with a picture,,,,
A reward for help, river's lake emergency, do you give me your WeChat ID
CodePudding user response:
The great god, come quickly to help meCodePudding user response:
The following is my on domestic flight schedules WEB services to do the test, can pass,http://www.webxml.com.cn/webservices/DomesticAirline.asmx
Note to introduce: SOAPHTTPTrans and Wininet
Procedure TForm1. Button1Click (Sender: TObject);
Var
StrStream strSend: TStringStream;
The begin
HTTPReqResp1. URL:='http://www.webxml.com.cn/webservices/DomesticAirline.asmx/getDomesticAirlinesTime';
StrStream:=TStringStream. Create (' ', TEncoding UTF8);
StrSend:=TStringStream. Create (' startCity=fuzhou& LastCity=beijing& TheDate=2018-07-01 & amp; UserID=2018-07-02 ', TEncoding. UTF8);
HTTPReqResp1. Execute (strSend strStream);
ShowMessage (strStream. DataString);
StrStream. Free;
StrSend. Free;
end;
//set the content-type, can with the tools of caught, analysis of what you call the webservice the content-type should be what,
Procedure TForm1. HTTPReqResp1BeforePost (const HTTPReqResp: THTTPReqResp; Data: Pointer);
Const
CsCustomHeader='the content-type: application/x - WWW - form - urlencoded; Charset=utf-8 ';
The begin
HttpAddRequestHeaders (Data, PChar (csCustomHeader), Length (csCustomHeader), HTTP_ADDREQ_FLAG_REPLACE);
end;