spring hessian远程调用

longren629 2011-03-04 12:32:39
远程服务器的web.xml中有如下配置
<filter>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
<init-param>
<param-name>targetClass</param-name>
<param-value>org.acegisecurity.util.FilterChainProxy</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

我的客户端的spring的配置如下

<bean id="myBctype" class="org.springframework.remoting.caucho.HessianProxyFactoryBean">
<property name="serviceUrl">
<value>
http://192.168.1.247:7005/remoting/BC/Bctype/BctypeService</value>
</property>
<property name="serviceInterface">
<value>gov.mof.fasp.bc.bctype.bpo.IBctypeBPO</value>
</property>

</bean>

调用时我的客户端页面报如下错误
com.caucho.hessian.client.HessianConnectionException: 500: java.io.IOException: Server returned HTTP response code: 500 for URL: http://192.168.1.247:7005/remoting/BC/Bctype/BctypeService
com.caucho.hessian.client.HessianProxy.invoke(HessianProxy.java:197)
$Proxy232.findBcTypes(Unknown Source)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.springframework.remoting.caucho.HessianClientInterceptor.invoke(HessianClientInterceptor.java:115)
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:209)
$Proxy167.findBcTypes(Unknown Source)
com.scmofit.util.HessionAction.GetListInfo(HessionAction.java:63)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
远程服务器上也有如下的错误日志:
Servlet failed with Exception
org.acegisecurity.AuthenticationCredentialsNotFoundException: An Authentication
object was not found in the SecurityContext
at org.acegisecurity.intercept.AbstractSecurityInterceptor.credentialsNo
tFound(AbstractSecurityInterceptor.java:329)
at org.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocat
ion(AbstractSecurityInterceptor.java:244)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.invoke(Filt
erSecurityInterceptor.java:104)
at org.acegisecurity.intercept.web.FilterSecurityInterceptor.doFilter(Fi
lterSecurityInterceptor.java:72)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:274)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilte
r(HttpSessionContextIntegrationFilter.java:191)
at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter(F
ilterChainProxy.java:274)
at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.jav
a:148)
at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.j
ava:90)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at com.tjhq.inspect.filter.SessionFilter.doFilter(SessionFilter.java:153
)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
va:27)
at com.tjhq.inspect.common.filters.SetCharacterEncodingFilter.doFilter(S
etCharacterEncodingFilter.java:122)

备注:
在将服务器的web.xml

<filter-mapping>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
更改为

<filter-mapping>
<filter-name>Acegi Filter Chain Proxy</filter-name>
<url-pattern>*.do</url-pattern>
</filter-mapping>
我的客户端能够成功调用 hessian并且返回数据,但是生产服务器的配置是不允许我更改的。
...全文
256 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复
hessian好偏
曾用过,忘了
longren629 2011-03-04
  • 打赏
  • 举报
回复
有高手没?

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧