【发布时间】:2020-09-07 16:09:09
【问题描述】:
我在尝试使用 SOAP 服务时遇到错误,该服务部署在 Jboss EAP 7.1 和 My Server 中,带有 Apache camel[2.24.3] 和 spring [5.2.2.RELEASE]部署在 Weblogic12c 中。交换发生后,它需要以字符串格式提供 getMandatoryBody() 但它在 DOMSource 中返回,骆驼无法将 DOMService 转换为字符串。
我得到的例外是:
No body available of type: java.lang.String but has value: javax.xml.transform.dom.DOMSource@37279c86 of type: javax.xml.transform.dom.DOMSource on: Message[ID-everest2-1589967071589-0-11]. Caused by: Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is instance of java.xml.transform.Source] due javax.xml.transform.TransformerException: java.lang.RuntimeException: com.ctc.wstx.exc.WstxIOException: Stream closed. Exchange[ID-everest2-1589967071589-0-10]. Caused by: [org.apache.camel.TypeConversionException - Error during type conversion from type: java.lang.String to the required type: java.lang.String with value [Body is instance of java.xml.transform.Source] due javax.xml.transform.TransformerException: java.lang.RuntimeException: com.ctc.wstx.exc.WstxIOException: Stream closed
只有当我在 weblogic 12c 中部署我的服务器 [with camel and spring] 时才会出现问题。其他应用服务器 Tomcat 8.5.35 和 jboss-EAP7.2 。运行正常。
我尝试将 camel-spring-ws 版本降级到 [2.17.3] 它工作正常。
【问题讨论】:
标签: java spring soap apache-camel weblogic12c