SOAP XML错误中的重复名称空间前缀

时间:2012-11-07 09:26:17

标签: java xml xml-parsing xsd

我们将以下SOAP XML发送到服务器

<?xml version="1.0" ?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">   
<SOAP-ENV:Header/>    
<SOAP-ENV:Body>        
<ns2:search xmlns:ns2="http://search.tbx.codegen.it">            
    <arg0/>            
    <arg1/>            
    <arg2 xmlns:ns4="http://criteria.search.tbx.codegen.it" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns4:AccomSearchCriteria">                
       <adult>1</adult>
         ...
    </arg2>            
    <arg3>50</arg3>        
</ns2:search>    
</SOAP-ENV:Body></SOAP-ENV:Envelope>

但是服务器加密器的错误如下

SEVERE: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxParsingException: Duplicate declaration for namespace prefix 'SOAP-ENV'.
 at [row,col {unknown-source}]: [1,132]
com.sun.xml.ws.protocol.soap.MessageCreationException: Couldn't create SOAP message due to exception: XML reader error: com.ctc.wstx.exc.WstxParsingException: Duplicate declaration for namespace prefix 'SOAP-ENV'.
 at [row,col {unknown-source}]: [1,132]
        at com.sun.xml.ws.encoding.SOAPBindingCodec.decode(SOAPBindingCodec.java:359)
        at com.sun.xml.ws.transport.http.HttpAdapter.decodePacket(HttpAdapter.java:318)

我们发送的XML消息是否有任何问题(重复名称空间前缀'SOAP-ENV')?

提前谢谢大家

0 个答案:

没有答案