--0在配置文件中开启ws的参数
<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">
<property name="baseAddress" value="http://localhost:9999/" />
</bean>
---1.一个类既是本地的service也是webservice
@Service
@WebService(serviceName = "CBAJService")//公开成为WS
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public class CBAJService {
public String delete(String arg){
System.out.println("del .."+arg);
return "YYY";
}
}
--2.系统的拦截面
public class AppAspect {
@AfterReturning(pointcut="execution(* com.xxx.service..*(..))", returning="rtnVal")
public void doAfter1(JoinPoint jp,Object rtnVal) {
System.out.println("---doAfter--rtn1 is---"+rtnVal);
}
@AfterThrowing(pointcut="execution(* com.xx.service..*(..))", throwing="ex")
public void doThrowing1(JoinPoint jp, Throwable ex) {
System.out.println("---doThrowing1--"+ex.getMessage());
ex.printStackTrace();
}
}
问题在于当开启表达式拦截到这个类的时候,本地的service调用成功,而访问http://localhost:9999/CBAJService?wsdl 不成功;
去掉pointcut表达式的之后,访问wsdl就成功了,不知道什么原因.
spring 2.5 annotation 配置 jax-ws方式的ws,aop拦截出现问题
最新推荐文章于 2021-10-11 16:40:51 发布