【发布时间】:2017-03-28 15:41:30
【问题描述】:
在将 DTO 序列化为 XML 时,如何配置 Apache CXF 客户端和服务器以将其他类传递给 JAXBContext?
我不能使用@XmlSeeAlso 注释,因为这些类在编译带有数据协定的 jar 时是未知的,但在客户端编译时是已知的。
在客户端我尝试使用:
Service service = Service.create(wsdlURL, serviceName, new UsesJAXBContextFeature(MyFactory.class));
T client = service.getPort(clazz);
但我收到异常,告诉我 CXF 不支持此功能。
【问题讨论】: