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

C++빌더 Q&A
C++Builder Programming Q&A
[60776] C++ Builder를 이용하여 Soap Server 만들려고하는데...
Soap [] 2413 읽음    2010-04-14 16:44
C++ Builder를 이용하여 Soap Server 만들려고합니다.
아파치 웹서버를 이용하였고, 서버 Application 생성할때 cgi-stand alone executable로 하였습니다.
테스트를 위해 빌더에서 기본으로 생성해 주는 샘플유닛을 사용하였고 제가 코딩한 부분은 없습니다.
처음엔 빌더 6으로 시도했으나 WSDL페이지()를 보려고 하니 "Error: This name may not contain the ':' character: -->:<--n1/EOleException" 이런 오류가 생겨서 포기하고,
빌더 2010으로 시도하여 wsdl페이지까지 잘 봐졌는데 실제로 사용하려고 하면 xml오류가 생깁니다.
요청과 응답 각각의 데이터를 보면
1. 요청(xml)
<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:SoapTest-ISoapTest">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:echoDouble soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <dValue xsi:type="xsd:double">3</dValue>
      </urn:echoDouble>
   </soapenv:Body>
</soapenv:Envelope>

2. 응답(xml)
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Body>
      <SOAP-ENV:Fault>
         <faultactor/>
         <faultcode>SOAP-ENV:Server</faultcode>
         <faultstring>XML 臾몄꽌�먮뒗 理쒖긽���붿냼媛�諛섎뱶���덉뼱���⑸땲��

Line: 0</faultstring>
      </SOAP-ENV:Fault>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

3. 요청(Raw)
POST http://localhost/cgi-bin/ServerApp.exe/soap/ISoapTest HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "urn:SoapTest-ISoapTest#echoDouble"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: localhost
Content-Length: 451

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:SoapTest-ISoapTest">
   <soapenv:Header/>
   <soapenv:Body>
      <urn:echoDouble soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <dValue xsi:type="xsd:double">3</dValue>
      </urn:echoDouble>
   </soapenv:Body>
</soapenv:Envelope>

4. 응답(Raw)
HTTP/1.1 200 OK
Date: Wed, 14 Apr 2010 07:18:50 GMT
Server: Microsoft-IIS/5.0
Content-Version: MIME-Version: 1.0
Content:
Content-Length: 728
Content-Type: multipart/related; boundary=MIME_boundaryB0R9532143182121; start="<http://www.borland.com/rootpart.xml>"


--MIME_boundaryB0R9532143182121
Content-Type: text/xml
Content-ID: <http://www.borland.com/rootpart.xml>
Content-Location: http://www.borland.com/rootpart.xml
Content-Length: 503

<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><SOAP-ENV:Fault><faultactor/><faultcode>SOAP-ENV:Server</faultcode><faultstring>XML 臾몄꽌�먮뒗 理쒖긽���붿냼媛�諛섎뱶���덉뼱���⑸땲��

Line: 0
</faultstring></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>


--MIME_boundaryB0R9532143182121--

이며, fault string은 유니코드라 깨져보이는거 같은데 "XML 문서에는 최상위 요소가 반드시 있어야 합니다."라는 문자열입니다.

빌더나 델파이를 이용하여 Soap Sever/Client구현해 보신분 계시면 도움 좀 부탁드릴게요...

+ -

관련 글 리스트
60776 C++ Builder를 이용하여 Soap Server 만들려고하는데... Soap 2413 2010/04/14
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.