我们正在将我们的应用程序从 Jboss 6 迁移到 Wildfly 10,大多数 Web 服务运行正常,但是我们面临一个外部 Web 服务响应中的空日期标签的问题:
java.security.PrivilegedActionException: javax.xml.bind.UnmarshalException
- with linked exception:
[com.sun.istack.SAXParseException2; lineNumber: 1; columnNumber: 784; ]
Caused by: java.lang.IllegalArgumentException:
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parseBigInteger(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl$Parser.parse(Unknown Source)
at org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl.<init>(Unknown Source)
at org.apache.xerces.jaxp.datatype.DatatypeFactoryImpl.newXMLGregorianCalendar(Unknown Source)
at __redirected.__DatatypeFactory.newXMLGregorianCalendar(__DatatypeFactory.java:180)
at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$12.parse(RuntimeBuiltinLeafInfoImpl.java:592)
... 158 more
行和列是以下元素的开始
...<ADATE><date />...
如您所见,日期为空并导致解析器失败(我假设基于证据)
这是该 XML 元素的 WSDL 定义的片段:
<xsd:element name="ADATE">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="date" minOccurs="1" maxOccurs="100" type="xsd:date"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
我们使用 Apache CXF 3.1.6 生成了我们的客户端类:wsdl2java -frontend jaxws21 ....
- 使用 SEIStub 实现时,该调用适用于 Web 服务。
- 在 Wildfly 中使用相同的代码时,它不会抛出所描述的异常。
- 需要这些信息吗?
有没有其他可以在 Wildfly 10 中配置的 JAXB 实现?,如何?
谢谢