掌握 FastInfoset 读者和作者
JDK 1.6 包含通过 JAX-WS API 使用 FastInfoset Web 服务的功能。这些的实现隐藏在 com.sun.xml.internal
深处,其包名称旨在让任何明智的 java 开发人员都敬畏上帝(例如 com.sun.xml.internal .fastinfoset.stax.StAXDocumentParser
(实现 XMLStreamReader
)和 com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer
(实现 XMLStreamWriter
)。
我的理解是,这些 FastInfoset 实现的使用是内部 JAX-WS 内容协商逻辑的一部分,因此不会暴露给公共 API。但是,我想显式使用 FastInfoset 实现,使用他们的公共 STAX 接口,并通过公共工厂类,而不是直接引用这些内部包
有谁知道这个设施是否可用,也许通过标准 STAX 工厂?
JDK 1.6 includes the capability for using FastInfoset web services via the JAX-WS API. The implementations of these are hidden deep inside com.sun.xml.internal
, with package names designed to put the fear of god into any sensible java developer (e.g. com.sun.xml.internal.fastinfoset.stax.StAXDocumentParser
(which implements XMLStreamReader
) and com.sun.xml.internal.fastinfoset.stax.StAXDocumentSerializer
(which implements XMLStreamWriter
).
My understanding is that the use of these FastInfoset implementations is part of the internal JAX-WS content negotiation logic, and therefore not exposed to the public API. However, I want to make explicit use of the FastInfoset implementations, using their public STAX interfaces, and referably via a public factory class, rather than direct reference to these internal packages.
Does anyone know if this facility is available, perhaps via the standard STAX factories?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
XMLInputFactory 和 XMLOutputFactory 似乎是合理的。
每个在我的环境中都有三种实现,其中一种是 cxf(已排除),一种来自 codehaus(已排除),另一种来自您所指的 fast infoset 包。
我使用 Eclipse“参考”发现了这一点,因为 javadoc 不包含“使用”部分。
XMLInputFactory and XMLOutputFactory seem plausible.
Each has three implementations in my environment, one of which is cxf (ruled-out), one from codehaus (ruled-out), the other is from the fast infoset package you are referring to.
I found this using Eclipse "References", because the javadoc doesn't include the "Use" section.