![]() |
AW: Webservice
Zitat:
ja mit dem Wireshark da bin ich aktuell schon dran, finde nur aktuell den Request nicht, es sind glaube ich zu viele Dienste aktiv. Mal schauen.... |
AW: Webservice
Zitat:
Hast du nicht bereits erzählt das es mit SoapUI geklappt? Dann übernimm einfach alle sinnvollen http Header (der Server und die Länge gehören logischerweise nicht dazu!). |
AW: Webservice
Liste der Anhänge anzeigen (Anzahl: 2)
Zitat:
mit dem Bankleitzahlen-Service da passt auch alles. Aber das war nur testweise. Die eigentliche Aufgabe besteht aber darin einen Webservice zu Osram Regensburg aufzubauen. Den Header hatte ich jetzt analog zu SoapUI aufgebaut und da bekomme ich dann die Fehlermeldung. Ich sende einfach auch mal einen Screen-Shot vom SoapUI. |
AW: Webservice
Zitat:
|
AW: Webservice
Ja das hatte ich ja auch aber das sagte mir der Compiler dass TIdLogDebug ein undefinierter Bezeichner ist. Kann das sein dass vielleicht eine Unit unter USES fehlt?!
|
AW: Webservice
Zitat:
Bitte frage jetzt nicht nach dem Namen der Unit. Tipp: Die Suche in Delphi (wobei ich mir bei Delphi 6 nicht sicher bin) funktioniert auch auf Ordnern. Alternativ nimmt man Notepad++ und sucht mit Filefilter *.pas nach TIdLogDebug. |
AW: Webservice
Guten Morgen,
Noch eine letzte Frage dann kann ich glaube ich den Thread schließen. Mein Webservice läuft jetzt soweit, allerdings werden Zeichen wie ü, usw. im Ausgabefenster als Hieroglyphen dargestellt. Hat jemand eine Idee womit das zusammenhängt?!
Delphi-Quellcode:
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. |
AW: Webservice
![]() Zitat:
Und hier
Delphi-Quellcode:
behauptest du gegenüber dem Empfänger, dass es tatsächlich UTF8 sei (was aber definitiv falsch ist).
IdHTTP1.Request.ContentType:='application/soap+xml;charset=UTF-8';
Fatal an ANSI vs. UTF8 dass die Standard-Zeichen exakt gleich codiert sind und man sich beim Testen (natürlich mit den Standard-Zeichen) in eine falsche Sicherheit wiegt. |
AW: Webservice
Zitat:
|
AW: Webservice
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:27 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz