unit web;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
const
IS_OPTN = $0001;
IS_UNBD = $0002;
IS_UNQL = $0008;
IS_REF = $0080;
type
ItemTypeOut = class; MessageIn = class; ItemType = class; InventoryType = class; MessageOut = class;
Array_Of_ItemType = array of ItemType;
ItemTypeOut = class(TRemotable)
private
FArticle: string;
FQuantity: Integer;
FAvailabilityState: string;
FAvailabilityQuantity: Integer;
FAvailabilityQuantity_Specified: boolean;
FAvailabiltyText: string;
FAvailabiltyText_Specified: boolean;
FArticleDescription_1: string;
FArticleDescription_1_Specified: boolean;
FArticleDescription_2: string;
FArticleDescription_2_Specified: boolean;
FArticleState: Integer;
FArticleState_Specified: boolean;
FArticleStateText: string;
FArticleStateText_Specified: boolean;
procedure SetAvailabilityQuantity(Index: Integer; const AInteger: Integer);
function AvailabilityQuantity_Specified(Index: Integer): boolean;
procedure SetAvailabiltyText(Index: Integer; const Astring: string);
function AvailabiltyText_Specified(Index: Integer): boolean;
procedure SetArticleDescription_1(Index: Integer; const Astring: string);
function ArticleDescription_1_Specified(Index: Integer): boolean;
procedure SetArticleDescription_2(Index: Integer; const Astring: string);
function ArticleDescription_2_Specified(Index: Integer): boolean;
procedure SetArticleState(Index: Integer; const AInteger: Integer);
function ArticleState_Specified(Index: Integer): boolean;
procedure SetArticleStateText(Index: Integer; const Astring: string);
function ArticleStateText_Specified(Index: Integer): boolean;
published
property Article: string Index (IS_UNQL) read FArticle write FArticle;
property Quantity: Integer Index (IS_UNQL) read FQuantity write FQuantity;
property AvailabilityState: string Index (IS_UNQL) read FAvailabilityState write FAvailabilityState;
property AvailabilityQuantity: Integer Index (IS_OPTN or IS_UNQL) read FAvailabilityQuantity write SetAvailabilityQuantity stored AvailabilityQuantity_Specified;
property AvailabiltyText: string Index (IS_OPTN or IS_UNQL) read FAvailabiltyText write SetAvailabiltyText stored AvailabiltyText_Specified;
property ArticleDescription_1: string Index (IS_OPTN or IS_UNQL) read FArticleDescription_1 write SetArticleDescription_1 stored ArticleDescription_1_Specified;
property ArticleDescription_2: string Index (IS_OPTN or IS_UNQL) read FArticleDescription_2 write SetArticleDescription_2 stored ArticleDescription_2_Specified;
property ArticleState: Integer Index (IS_OPTN or IS_UNQL) read FArticleState write SetArticleState stored ArticleState_Specified;
property ArticleStateText: string Index (IS_OPTN or IS_UNQL) read FArticleStateText write SetArticleStateText stored ArticleStateText_Specified;
end;
MessageIn = class(TRemotable)
private
FCustomerNo: Integer;
FItem: Array_Of_ItemType;
public
constructor Create; override;
destructor Destroy; override;
published
property CustomerNo: Integer Index (IS_UNQL) read FCustomerNo write FCustomerNo;
property Item: Array_Of_ItemType Index (IS_UNBD or IS_UNQL) read FItem write FItem;
end;
ItemType = class(TRemotable)
private
FArticle: string;
FQuantity: Integer;
published
property Article: string Index (IS_UNQL) read FArticle write FArticle;
property Quantity: Integer Index (IS_UNQL) read FQuantity write FQuantity;
end;
InventoryType = class(TRemotable)
private
FCustomerNo: Integer;
FItem: ItemTypeOut;
public
destructor Destroy; override;
published
property CustomerNo: Integer Index (IS_UNQL) read FCustomerNo write FCustomerNo;
property Item: ItemTypeOut Index (IS_UNQL) read FItem write FItem;
end;
MessageOut = class(TRemotable)
private
FInventory: InventoryType;
public
constructor Create; override;
destructor Destroy; override;
published
property Inventory: InventoryType Index (IS_UNQL) read FInventory write FInventory;
end;
web_getInventory = interface(IInvokable)
['{7ECC6115-0305-FA86-1773-54264E557E44}']
// Entpacken nicht möglich:
// - Eingabe-Part verweist auf kein Element
// - Ausgabe-Part verweist auf kein Element
function getInventory(const getInventoryIn: MessageIn): MessageOut; stdcall;
end;
function Getweb_getInventory(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): web_getInventory;
implementation
uses SysUtils;
...