How can i get raw Inputstream response from JAX-WS client?

▼魔方 西西 提交于 2019-12-11 11:54:30

问题


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?


回答1:


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

 org.apache.cxf.stax.maxChildElements

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



来源:https://stackoverflow.com/questions/33686564/how-can-i-get-raw-inputstream-response-from-jax-ws-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!