procedure TForm6.Button1Click(Sender: TObject);
var WS:QACWebServiceSoap;
checks : UCheckAddressSimple;
results : UCheckAddressSimpleResponse;
begin
WS := GetQACWebServiceSoap(false,'
',HTTPRIO1);
checks := UCheckAddressSimple.Create;
checks.UserName := '
test';
checks.UserPassword := '
test';
checks.Tolerance := 1;
checks.Country := '
DE';
checks.ZIP := '
41252';
checks.City := '
Sp';
checks.Street := '
Eugen-Bolz-Straße';
results:=WS.uCheckAddressSimple(checks);
ShowMessage(inttostr(results.UCheckAddressSimpleResult.ResultStatus)+'
err:'+results.UCheckAddressSimpleResult.ErrorMessage);
//ich bin der Meinung, daß hier keine Freigabe erfolgen muß, irgendwo stand das.
end;
procedure TForm6.HTTPRIO1AfterExecute(
const MethodName:
string; SOAPResponse: TStream);
//soapresponse zu Debugzwecken als xml abspeichern
Var sl:Tstrings;
begin
sl:=TStringList.Create;
try
SOAPResponse.Position:=0;
sl.LoadFromStream(SOAPResponse);
sl.SaveToFile(ExtractFilePath(Application.ExeName)+'
Soap-Response.xml');
finally
sl.free;
end;
end;
procedure TForm6.HTTPRIO1BeforeExecute(
const MethodName:
string; SOAPRequest: TStream);
//hier das erzeugte xml abändern, damit es für die Gegenseite "passt" und xml zu debugzwecken speichern
Var sl:TStrings;
sSoaprequest:
string;
begin
//Debug
sl:=TStringList.Create;
soaprequest.Position := 0;
sl.LoadFromStream(SOAPRequest);
sSoaprequest:=sl.Text;
sl.SaveToFile(ExtractFilePath(Application.ExeName)+'
Soap-Request-Orig.xml');
//anpassen
sSoaprequest:=StringReplace(sSoaprequest,...,...,[rfReplaceAll,rfIgnoreCase]);
//wieder in stream schreiben
sl.text:=sSoaprequest;
SOAPRequest.Position :=0;
sl.SaveToStream(SOAPRequest);
sl.free;
end;