"http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
来源:互联网 发布:淘宝自己做衣服卖 编辑:程序博客网 时间:2024/05/17 16:46
org.apache.cxf.binding.soap.SoapFault: "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP version.
今天对端调服务端报上面错误,
对端调用代码:
JaxWsProxyFactoryBean factory =new JaxWsProxyFactoryBean();
// 添加访问接口类
factory.setServiceClass(CompensationService.class);
// 添加访问接口wsdl
factory.setAddress("http://10.9.111.11:80/china/services/getCompensationInfoService?wsdl");
// 创建访问借接口
CompensationService client = (CompensationService)factory.create();
// 连接参数设定
Client proxy = ClientProxy.getClient(client);
HTTPConduit conduit = (HTTPConduit) proxy.getConduit();
HTTPClientPolicy policy = new HTTPClientPolicy();
// 连接超时时间
policy.setConnectionTimeout(10000);
// 请求超时时间
policy.setReceiveTimeout(10000);
conduit.setClient(policy);
//调用接口,返回信息
List<CompensationOutputParam> outputParam = client.updateCompensationInfo(inputParam);
修改setAddress("http://10.9.111.11:80/china/services/getCompensationInfoService?wsdl");中地址中?wsdl去掉测试后我这测试可以,对端说去掉?wsdl后不能访问,修改又增加?wsdl后访问恢复!!!问题很奇怪,后来我看了看网上可以用下面调用方式
// 修改成以下方式初始化
URL url = new URL("http://10.9.111.11:80/china/services/getCompensationInfoService?wsdl");
CompensationService client =new CompensationServiceImpl(url).getCompensationServiceImplPort();
我测试结果不理想,返回响应速度不行,不建议使用!
希望对你有帮助,祝你有一个好心情,加油!
若有错误、不全、可优化的点,欢迎纠正与补充!
- "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
- "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
- [WebService] the namespace on the "definitions" element, is not a valid SOAP version
- CXF异常 No DestinationFactory was found for the namespace http://schemas.xmlsoap.org
- faultCode=INVALID_WSDL: Expected element ‘{http://schemas.xmlsoap.org/wsdl/} WSDLExceptionfaultCode=
- WebService发布与调用问题:expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/wsdl/}def
- {http://schemas.xmlsoap.org/soap/envelope/}Server.userException 错误解决
- AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
- There is not a header with name ServiceContext and namespace http://schemas.microsoft.com/sharepoint/servicecontext in the messa
- 处理:The selection is not within a valid module.
- 解决The selection is not within a valid module
- 解决The selection is not within a valid module
- 解决The selection is not within a valid module
- The selection is not within a valid module异常
- 解决The selection is not within a valid module
- '{DependencyProperty.UnsetValue}' is not a valid value for the '.........Background'
- Warning the selected directory is not a valid tomcat home
- INS-35354] The system on which you are attempting to install Oracle RAC is not part of a valid clust
- MyBatis学习
- "红砖"JS高程笔记P2
- Unity3d Attribute 总结
- <<,>>,>>>总结
- 45. Jump Game II(跳跃游戏II)
- "http://schemas.xmlsoap.org/wsdl/", the namespace on the "definitions" element, is not a valid SOAP
- 网易2018年校园招聘编程题真题(魔法币&&相反数&&字符串碎片&&重排数列)
- Linux和开源的福祸之年
- "红砖"JS高程笔记P3
- juicer高效、轻量的前端 (Javascript) 模板引擎的应用与 js-json格式转换为数组
- Spring validate 自定义枚举类型验证
- git设置用户名密码
- TensorFlow学习之CNN-Cifar10代码阅读与详解(一):cifar10数据批量读取
- surfaceFlinger bufferQueue