Axis2 SOAPAction: "urn:anonOutInOp" 问题的解决方法
2017-07-21 17:35
120 查看
Axis2 在调用WebService 当 options.setAction() 方法的入参为
“” 或不设置时,Axis2 默认会在HTTP 头部分的 SOAPAction 中 "urn:anonOutInOp“。在一些对SOAPaction没有要求的WebService服务中没有问题,但遇到对SOAPaction要求严格的WebService中就是一个严重的问题了。
解决方法:
import org.apache.axis2.Constants;
if (SOAPaction == null || "".endsWith(SOAPaction)) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(Constants.Configuration.DISABLE_SOAP_ACTION, true);
options.setProperties(properties);
}
options.setAction(SOAPaction);
“” 或不设置时,Axis2 默认会在HTTP 头部分的 SOAPAction 中 "urn:anonOutInOp“。在一些对SOAPaction没有要求的WebService服务中没有问题,但遇到对SOAPaction要求严格的WebService中就是一个严重的问题了。
解决方法:
import org.apache.axis2.Constants;
if (SOAPaction == null || "".endsWith(SOAPaction)) {
Map<String, Object> properties = new HashMap<String, Object>();
properties.put(Constants.Configuration.DISABLE_SOAP_ACTION, true);
options.setProperties(properties);
}
options.setAction(SOAPaction);
相关文章推荐
- CXX0017:Error:symbol "xxx" not found 问题解决方法
- "ora-00988 缺少或无效口令"问题的解决方法
- "注册表启动项加载程序"问题的解决方法
- 在数据库"WSEDSQLDB"中检测到一个可能的数据库一致性问题。|解决方法
- 重装SQL Server 2005遇到的" 计数器错误 "问题及解决方法两则
- "ASP.NET Development Server无法开始侦听端口:XXXX"问题的解决方法
- 自己遇到的"Microsoft Management Console遇到问题需要关闭,我们对此引起的不便表示抱歉……"问题的解决方法
- Visual Studio2005-"由于应用程序的配置不正确,应用程序未能启动,重新安装 "的问题解决方法
- "JVM terminated. Exit code=-1"问题的解决方法
- "... 无法下载Silverlight应用程序。请查看Web服务器设置." 问题的解决方法
- 访问 IIS 元数据库失败的问题("解决方法")
- 打开页面时出现"Automation 服务器不能创建对象"问题的解决方法
- 共享一文件夹提示"服务器存储空间不足,无法处理此命令"的问题解决方法
- [Trouble Shoot]hibernate中的Failed to load class "org.slf4j.impl.StaticLoggerBinder"问题的解决方法
- You cannot run the non-logged version of bulk copy in this database. Please check with the DBO. 问题的解决方法
- asp.net ajax 错误:"sys"未定义问题 解决的方法
- "ASP.NET Development Server无法开始侦听端口:XXXX"问题的解决方法
- "Java , Installanywhere 在 Redhat 上的中文问题解决方法 "
- 关于无法显示该网页,弹出对话框显示"Internet Explorer无法打开Internet站点xxx,已终止操作"问题的解决方法
- "服务器存储空间不足,无法处理此命令"问题解决方法