Java 春季远程处理;不带方法的JdkDynamicAopProxy
一些背景故事:我正在建立一个旧(er)系统的测试环境(2008)。系统目前处于工作状态,但我们需要在升级之前开始测试。有一个前端代理应用程序通过Spring(2.5.4)HTTP调用与后端应用程序交互 我已经准备好了源代码和与spring相关的依赖项,并且能够通过源代码附带的构建脚本编译系统。我已经设置了一个本地VM作为后端,应用程序部署并运行在两边的JBoss(4.2.2)上 我能够向代理运行Soap请求,身份验证正在工作,所以一切似乎都是正确的 现在,当我试图访问我的服务器服务时,通过HTTP调用的应用程序之间的通信不起作用 以下是我在服务器端的设置: 这将创建一个bean,其中包含我的所有相关服务 在这个地方Java 春季远程处理;不带方法的JdkDynamicAopProxy,java,spring,web-services,spring-mvc,soap,Java,Spring,Web Services,Spring Mvc,Soap,一些背景故事:我正在建立一个旧(er)系统的测试环境(2008)。系统目前处于工作状态,但我们需要在升级之前开始测试。有一个前端代理应用程序通过Spring(2.5.4)HTTP调用与后端应用程序交互 我已经准备好了源代码和与spring相关的依赖项,并且能够通过源代码附带的构建脚本编译系统。我已经设置了一个本地VM作为后端,应用程序部署并运行在两边的JBoss(4.2.2)上 我能够向代理运行Soap请求,身份验证正在工作,所以一切似乎都是正确的 现在,当我试图访问我的服务器服务时,通过HTT
RmiDataTransferObject resp = service.getServed(getRequest(csr), OnlineServiceI.CHECK_STATUS_SERVICE);
其中RmiDataTransferObject getServed(…,…)是my.own.interface.OnlineServiceI的一部分。如果我调试执行,会有一个JdkDynamicAopProxy声明正确的HTTP路径,但它没有注册任何方法。只有预期的接口
我可能会错过什么?如果我在浏览器中尝试HTTP url,我会得到一个500,这表示路径是正确的(某些内容映射到该地址)。这是您实际收到的消息吗?如果是这样,您的URL没有正确翻译,这表明您缺少占位符配置器。是的,这就是消息/异常。我猜你指的是PropertyPlaceHolderConfigure(正如我所说,我在这方面是一个真正的新手)。如我所见,定义的bean是:
这在两个应用程序中都定义了相同的值。谢谢,它给了我更多的搜索资料。我猜想,在生产代码运行时,有一些东西指向错误的URL、部署或其他方面。我会继续挖。
<bean name="onlineServiceHttp"
class="org.springframework.remoting.httpinvoker.HttpInvokerServiceExporter">
<property name="service" ref="onlineService" />
<property name="serviceInterface" value="my.own.interface.OnlineServiceI" />
</bean>
<bean id="simpleUrlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/onlineServiceHttp">onlineServiceHttp</prop>
</props>
</property>
</bean>
<!-- Online Service using HTTP Invoker -->
<bean id="onlineservice"
class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
<property name="serviceUrl"
value="http://${ONLINE_SERVICES_HOST}:8080/vmosvcs/vmoservice/onlineServiceHttp" />
<property name="serviceInterface" value="my.own.interface.OnlineServiceI" />
</bean>
<bean id="orderMarshallEndpoint" class="my.proxy.endpoints.OrderMarshallEndpoint">
<property name="service" ref="onlineservice" />
</bean>
<bean id="invalidateMarshallEndpoint" class="my.proxy.endpoints.InvalidateMarshallEndpoint">
<property name="service" ref="onlineservice" />
</bean>
<bean id="checkStatusMarshallEndpoint" class="my.proxy.endpoints.CheckStatusMarshallEndpoint">
<property name="service" ref="onlineservice" />
</bean>
CustomAuthenticationManager 16 -----New Request in Proxy -----
CustomAuthenticationManager 17 Request sent by username :peter:
CustomAuthenticationManager 19 Authentication Result:true:
CheckStatusMarshallEndpoint 22 Check Status request received
OnlineEndpoint 52 The authenticated partnerId is :imran
CheckStatusMarshallEndpoint 27 The request is :: serial Number :null: activation Code :[PROTECTED]::imran
CustomSoapFaultMappingExceptionResolver 28 org.springframework.remoting.RemoteInvocationFailureException:
Invocation of method [public abstract RmiDataTransferObject OnlineServiceI.getServed(...,...)]
failed in HTTP invoker remote service at [http://{ONLINE_SERVICE_HOST}:8080/vmosvcs/vmoservice/onlineServiceHttp];
nested exception is java.lang.NoSuchMethodException: com.sun.proxy.$Proxy76.getServed(..., ...)
RmiDataTransferObject resp = service.getServed(getRequest(csr), OnlineServiceI.CHECK_STATUS_SERVICE);