当我向它添加另一个调用时,它有时会失败(从EJB到web服务),在EJB到外部web服务调用中出现此异常。org.springframework.remoting.RemoteAccessException: Could not access remote service [SomeServicePort]; nested exception is java.net.MalformedURLException

at org.springframework.remoting.rmi.RmiClientInterceptorUtils.convertRmiAccessException(RmiClientInterceptorUtils.java:190)

at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.handleRemoteException(JaxRpcPortClientInterceptor.java:737)

at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.doInvoke(JaxRpcPortClientInterceptor.java:595)

at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:562)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)

at $Proxy112.obtainClinicalCode(Unknown Source)

...

Caused by: java.net.MalformedURLException

at java.net.URL.(URL.java:601)

at java.net.URL.(URL.java:464)

at java.net.URL.(URL.java:413)

at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:133)

...

在我的应用程序上下文中,在Spring(2.5)中配置了服务,如下所示

class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean"

lazy-init="true" scope="prototype">

org.apache.axis.client.ServiceFactory

myWSDLPath...

com.controller

Mine

MinePort

com.MineServiceRemote

com.MineService

我使用的是Java 5和web logic 10,我从EJB调用外部web service之前和之后添加了日志记录:可以看到通过workmanagers对EJB进行了多个调用,但在EJB内部,它引发了异常。

问题出在EJB调用外部Web服务。

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐