Home > Back-end >  Reward for Delphi call with ThttpResqreq component webservice problem
Reward for Delphi call with ThttpResqreq component webservice problem

Time:09-16

The first into the reference and the reference

The ginseng: & lt; ? The XML version="1.0" encoding="utf-8"?> Wsxrmyy 123456 & lt;/password> Health care & lt;/entryType> F00.00.00.01 & lt;/serviceId> 1 f69d8a378c14e908694ae6a0b1cef85 & lt;/businessId & gt;
16:12:29 raw ginseng: & lt; The soap: Envelope XMLNS: soap="http://schemas.xmlsoap.org/soap/envelope/" & gt; Soap: VersionMismatch No namespace on "service" element. You must send a SOAP request. & lt;/faultstring>

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; Wsxrmyy 123456 & lt;/password> Health care & lt;/entryType> F00.00.00.01 & lt;/serviceId> 375 dfe7e81ad4bafb452e86dc3f99d07 & lt;/businessId>
20:21:22 raw ginseng: & lt; The soap: Envelope XMLNS: soap=" http://schemas.xmlsoap.org/soap/envelope/"& gt; Soap: Client Unmarshalling Error: Illegal processing instruction target (" XML "); XML (case insensitive) is reserved by the specs., & amp; # xd;
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 me

CodePudding 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;
  • Related