ورود

View Full Version : حرفه ای: وب سرویس در دلفی کار میکند در جای دیگر خیر!



masoode
چهارشنبه 02 مرداد 1398, 11:27 صبح
سلام
من یک وب سرویس SOAP نوشته ام.
type
TParts=class(TRemotable)
private
FId:Integer;
FParentId:Integer;
FBarcode:string;
FBarcodeId:Int64;
FCodeModel:string;
FCodeModelId:Integer;
FProductDT:TDateTime;
FPartTypeId:Integer;
FMachineId:Integer;
FMachineName:string;
FSmartOk:string;
FQCManOk:string;
published
property Id:Integer read FId write FId;
property ParentId:Integer read FParentId write FParentId;
property Barcode:string read FBarcode write FBarcode;
property BarcodeId:Int64 read FBarcodeId write FBarcodeId;
property CodeModel:string read FCodeModel write FCodeModel;
property CodeModelId:Integer read FCodeModelId write FCodeModelId;
property ProductDT:TDateTime read FProductDT write FProductDT;
property PartTypeId:Integer read FPartTypeId write FPartTypeId;
property MachineId:Integer read FMachineId write FMachineId;
property MachineName:string read FMachineName write FMachineName;
property SmartOk:string read FSmartOk write FSmartOk;
property QCManOk:string read FQCManOk write FQCManOk;
end;
TAllParts=array of TParts;

فانکشنی هم که ساخته ام:
function Ttest.ArrayTest: TAllParts;
begin
SetLength(Result,5);
Result[0]:=TParts.Create;
Result[0].CodeModel:='11232323';
Result[0].Barcode:='sf2133434';
Result[1]:=TParts.Create;
Result[1].CodeModel:='22222222';
Result[1].Barcode:='sf2222222222';
end;
یک برنامه برای تست آن در دلفی نوشته ام که بدون مشکل جواب می دهد. (البته همانطور که پیداست من همه جزئیات برنامه را حذف کرده ام و فقط یک آرایه ساده ساخته ام)
اما در واقع استفاده کننده های آن نرم افزارهایی با C#‎‎ و Labview هستند که موقع صدا زدن این فانکشن خطا دریافت میکنند.
من فانکشن هایی هم دارم که در آنها آرایه ندارم، بدون مشکل کار میکند.
این هم لینک دانلود سورس برنامه (XE10.2)
http://s9.picofile.com/file/8367660026/Webservice.zip.html
خطای labview: (البته C# هم همین خطا را می دهد)
150510
اشکال کار کجاست؟