我如何从JAX-WS客户端获取原始Inputstream响应? [英] How can i get raw Inputstream response from JAX-WS client?

查看:69
本文介绍了我如何从JAX-WS客户端获取原始Inputstream响应?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个JAX-WS Web服务的客户端.当响应映射到Java对象时,我遇到的问题是Unmarshalling Error: Maximum Number of Child Elements limit (50000) Exceeded异常.因此,我考虑了手动SAX解析响应.有没有什么黑客/拦截器可以让我使用很好的JAX-WS方法绑定和手动SAX解析(通过InputStream)响应?

I've got an a client for JAX-WS webservice. The problem that i faced is the exception Unmarshalling Error: Maximum Number of Child Elements limit (50000) Exceeded when response is mapping to Java Objects. So i think about manually SAX parsing response. Is there any kind of hack/interceptor that allows me to use nice JAX-WS method binding with manually SAX parsing(through InputStream) the response?

推荐答案

实际上不需要这样做,因为您可以覆盖属性

Actually there's no need to do that, since you can just override the property

 org.apache.cxf.stax.maxChildElements

摆脱异常.有关更多信息,请查看官方文档: http://cxf.apache.org/docs/security.html

to get rid of the exception. For more information, check it out the official documentation: http://cxf.apache.org/docs/security.html

这篇关于我如何从JAX-WS客户端获取原始Inputstream响应?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆