关于webservice遇到的一些问题整理

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

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值