Apache Abdera 客户端响应 getDocument 方法
我正在使用 apache abdera 的客户端响应接口。我想看看服务器在响应对象中返回了哪些数据。我尝试使用响应对象的 getDocument() 方法,但它引发了如下异常:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(Lorg/apache/ axiom/om/util/StAXParserConfiguration;)Ljavax/xml/stream/XMLInputFactory; 在 org.apache.abdera.parser.stax.FOMParser.getXMLInputFactory(FOMParser.java:152) 在 org.apache.abdera.parser.stax.FOMParser.createXMLStreamReader(FOMParser.java:178) 在 org.apache.abdera.parser.stax.FOMPerser.parse(FOMPerser.java:143) 在 org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:111) 在 org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:89) 在 org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:71)
有谁知道如何读取响应对象的内容?
谢谢
I am using client response interface of apache abdera. I want to see what data the server returns me in the response object. I tried using the getDocument() method of response object but it throws me an exception as follows:
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.axiom.om.util.StAXUtils.getXMLInputFactory(Lorg/apache/axiom/om/util/StAXParserConfiguration;)Ljavax/xml/stream/XMLInputFactory;
at org.apache.abdera.parser.stax.FOMParser.getXMLInputFactory(FOMParser.java:152)
at org.apache.abdera.parser.stax.FOMParser.createXMLStreamReader(FOMParser.java:178)
at org.apache.abdera.parser.stax.FOMParser.parse(FOMParser.java:143)
at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:111)
at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:89)
at org.apache.abdera.protocol.client.AbstractClientResponse.getDocument(AbstractClientResponse.java:71)
Does anyone know a way to read the conents of response object?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在不同的情况下遇到过同样的问题。经过一些调查后,我发现该问题出在错误的编译时/运行时 Axiom 版本中(1.2.5 与 1.2.10);
提起
https://issues.apache.org/jira/browse/ABDERA-284
我已附加建议的修复程序(ABDERA-284-fix.diff),该修复程序对我来说效果很好。
I've faced the same problem under different circumstanes. After some investigations I've found out, that problem is in wrong compile-time/runtime Axiom version (1.2.5 vs 1.2.10);
Filed
https://issues.apache.org/jira/browse/ABDERA-284
I've attached proposed fix (ABDERA-284-fix.diff), that worked fine for me to the bug.