2008-11-04 5 views
0

Tomcat5.5에 Axis2와 함께 게시 된 간단한 POJO 웹 서비스가 있습니다. ATL C++ 클라이언트에서 사용하려고하는데 실패합니다. C# 클라이언트와 동일한 작업을 수행합니다. 문제는 ATL 클라이언트가ATL C++ 클라이언트에서 Axis2 웹 서비스 호출

<soap:Body>< xmlns="http://fa.test.com/xsd"></></soap:Body></soap:Envelope> 

공지 사항 중간에 잘못된 요소처럼 보이는 비누 몸을 보내는 것입니다. 는 전 C#이

<?xml version='1.0' encoding='utf-8'?> 

의 헤더를 보내고 ATL 클라이언트가되지 않기 때문에이 UTF-8과 함께 할 수있는 뭔가가 생각한다. 또한 몇 가지 ATL SOAP 내부 구조를 살펴보면 구조에 szName과 szwName이라는 두 멤버가 있음을 알 수 있습니다. 첫 번째 요소는 비어 있고 요소를 생성하고, 두 번째 요소는 testResponse의 유효한 (?) 이름을 갖습니다 (호출하는 메서드는 "test"라고 함).

여기에서 어디로 가야할지 조언이 필요하십니까?

자세한 내용 : 전체 ATL 클라이언트에서 메시지 : Axis2를에서

POST /axis2/services/EnterpriseService.EnterpriseServiceHttpSoap11Endpoint/ HTTP/1.1 
Content-Length: 304 
Content-Type: text/xml; charset=utf-8 
SOAPAction: "urn:test" 
Accept: text/xml 
Host: xxxxxxx 
User-Agent: Microsoft-ATL-Native/8.00 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"><soap:Body>< xmlns="http://fa.test.com/xsd"></></soap:Body></soap:Envelope> 

응답 :

HTTP/1.1 500 Internal Server Error 
Server: Apache-Coyote/1.1 
Content-Type: text/xml;charset=utf-8 
Transfer-Encoding: chunked 
Date: Tue, 04 Nov 2008 15:31:57 GMT 
Connection: close 

<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '>' (code 62); expected an element name.&#xd; 
at [row,col {unknown-source}]: [1,276]</faultstring><detail /></soapenv:Fault></soapenv:Body></soapenv:Envelope> 

아, 그리고 여기에 좋은 요청이 C#을 클라이언트에서 오는 :

POST /axis2/services/EnterpriseService.EnterpriseServiceHttpSoap11Endpoint/ HTTP/1.1 
Via: 1.1 ANGEL-ISLAND 
Content-Type: text/xml; charset=utf-8 
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.1433) 
Host: xxxxxxx:8080 
SOAPAction: "urn:test" 
Connection: Keep-Alive 
Content-Length: 236 

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body /></soap:Envelope> 

C#의 경우 soap : body가 비어 있습니다.

+0

더 자세히 설명해주세요 ... 중간에 잘못된 요소는 무엇입니까? C#은 어떤 헤더를 보냅니 까? 어떤 오류 메시지가 나타 납니까? –

+0

위에 세부 정보를 게시하십시오. 가운데에있는 잘못된 요소는 ""입니다. –

답변

0

UTF-8과 관련이 없다고 생각합니다.

C#의 유효한 메시지에는 유효하지 않은 메시지가있는 반면 soap : Body 내부에는 아무 것도 없습니다. ATL C++ 클라이언트가 아무 것도 없을 때 SOAP 본문 내부에 무언가를 강제로 넣으려고하는 것처럼 보입니다.

C# 클라이언트는 메시지에 testResponse 요소를 포함하지 않습니다.

szName을 사용하는 곳에서 코드를 좀 더 살펴보고 그것이 생성되는 곳이 어디인지 확인해보십시오. 그렇게해서는 안됩니다.

2

ATL 서버는 전적으로 요청을 올바르게 생성 할 수 있습니다. WSDL에 문제가있는 것 같습니다.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> 
    <soap:Body></soap:Body></soap:Envelope> 

SoapParameterStyle.Bare와 ASP.NET 웹 서비스에 대한 나의 피상적 테스트는 요청을 생성합니다. 입력 메시지에 <wsdl:part> 요소가 있습니까? WSDL 서비스 설명을 게시 할 수 있습니까?

관련 문제