有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

soap SoapUI验证错误。无法将lang.String转换为org。阿帕奇。xmlbeans。XmlError

<soap:Envelope xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsrl="http://docs.oasis-open.org/wsrf/rl-2" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ns1="http://workflow.comarch.com/SDService_ws" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsrp="http://docs.oasis-open.org/wsrf/rp-2" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://www.w3.org/2005/08/addressing">
   <soap:Body wsu:Id="myBody-1491835424">
      <ns1:listProcessesResponse>
         <listProcessesReturn xsi:nil="true" xsi:type="tns:listProcessesReturn"/>
      </ns1:listProcessesResponse>
   </soap:Body>
</soap:Envelope>

SOAP响应有什么问题?我正在使用SoapUI来验证SOAP答案。它检查收到的响应是否与WSDL标准兼容。因此,当我在SoapUI中运行验证时,它会产生以下错误

java.lang.String cannot be cast to org.apache.xmlbeans.XmlError

Here it is shown on the screen


共 (1) 个答案

  1. # 1 楼答案

    消息本身看起来像SoapUI错误处理中的一个bug

    What is wrong with that SOAP response?

    你的schemaLocation错了

    xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/"
    

    你有两次相同的URI

    此外,您正在使用名称空间tns,而没有在中定义它

    xsi:type="tns:listProcessesReturn"