【问题标题】:org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: Web Service error. Soap Exceptionorg.w3c.dom.DOMException:WRONG_DOCUMENT_ERR:Web 服务错误。肥皂例外
【发布时间】:2014-08-18 09:23:47
【问题描述】:

通过使用 wsdl2java,我从 WSDL 执行方法。这些方法仅包括远程异常。当我运行程序时,它给出了标题上写的错误。但是我期待一个 Soap 异常,因为当我通过 Soap UI 发出请求时,我可以很容易地看到 xml 格式的肥皂异常。截取的代码是这样的:

try
{
   enrollResponse = server_service.enroll(enrollParameters);
}
catch (RemoteException e)
{
   logger.fatal(e.getMessage);
}

Error: org.w3c.dom.DOMException: WRONG_DOCUMENT_ERR: A node is used in a different document than the one that created it. 

我认为问题在于程序遵循确定的 xml 格式,但肥皂异常的格式不同。因此它给出了错误。但是在remoteexception下我无法达到soap异常的xml格式。

我怎样才能达到那个异常?

【问题讨论】:

    标签: java web-services wsdl2java domexception soapexception


    【解决方案1】:

    请检查 Axis Jar 的版本。

    此问题已针对 Axis 1.3 进行了修补,但不适用于 Axis 1.4。

    请参考此链接

    https://issues.apache.org/jira/browse/AXIS-2705

    【讨论】:

    • 我已经有相同的罐子了
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多