开发者

Apache Abdera Client Response getDocument method

开发者 https://www.devze.com 2023-02-17 14:36 出处:网络
I am using client response interface of apache abder开发者_如何学Ca. I want to see what data the server returns me in the response object. I tried using the getDocument() method of response object but

I am using client response interface of apache abder开发者_如何学Ca. 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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消