void __fastcall TFormularz::Button1Click(TObject *Sender)
{
requestType *request = new requestType();
responseType *response = new responseType();
request->authenticate->system_key = haslo;
request->authenticate->system_login = login;
TBoundArray arr;
arr.set_length(1);
arr[0] = 41548;
request->params->orders_sn = arr;
_di_getOrdersPortType api = GetgetOrdersPortType();
response = api->getOrders(request);
ShowMessage(response->errors->faultString );
delete request;
delete response;
}
// plik "api_getorders.h"
typedef DynamicArray<int> ordersSnType;
class paramsType : public TRemotable {
private:
UnicodeString Fprepaid_status;
bool Fprepaid_status_Specified;
ordersStatusType Forders_status;
bool Forders_status_Specified;
deliverersType Fdeliverers;
bool Fdeliverers_Specified;
UnicodeString Fpayment_type;
bool Fpayment_type_Specified;
ordersIdType Forders_id;
bool Forders_id_Specified;
ordersSnType Forders_sn;
bool Forders_sn_Specified;
clientsType Fclients;
bool Fclients_Specified;
rangeType* Frange;
bool Frange_Specified;
sourceType* Fsource;
bool Fsource_Specified;
productsSearchType Fproducts;
bool Fproducts_Specified;
int Fresults_page;
bool Fresults_page_Specified;
int Fresults_limit;
bool Fresults_limit_Specified;
UnicodeString Finvoice_requested;
bool Finvoice_requested_Specified;
packageType* Fpackages;
bool Fpackages_Specified;
stocksType Fstocks;
bool Fstocks_Specified;
campaignType* Fcampaign;
bool Fcampaign_Specified;
loyaltyPointsFlagType Floyalty_points_flag;
bool Floyalty_points_flag_Specified;
void __fastcall Setprepaid_status(int Index, UnicodeString _prop_val)
{ Fprepaid_status = _prop_val; Fprepaid_status_Specified = true; }
bool __fastcall prepaid_status_Specified(int Index)
{ return Fprepaid_status_Specified; }
void __fastcall Setorders_status(int Index, ordersStatusType _prop_val)
{ Forders_status = _prop_val; Forders_status_Specified = true; }
bool __fastcall orders_status_Specified(int Index)
{ return Forders_status_Specified; }
void __fastcall Setdeliverers(int Index, deliverersType _prop_val)
{ Fdeliverers = _prop_val; Fdeliverers_Specified = true; }
bool __fastcall deliverers_Specified(int Index)
{ return Fdeliverers_Specified; }
void __fastcall Setpayment_type(int Index, UnicodeString _prop_val)
{ Fpayment_type = _prop_val; Fpayment_type_Specified = true; }
bool __fastcall payment_type_Specified(int Index)
{ return Fpayment_type_Specified; }
void __fastcall Setorders_id(int Index, ordersIdType _prop_val)
{ Forders_id = _prop_val; Forders_id_Specified = true; }
bool __fastcall orders_id_Specified(int Index)
{ return Forders_id_Specified; }
void __fastcall Setorders_sn(int Index, ordersSnType _prop_val)
{ Forders_sn = _prop_val; Forders_sn_Specified = true; }
bool __fastcall orders_sn_Specified(int Index)
{ return Forders_sn_Specified; }
void __fastcall Setclients(int Index, clientsType _prop_val)
{ Fclients = _prop_val; Fclients_Specified = true; }
bool __fastcall clients_Specified(int Index)
{ return Fclients_Specified; }
void __fastcall Setrange(int Index, rangeType* _prop_val)
{ Frange = _prop_val; Frange_Specified = true; }
bool __fastcall range_Specified(int Index)
{ return Frange_Specified; }
void __fastcall Setsource(int Index, sourceType* _prop_val)
{ Fsource = _prop_val; Fsource_Specified = true; }
bool __fastcall source_Specified(int Index)
{ return Fsource_Specified; }
void __fastcall Setproducts(int Index, productsSearchType _prop_val)
{ Fproducts = _prop_val; Fproducts_Specified = true; }
bool __fastcall products_Specified(int Index)
{ return Fproducts_Specified; }
void __fastcall Setresults_page(int Index, int _prop_val)
{ Fresults_page = _prop_val; Fresults_page_Specified = true; }
bool __fastcall results_page_Specified(int Index)
{ return Fresults_page_Specified; }
void __fastcall Setresults_limit(int Index, int _prop_val)
{ Fresults_limit = _prop_val; Fresults_limit_Specified = true; }
bool __fastcall results_limit_Specified(int Index)
{ return Fresults_limit_Specified; }
void __fastcall Setinvoice_requested(int Index, UnicodeString _prop_val)
{ Finvoice_requested = _prop_val; Finvoice_requested_Specified = true; }
bool __fastcall invoice_requested_Specified(int Index)
{ return Finvoice_requested_Specified; }
void __fastcall Setpackages(int Index, packageType* _prop_val)
{ Fpackages = _prop_val; Fpackages_Specified = true; }
bool __fastcall packages_Specified(int Index)
{ return Fpackages_Specified; }
void __fastcall Setstocks(int Index, stocksType _prop_val)
{ Fstocks = _prop_val; Fstocks_Specified = true; }
bool __fastcall stocks_Specified(int Index)
{ return Fstocks_Specified; }
void __fastcall Setcampaign(int Index, campaignType* _prop_val)
{ Fcampaign = _prop_val; Fcampaign_Specified = true; }
bool __fastcall campaign_Specified(int Index)
{ return Fcampaign_Specified; }
void __fastcall Setloyalty_points_flag(int Index, loyaltyPointsFlagType _prop_val)
{ Floyalty_points_flag = _prop_val; Floyalty_points_flag_Specified = true; }
bool __fastcall loyalty_points_flag_Specified(int Index)
{ return Floyalty_points_flag_Specified; }
public:
__fastcall ~paramsType();
__published:
__property UnicodeString prepaid_status = { index=(IS_OPTN), read=Fprepaid_status, write=Setprepaid_status, stored = prepaid_status_Specified };
__property ordersStatusType orders_status = { index=(IS_OPTN), read=Forders_status, write=Setorders_status, stored = orders_status_Specified };
__property deliverersType deliverers = { index=(IS_OPTN), read=Fdeliverers, write=Setdeliverers, stored = deliverers_Specified };
__property UnicodeString payment_type = { index=(IS_OPTN), read=Fpayment_type, write=Setpayment_type, stored = payment_type_Specified };
__property ordersIdType orders_id = { index=(IS_OPTN), read=Forders_id, write=Setorders_id, stored = orders_id_Specified };
__property ordersSnType orders_sn = { index=(IS_OPTN), read=Forders_sn, write=Setorders_sn, stored = orders_sn_Specified };
__property clientsType clients = { index=(IS_OPTN), read=Fclients, write=Setclients, stored = clients_Specified };
__property rangeType* range = { index=(IS_OPTN), read=Frange, write=Setrange, stored = range_Specified };
__property sourceType* source = { index=(IS_OPTN), read=Fsource, write=Setsource, stored = source_Specified };
__property productsSearchType products = { index=(IS_OPTN), read=Fproducts, write=Setproducts, stored = products_Specified };
__property int results_page = { index=(IS_OPTN), read=Fresults_page, write=Setresults_page, stored = results_page_Specified };
__property int results_limit = { index=(IS_OPTN), read=Fresults_limit, write=Setresults_limit, stored = results_limit_Specified };
__property UnicodeString invoice_requested = { index=(IS_OPTN), read=Finvoice_requested, write=Setinvoice_requested, stored = invoice_requested_Specified };
__property packageType* packages = { index=(IS_OPTN), read=Fpackages, write=Setpackages, stored = packages_Specified };
__property stocksType stocks = { index=(IS_OPTN), read=Fstocks, write=Setstocks, stored = stocks_Specified };
__property campaignType* campaign = { index=(IS_OPTN), read=Fcampaign, write=Setcampaign, stored = campaign_Specified };
__property loyaltyPointsFlagType loyalty_points_flag = { index=(IS_OPTN), read=Floyalty_points_flag, write=Setloyalty_points_flag, stored = loyalty_points_flag_Specified };
};
class requestType : public TRemotable {
private:
authenticateType* Fauthenticate;
paramsType* Fparams;
bool Fparams_Specified;
void __fastcall Setparams(int Index, paramsType* _prop_val)
{ Fparams = _prop_val; Fparams_Specified = true; }
bool __fastcall params_Specified(int Index)
{ return Fparams_Specified; }
public:
__fastcall requestType();
__fastcall ~requestType();
__published:
__property authenticateType* authenticate = { read=Fauthenticate, write=Fauthenticate };
__property paramsType* params = { index=(IS_OPTN), read=Fparams, write=Setparams, stored = params_Specified };
};
// plik "api_getorders.cpp"
__fastcall requestType::requestType()
{
Fauthenticate = new authenticateType;
Fparams = new paramsType;
}
__fastcall requestType::~requestType()
{
delete Fauthenticate;
delete Fparams;
}