这里是调用webService的方法,项目用的SpringMVC,这个是service实现:
public PersonSellerDTO selectPersonByAreaCode(String areaCode){ BaseWebService baseWebService = new BaseWebService(VmcnoService.class); PersonSellerDTO personSellerDTO = null; VmcnoService vmcnoService=null; try { vmcnoService =(VmcnoService)baseWebService.getService(VmcnoService.class,Constant.WEB_SERVICE_URL); System.out.println(areaCode); //方法执行下面这句就报错了! personSellerDTO = vmcnoService.selectPersonByAreaCode(areaCode); } } catch (Exception e) { logger.info(e); e.printStackTrace(); } return personSellerDTO; }webService的地址是:
public static final String WEB_SERVICE_URL="http://171.11.245.24/webService/service/VmcnoService";webService实现:
/** * @Title:selectPersonByAreaCode * @Description:根据官网传过来的areaCode 查询经销商信息 * @param areaCode * @return * @throws Exception * @author ds * @date 2014-9-13 */ public PersonSellerDTO selectPersonByAreaCode(String areaCode) throws Exception{ //这里调用DAO去数据库查询数据 PersonSellerDTO personSellerDTO = this.serialActivationDao.selectPersonByAreaCode(areaCode); return personSellerDTO; }webService用的是struts2+Spring+mybatis
2014-10-07 16:30:12 [org.codehaus.xfire.handler.DefaultFaultHandler]-[INFO] Fault occurred! org.codehaus.xfire.fault.XFireFault: Invalid operation: {http://webService.vmcno.veeker.com}selectPersonByAreaCode at org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBinding.java:42) at org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.java:42) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:64) at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38) at org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireServletController.java:304) at org.codehaus.xfire.transport.http.XFireServletController.doService(XFireServletController.java:129) at org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:183) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)webService配置没错,另外一个项目就可以访问到。
2个项目都在WebLogic+linux上运行
求大神解答
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。