--
您收到此信息是由于您订阅了 Google 论坛“cxf-zh”论坛。
要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
On 4月27日, 下午12时03分, Freeman Fang <freeman.f...@gmail.com> wrote:
> 类似这样的代码可以获得soap body
> /**
> * Extract the content as DOM element
> */
> protected Element getBodyElement(SoapMessage message) {
> try {
> XMLStreamReader xmlReader = message
> .getContent(XMLStreamReader.class);
> XMLStreamReader filteredReader = new
> PartialXMLStreamReader(
> xmlReader, message.getVersion().getBody());
> //ensure the whitespace is passed
> StaxUtils.toNextElement((DepthXMLStreamReader)
> filteredReader);
> Document doc = DOMUtils.createDocument();
> StaxUtils.readDocElements(doc, filteredReader, true);
> return doc.getDocumentElement();
> } catch (XMLStreamException e) {
> throw new Fault(e);
> }
> }
>
> Freeman
>
> On 2012-4-27, at 上午11:31, waitc...@163.com wrote:
>
>
>
> > 请问在CXF中,如何从message取得报文信息;就像
> > LoggingInInterceptor,LoggingOutInterceptor一
> > 样,但是我只需要Payload的内容,需要从message中取,而非SoapMessage;
> > inBound信息,与outBound信息都需要;
> > 初学CXF,这个问题困扰很久了,请大家帮帮忙,谢谢!
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"cxf-zh"论坛。
> > 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> > 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> > 更多选项,请通过http://groups.google.com/group/cxf-zh?hl=zh-CN访问该
> > 论坛
> > ----
> > Apache CXF 首页http://cwiki.apache.org/confluence/display/CXF/Index
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ff...@fusesource.com
更多选项,请通过 http://groups.google.com/group/cxf-zh?hl=zh-CN 访问该论坛
----
Apache CXF 首页 http://cwiki.apache.org/confluence/display/CXF/Index
On 4月27日, 下午7时03分, Freeman Fang <freeman.f...@gmail.com> wrote:
> 到了pre-invoke阶段已经是java对象了, unmarshal阶段做xml到java的转换,这
> 个在pre-invoke之前
> Freeman
> On 2012-4-27, at 下午6:33, June Kobol wrote:
>
>
>
>
>
> > 拦截器可以在pre_invoke阶段 将xml流通过jaxbing转换为java对象吗?
>
> > 在 2012年4月27日 下午6:22,Freeman Fang <freeman.f...@gmail.com>写道:
> > 请参照cxf自带的LoggingIn/OutInterceptor
> > 如果你想从message里面直接拿到XMLStreamReader.class, inbound需要用
> > Phase.POST_STREAM, 在cxf的StaxInInterceptor之后
>
> > Freeman
> > Blog:http://freemanfang.blogspot.com
> >http://blog.sina.com.cn/u/1473905042
> > weibo:http://weibo.com/u/1473905042
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"cxf-zh"论坛。
> > 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> > 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> > 更多选项,请通过http://groups.google.com/group/cxf-zh?hl=zh-CN访问该
> > 论坛
> > ----
> > Apache CXF 首页http://cwiki.apache.org/confluence/display/CXF/Index
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"cxf-zh"论坛。
> > 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> > 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> > 更多选项,请通过http://groups.google.com/group/cxf-zh?hl=zh-CN访问该
> > 论坛
> > ----
> > Apache CXF 首页http://cwiki.apache.org/confluence/display/CXF/Index
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ff...@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog:http://freemanfang.blogspot.comhttp://blog.sina.com.cn/u/1473905042
> weibo:http://weibo.com/u/1473905042- 隐藏被引用文字 -
>
> - 显示引用的文字 -
On 4月27日, 下午6时22分, Freeman Fang <freeman.f...@gmail.com> wrote:
> 请参照cxf自带的LoggingIn/OutInterceptor
> 如果你想从message里面直接拿到XMLStreamReader.class, inbound需要用
> Phase.POST_STREAM, 在cxf的StaxInInterceptor之后
>
> Freeman
On 4月27日, 下午7时03分, Freeman Fang <freeman.f...@gmail.com> wrote:
> 到了pre-invoke阶段已经是java对象了, unmarshal阶段做xml到java的转换,这
> 个在pre-invoke之前
> Freeman
> On 2012-4-27, at 下午6:33, June Kobol wrote:
>
>
>
>
>
> > 拦截器可以在pre_invoke阶段 将xml流通过jaxbing转换为java对象吗?
>
> > 在 2012年4月27日 下午6:22,Freeman Fang <freeman.f...@gmail.com>写道:
> > 请参照cxf自带的LoggingIn/OutInterceptor
> > 如果你想从message里面直接拿到XMLStreamReader.class, inbound需要用
> > Phase.POST_STREAM, 在cxf的StaxInInterceptor之后
>
> > Freeman
> > Blog:http://freemanfang.blogspot.com
> >http://blog.sina.com.cn/u/1473905042
> > weibo:http://weibo.com/u/1473905042
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"cxf-zh"论坛。
> > 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> > 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> > 更多选项,请通过http://groups.google.com/group/cxf-zh?hl=zh-CN访问该
> > 论坛
> > ----
> > Apache CXF 首页http://cwiki.apache.org/confluence/display/CXF/Index
>
> > --
> > 您收到此信息是由于您订阅了 Google 论坛"cxf-zh"论坛。
> > 要在此论坛发帖,请发电子邮件到 cxf...@googlegroups.com
> > 要退订此论坛,请发邮件至 cxf-zh-un...@googlegroups.com
> > 更多选项,请通过http://groups.google.com/group/cxf-zh?hl=zh-CN访问该
> > 论坛
> > ----
> > Apache CXF 首页http://cwiki.apache.org/confluence/display/CXF/Index
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:ff...@fusesource.com
> Web: fusesource.com
> Twitter: freemanfang
> Blog:http://freemanfang.blogspot.comhttp://blog.sina.com.cn/u/1473905042