XML WebService를 호출하는 C++ 코드를 Delphi 코드로 Porting 중인데..
좀 다르네요. .잘 모르기도 하구요..
WS_Soap의 Interface를 가져오는 부분에 대한 문법적인 에러 같은데..
잡지를 못하겠네요.. 고수님들의 도움을..
HTTPRIO.QueryInterface(InterfaceVariable); // Error: Incompatible type 'TGUID' and 'GF_WSSoap'
어떻게 초식을 잡아야 할 지.. ?
...
GF_WSSoap = interface(IInvokable)
['{4216F7C4-94F8-7BF3-19EE-0F30BFBA9390}']
....
function TInvoice.OrderInformation(mkImid : string; TransferID : string;
mallID : string; shippingType : string;
Order : STOrder; OrderDetail : array of STOrderDetail; OrderDetailCnt : integer) : boolean;
var
InterfaceVariable : GF_WSSoap;
psendOrderInformation : sendOrderInformation;
psendOrderInformationRes : sendOrderInformationResponse;
begin
HTTPRIO.QueryInterface(InterfaceVariable); // Error: Incompatible type 'TGUID' and 'GF_WSSoap'
if InterfaceVariable = nil then
begin
ShowMessage('Interface is no define.');
result := false;
exit;
end;
psendOrderInformation := sendOrderInformation.Create;
psendOrderInformationRes := sendOrderInformationResponse.Create;
psendOrderInformationRes := InterfaceVariable.sendOrderInformation(psendOrderInformation);
if psendOrderInformationRes.sendOrderInformationResult <> true then
begin
ShowMessage(psendOrderInformationRes.errorMsg);
result := false;
end
else
begin
result := true;
end;
end;
...
typedef DelphiInterface _di_GF_WSSoap;
....
bool TForm3::OrderInformation(UnicodeString mkImid, UnicodeString TransferID,
UnicodeString mallID, UnicodeString shippingType,
STOrder *pOrder, STOrderDetail pOrderDetail[], int OrderDetailCnt)
{
_di_GF_WSSoap InterfaceVariable;
HTTPRIO1->QueryInterface(InterfaceVariable);
if (!InterfaceVariable) {
return false;
}
sendOrderInformation *pOrderInformation = new sendOrderInformation();
sendOrderInformationResponse *pOrderInformationRes = new sendOrderInformationResponse();
pOrderInformationRes = InterfaceVariable->sendOrderInformation(pOrderInformation);
if (!pOrderInformationRes->sendOrderInformationResult ) {
ShowMessage(pOrderInformationRes->errorMsg);
return false;
} else {
ShowMessage(pOrderInformationRes->errorMsg);
return true;
}
}
|