1.WebService 意外的元素 (uri:"", local:"arg0")。所需元素为<{}arg0>
解决办法:
在WebService接口及其实现类的方法名处,加上@WebParam(name = "",targetNamespace="")
例:
public String test( @WebParam(name = "req",targetNamespace="http://test.com/")String req);
public String test(@WebParam(name = "req",targetNamespace="http://test.com/")String req){
System.out.println(req);
return "测试通过";
}
原文链接:https://blog.csdn.net/Oa_aV/article/details/79457814
2.使用CXF发布的WebService报错:org.apache.cxf.interceptor.Fault: The given SOAPAction does not match an operation
场景:JAVA语言使用CXF搭建WebService发布报错
错误信息:org.apache.cxf.interceptor.Fault: The given SOAPAction does not match an operation
原因:经查询是因为soapAction缺少值造成的
如果不是cxf编写的客户端调用则会产生这个问题,cxf客户端不会出现该问题,可能是其他客户端需要用这个属性来查找对应的操作解决:使用@WebMethod()
重新编译部署后
原文链接:https://www.cnblogs.com/goldenVip/p/7411264.html
3.java调用WebService服务的几种方法
原文链接:https://blog.csdn.net/qq_31183297/article/details/79522746