i am pretty lame with using wsdl importer wizard with c++ Builder (XE6 Pro) but finnally managed to properly import EBAY WSDL:
http://developer.ebay.com/webservices/latest/ebaySvc.wsdl
I can successfully run simple calls, but problem arises , when trying to set (or get ) Enum values. At this point i am getting beautifull access violation after compilation. Relevant piece of code:
void __fastcall TEbay::IndexBClick(TObject *Sender)
{
CallName="GetMyeBaySelling";
UnicodeString PUrl = MakeLink();
_di_eBayAPIInterface EbayCall = GeteBayAPIInterface(false,PUrl,HTP1);
CustomSecurityHeaderType *HDR = new RequesterCredentials;
HDR->eBayAuthToken=AuthToken;
HDR->Credentials = new UserIdPasswordType();
HDR->Credentials->AppId=AppId;
HDR->Credentials->DevId=DevId;
HDR->Credentials->AuthCert=CertId;
_di_ISOAPHeaders headers = EbayCall;
HTP1->SOAPHeaders->Send(HDR);
HTP1->SOAPHeaders->SetOwnsSentHeaders(True);
//GeteBayOfficialTimeRequest TR = new GeteBayOfficialTimeRequestType();
GetMyeBaySellingRequest *TR = new GetMyeBaySellingRequest();
GetMyeBaySellingResponse *ER =new GetMyeBaySellingResponse();
//ShowMessage(PUrl);
TR->Version=Version;
TR->ErrorLanguage="en_GB";
// This one raises error
TR->SoldList->OrderStatusFilter=OrderStatusFilterCodeType::All;
ShowMessage("2");
ER = EbayCall->GetMyeBaySelling(TR);
TDateTime ACK = ER->Timestamp->AsDateTime;
ShowMessage(UnicodeString("ODP:")+ACK);
// EbayCall->GeteBayOfficialTime(ER);
delete TR;
delete ER;
delete HDR;
}
Violation comes when i try to set up OrderStatusFilter or any enum values.
Declaration: (ebasvc.h) :
enum class OrderStatusFilterCodeType /* "urn:ebay:apis:eBLBaseComponents"[GblSmpl] */
{
All,
AwaitingPayment,
AwaitingShipment,
PaidAndShipped,
CustomCode
};
class OrderStatusFilterCodeType_TypeInfoHolder : public TObject {
OrderStatusFilterCodeType __instanceType;
public:
__published:
__property OrderStatusFilterCodeType __propType = { read=__instanceType };
};
I am getting mad allready with this, could anybody help me run this $#&^#$&^ ??
Best regards
TR->SoldList->OrderStatusFilter=OrderStatusFilterCodeType::All;
Looks like you are trying to assign a value to a property on the SoldList object, yet I can't see where you have created that object. Try the following.
TR->SoldList = new ItemListCustomizationType();
TR->SoldList->OrderStatusFilter=OrderStatusFilterCodeType::All;