unit Main;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, IdBaseComponent, IdComponent, IdTCPConnection,
IdTCPClient, IdHTTP;
type
TForm1 =
class(TForm)
Memo1: TMemo;
Button1: TButton;
Memo2: TMemo;
IdHTTP1: TIdHTTP;
GroupBox1: TGroupBox;
ToolCode: TEdit;
CheckSlotPos: TEdit;
EquipmentValidation: TEdit;
LotName: TEdit;
ReturnBrokenWafers: TEdit;
UseSlotPos: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
procedure Button1Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
var
Stream:TMemoryStream;
//Url: String;
//URL_:String;
my_Request : TStringList;
my_Response: TStringList;
//SB Body: TStringStream;
HTTP_Stream: TStringStream;
//SB IdLogDebug: TIdLogDebug;
procedure TForm1.Button1Click(Sender: TObject);
begin
try
//SB IdLogDebug := TIdLogDebug.Create;
//SB IdLogDebug.Active := true;
//SB IdHTTP1.Intercept:=IdLogDebug;
IdHTTP1:=TIdHTTP.Create(
nil);
HTTP_Stream:= TStringStream.Create('
');
my_Request :=TStringList.Create;
my_Response:=TStringList.Create;
my_Request.Add('
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cim="http://cim.osram.ws.gefasoft.com/" xmlns:dat="http://cim.osram.ws.gefasoft.com/DataContracts">');
my_Request.Add('
<soapenv:Header/>');
my_Request.Add('
<soapenv:Body>');
my_Request.Add('
<cim:GetLotInfoByLotName>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<cim:requestMessage>');
my_Request.Add('
<dat:ToolCode>' + ToolCode.Text + '
</dat:ToolCode>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<dat:CheckSlotPos>' + CheckSlotPos.Text + '
</dat:CheckSlotPos>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<dat:EquipmentValidation>' + EquipmentValidation.Text + '
</dat:EquipmentValidation>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<dat:LotName>' + LotName.Text + '
</dat:LotName>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<dat:ReturnBrokenWafers>' + ReturnBrokenWafers.Text + '
</dat:ReturnBrokenWafers>');
my_Request.Add('
<!--Optional:-->');
my_Request.Add('
<dat:UseSlotPosition>' + UseSlotPos.Text + '
</dat:UseSlotPosition>');
my_Request.Add('
</cim:requestMessage>');
my_Request.Add('
</cim:GetLotInfoByLotName>');
my_Request.Add('
</soapenv:Body>');
my_Request.Add('
</soapenv:Envelope>');
IdHTTP1.Request.ExtraHeaders.SetText('
SoapAction: "http://cim.osram.ws.gefasoft.com/ILot/GetLotInfoByLotName"');
IdHTTP1.Request.Accept:='
';
IdHTTP1.Request.AcceptEncoding:='
gzip,deflate';
IdHTTP1.Request.Connection:='
Keep-Alive';
// SB IdHTTP1.Request.ContentType:='text/xml;charset=UTF-8';
IdHTTP1.Request.ContentType:='
application/soap+xml;charset=UTF-8';
IdHTTP1.Request.UserAgent:= '
Apache-HttpClient/4.1.1(java 1.5)';
IdHTTP1.Request.ContentLength:= 918;
//IdHTTP1.Post('http://192.168.100.25:80/Lot.svc',my_Request,HTTP_Stream);
//IdHTTP1.Request.ContentEncoding := 'utf-8';
IdHTTP1.Post('
http://tst-rbg14:8019/Lot.svc',my_Request,HTTP_Stream);
HTTP_Stream.Position:=0;
// my_Request.LoadFromStream(HTTP_Stream);
my_Response.LoadFromStream(HTTP_Stream);
Memo1.Lines.AddStrings(my_Request);
Memo2.Lines.AddStrings(my_Response);
finally
HTTP_Stream.Free;
end;
end;
{$R *.dfm}
end.