开发者社区> 问答> 正文

x-fire调用webservice的问题:报错

这里是调用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配置没错,另外一个项目就可以访问到。
 还有调用webService的项目在外部机房,而webService在我们自己的机房!

2个项目都在WebLogic+linux上运行

 求大神解答

展开
收起
kun坤 2020-06-20 13:43:23 37923 0
1 条回答
写回答
取消 提交回答
  • 今天都没上班么?没人啊

    2020-06-20 13:43:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载