soap 예제소스 관련 질문
보미나
저렇게 링크 에러가 나는데
어떤 lib파일을 include 해야 하나요?
#include stdio.h
#include Windows.h
#include C_CkHttpRequest.h
#include C_CkHttp.h
#include C_CkXml.h
#include C_CkHttpResponse.hvoid ChilkatSample(void)
{
HCkHttpRequest req;
HCkHttp http;
BOOL success;
HCkXml soapReq;
const char * domain;
long port;
BOOL ssl;
HCkHttpResponse resp;
HCkXml soapResp = NULL;
HCkXml xmlResp = NULL; req = CkHttpRequest_Create();
http = CkHttp_Create(); // Any string unlocks the component for the 1st 30-days.
success = CkHttp_UnlockComponent(http, Anything for 30-day trial);
if (success != TRUE) {
printf(%s\n, CkHttp_lastErrorText(http));
return;
} // Build this XML SOAP request:
// ?xml version=1.0 encoding=utf-8?
// soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
// xmlns:xsd=http://www.w3.org/2001/XMLSchema
// xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
// soap:Body
// GetQuote xmlns=http://www.webserviceX.NET/
// symbolstring/symbol
// /GetQuote
// /soap:Body
// /soap:Envelope
soapReq = CkXml_Create();
CkXml_putEncoding(soapReq, utf-8);
CkXml_putTag(soapReq, soap:Envelope);
CkXml_AddAttribute(soapReq, xmlns:xsi, http://www.w3.org/2001/XMLSchema-instance);
CkXml_AddAttribute(soapReq, xmlns:xsd, http://www.w3.org/2001/XMLSchema);
CkXml_AddAttribute(soapReq, xmlns:soap, http://schemas.xmlsoap.org/soap/envelope/); CkXml_NewChild2(soapReq, soap:Body, );
CkXml_FirstChild2(soapReq);
CkXml_NewChild2(soapReq, GetQuote, );
CkXml_FirstChild2(soapReq);
CkXml_AddAttribute(soapReq, xmlns, http://www.webserviceX.NET/);
CkXml_NewChild2(soapReq, symbol, MSFT);
CkXml_GetRoot2(soapReq);
printf(%s\n, CkXml_getXml(soapReq)); // Build an SOAP request.
CkHttpRequest_UseXmlHttp(req, CkXml_getXml(soapReq));
CkHttpRequest_putPath(req, /stockquote.asmx); CkHttpRequest_AddHeader(req, SOAPAction, http://www.webserviceX.NET/GetQuote); // Send the HTTP POST and get the response. Note: This is a blocking call.
// The method does not return until the full HTTP response is received. domain = www.webservicex.net;
port = 80;
ssl = FALSE; resp = CkHttp_SynchronousRequest(http, domain, port, ssl, req);
if (resp == 0) {
printf(%s\n, CkHttp_lastErrorText(http));
}
else {
// The XML response is in the BodyStr property of the response object:
soapResp = CkXml_Create();
CkXml_LoadXml(soapResp, CkHttpResponse_bodyStr(resp)); // The response will look like this:
// ?xml version=1.0 encoding=utf-8?
// soap:Envelope xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
// xmlns:xsd=http://www.w3.org/2001/XMLSchema
// xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/
// soap:Body
// GetQuoteResponse xmlns=http://www.webserviceX.NET/
// GetQuoteResultstring/GetQuoteResult
// /GetQuoteResponse
// /soap:Body
// /soap:Envelope
// Navigate to soap:Body
CkXml_FirstChild2(soapResp);
// Navigate to GetQuoteResponse
CkXml_FirstChild2(soapResp);
// Navigate to GetQuoteResult
CkXml_FirstChild2(soapResp); // The actual XML response is the data within GetQuoteResult:
xmlResp = CkXml_Create();
CkXml_LoadXml(xmlResp, CkXml_content(soapResp)); // Display the XML response:
printf(%s\n, CkXml_getXml(xmlResp)); }
CkHttpRequest_Dispose(req);
CkHttp_Dispose(http);
CkXml_Dispose(soapReq);
CkXml_Dispose(soapResp);
CkXml_Dispose(xmlResp);}void main()
{}
-
밤
질문글의 그림을 봐서는 소스는 cpp 하나인데 크기가 그렇게 크나요?
아래 파일들을 지워보세요
- 솔루션의 Debug 폴더
- 솔루션의 ipch 폴더
- 솔루션의 *.ncb, *.sdf 파일
- 프로젝트의 Debug 폴더
- 프로젝트의 *.aps 파일 -
카프리콘
debug 폴더 빼고 압축했는데 45메가라서 첨부가 안 되네요
-
달달한캔디
그리고 소스만 봐서는 링크오류는 찾을수 없어서요
-
새길
네
-
장미
아 제가 보려고 했던건 디렉터리 구조랑 라이브러리 링크경로였거든요.
pragma comment lib 요
시간되면 천천히 올려주세요
(Debug 폴더는 뺴구요) -
달달한캔디
지금 모바일이라서 팀뷰어로 소스밖에 못올릴거같아요
-
큰모음
네 잠시만요
-
보라나
솔루션 전체를 첨부해주실수 있나요?
-
달
ㅎㅇㅋㅋ
-
궁수자리
안녕핫6ㅣㅣㅇㆍ6ㅣ세여
번호 | 제 목 | 글쓴이 | 날짜 |
---|---|---|---|
2692401 | 유닉스안에서 C언어를 이용한 명함 만들기 입니다; 이해안가는 부분이있네요 | 2gether | 2025-04-22 |
2692374 | 고수님들 댓글 마니부탁해요!!! (2) | 엄지 | 2025-04-22 |
2692343 | scnaf에 자꾸 선언을 참조하라는데;; (8) | 도래 | 2025-04-22 |
2692282 | 도스상에서 생성된 exe파일에 press~ 뜨게 하기 (4) | 회사원 | 2025-04-21 |
2692256 | scanf("%*c"); ㅠㅠ 고수님들 | 거북이 | 2025-04-21 |
2692230 | 하노이탑 질문입니다. (1) | 미쁘다 | 2025-04-21 |
2692210 | 정보 올림피아드 문제인데.. 풀이 과정이 궁금합니다.(재귀함수) (5) | 물티슈 | 2025-04-20 |
2692144 | C언어와 리눅스에 대한 질문입니다. | 싴흐한세여니 | 2025-04-20 |
2692114 | 컨텍스트 스위칭하는데 걸리는 시간 측정.. | YourWay | 2025-04-19 |
2692086 | 간접참조 연산자, 증감연산자 질문이용! (2) | 블랙캣 | 2025-04-19 |
2692056 | 주석좀 달아주세요. 몇개적엇는데 몇개만달아주세요. (2) | DevilsTears | 2025-04-19 |
2691978 | 진수 쉽게 이해하는법... (3) | 지지않는 | 2025-04-18 |
2691949 | getchar() 한 문자를 입력받는 함수 질문 | 채꽃 | 2025-04-18 |
2691919 | 배열 정렬 및 합치기 질문입니다. | 사과 | 2025-04-18 |
2691845 | c언어왕초보 질문이 있습니다........ | 루나 | 2025-04-17 |
2691815 | void add(int num); 함수... (4) | 살랑살랑 | 2025-04-17 |
2691756 | 명령 프롬프트 스크롤바가 없어요 | 두메꽃 | 2025-04-16 |
2691725 | 자료구조에 관련해서 질문이 있어 글을 올립니다. | 누리알찬 | 2025-04-16 |
2691697 | if 문에서 구조체 배열에 저장되있던 문자열 검사하는 법 ? (2) | 민트맛사탕 | 2025-04-16 |
2691678 | C언어 함수 질문이요~!!! | 연보라 | 2025-04-15 |