|
수고 많으십니다.
현재 빌더 6.0에서 Web Service 연동하는 간단한 프로그램을 테스트 중입니다.
아래 소스를 보시면 컴파일시 Button1Click 이벤트의
proxy->GuestQuery_out(*dtIn1);
부분에서 "VCL style classes must be constructed using operator new" 에러가 발생합니다.
GuestQuery_PCOPO_DT 클래스 및 GuestQuery_out 함수의 선언은 변경할 수 없는 상황에서
GuestQuery_out 함수를 호출해야 하는데 어떻게 해야할 지 모르겠습니다. 도와주세요~~~
# 선언부
typedef DynamicArray<WideString> GuestQueryR_PCOPO_DT;
class GuestQuery_PCOPO_DT : public TRemotable {
private:
WideString FGUEST_NO;
public:
virtual __fastcall GuestQuery_PCOPO_DT() {};
__published:
__property WideString GUEST_NO = { read=FGUEST_NO, write=FGUEST_NO };
};
_interface INTERFACE_UUID("{8522BB25-BEAA-2919-E202-24A2B362E299}") GuestQuery_outService : public IInvokable
{
public:
virtual GuestQuery_PCOPO_DT GuestQuery_out(const GuestQuery_PCOPO_DT GuestQuery_PCOPO_DT) = 0;
};
# Button1Click 이벤트
void __fastcall TForm1::Button1Click(TObject *Sender)
{
HTTPRIO1->HTTPWebNode->UserName = "...";
HTTPRIO1->HTTPWebNode->Password = "...";
HTTPRIO1->URL = "...";
HTTPRIO1->WSDLLocation = "...";
HTTPRIO1->Service = "...";
HTTPRIO1->Port = "...";
_di_GuestQuery_out proxy;
HTTPRIO1->QueryInterface(proxy);
GuestQueryR_PCOPO_MT dtOutputs;
GuestQuery_PCOPO_DT *dtIn1 = new GuestQuery_PCOPO_DT();
dtIn1->GUEST_NO = WideString("G000001");
if (proxy)
{
proxy->GuestQuery_out(*dtIn1); // <======= Compile Error !!!
}
/*
TWideStringDynArray (__closure *test) (const GuestQuery_PCOPO_DT);
test = proxy->GuestQuery_out;
if (proxy)
{
test(*dtIn1);
}
*/
}
|