Topic: XFire:如何取得RequestContext

  Print this page

1.XFire:如何取得RequestContext Copy to clipboard
Posted by: aweisw
Posted on: 2006-07-14 10:03

在Client 中需设置一个property 来enable session maintain
import javax.xml.ws.*;
Hello proxy = new HelloService().getHelloPort();
((BindingProvider)proxy) .getRequestContext() .put(BindingProvider.SESSION_MAINTAIN_PROPERTY,true);

它把 proxy强制转换成BindingProvider...我是用的XFire来生成的Client...这样强制转换 就会抛异常 ClassCastException..因为其并没有实现BindingProvider 接口.

在XFire 有没有其它方式得到 RequestContext???

谢谢!!!


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923