Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[14136] [질문] XML Web Service에 호출 시 Error
땅주인 [heaven2] 1860 읽음    2012-02-21 01:18
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;
	}
}

+ -

관련 글 리스트
14136 [질문] XML Web Service에 호출 시 Error 땅주인 1860 2012/02/21
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.