今天帮同事处理问题 ,web service调用SAP里的东东,基于axis 上的web service,web 服务器为weblogic ,以前没整过在axis上的 web service ,都是用我们公司的中间产品 或xfire框架 ,借此也熟悉下流行的axis 。记录下遇到的问题,以便后查。
1、异常报错java.lang.ClassCastException: weblogic.webservice.core.rpc.ServiceFactoryImpl
at javax.xml.rpc.ServiceFactory.newInstance(ServiceFactory.java:63)
at services.FinancingUpdatelogService.sentFinacingUpdatelog(FinancingUpdatelogService.java:52)
一开始很纳闷,类型转换错误,但不知道weblogic.webservice.core.rpc.ServiceFactoryImpl 从何而来,看了下原代码(具体见jaxrpc.jar 下ServiceFactory),查找服务实现类的方式: