0
Oracle Jdeveloper를 사용하여 SOAP 기반 웹 서비스를 개발하고 있지만 이상한 동작이 있습니다. 요청을 보낼 때 응답은 다음과 같습니다. SOAP 메시지에 구조가 표시 될 수 없다는 오류가 있습니다.SOAP 웹 서비스에서 SOAP 응답 문제
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:dizResponse xmlns:ns2="http://ofelia/">
<return>
<ns2:POSI>
<RefreshInterval>0</RefreshInterval>
<Lon>53</Lon>
<Lat>14</Lat>
</ns2:POSI>
</return>
</ns2:dizResponse>
</S:Body>
</S:Envelope>
의 유효성을 검사 XML 스키마는 다음과 같습니다 :
<xs:schema version="1.0" targetNamespace="http://ofelia/" xmlns:tns="http://ofelia/" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="POSI">
<xs:complexType>
<xs:all>
<xs:element name="TimeStamp" type="xs:string"/>
<xs:element name="RefreshInterval" type="xs:int"/>
<xs:element name="Lon" type="xs:int"/>
<xs:element name="Lat" type="xs:int"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="TESTE">
<xs:complexType>
<xs:all>
<xs:element name="TimeStamp" type="xs:string"/>
<xs:element name="cenas" type="xs:float" nillable="true"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:complexType name="dizResponse">
<xs:sequence>
<xs:element name="return" minOccurs="0">
<xs:complexType mixed="true">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="tns:POSI"/>
<xs:element ref="tns:TESTE"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
HTTP 요청 :
POST http://localhost:7101/ofelia/agrupaPort HTTP/1.1
SOAPAction: ""
Content-Type: text/xml; charset=UTF-8
Host: localhost:7101
Content-Length: 155
X-HTTPAnalyzer-Rules: [email protected]:8099
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ofelias/">
<env:Header/>
<env:Body>
<ns1:diz/>
</env:Body>
</env:Envelope>
HTTP 응답 내가 HTTP 컨텐츠를 조사하는 경우에는 응답 내가 기대하고 있었는지 HUST 권리입니다 :
HTTP/1.1 200 OK
Content-Type: text/xml;charset=UTF-8
X-Powered-By: Servlet/2.5 JSP/2.1
Date: Thu, 11 Jul 2013 10:30:23 GMT
X-ORACLE-DMS-ECID: 583c10bfdbd326ba:-2aaa5a0a:13fc957b02e:-8000-0000000000000441
Content-Length: 403
X-HTTPAnalyzer-RuleName: Pass through :
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:dizResponse xmlns:ns2="http://ofelias/">
<return>
<ns2:TESTE>
<cenas>1.0</cenas>
<TimeStamp>asdasdasd</TimeStamp>
</ns2:TESTE>
<ns2:POSI>
<RefreshInterval>5</RefreshInterval>
<Lon>53.0</Lon>
<Lat>14.0</Lat>
<TimeStamp>asdasdsa</TimeStamp>
</ns2:POSI>
</return>
</ns2:dizResponse>
</S:Body>
</S:Envelope>
왜 이런 일이 일어나고 있는지 아십니까?
안부
Humm 모든 것이 정상적으로 보입니다 ... http 메시지를 추가했습니다. – Winter