解决调用.net写的webservice 参数变为 null
2016-04-21 11:14
288 查看
这个是修改之后的代码,添加红色部分就好了。其他的代码没动,可以做个参考。
namespace WebServiceExample
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[SoapRpcService(RoutingStyle = SoapServiceRoutingStyle.SoapAction)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService
-------------------------------------- 割 -------------------------------------------------------------------------------
这个是从网上的到的答案(http://www.cnblogs.com/MaxWoods/archive/2008/08/01/1258031.html):
只需要在 WebService的类属性中加入SoapRpcServiceAttribute属性就可以了。
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
现在发现这半下午的时间都浪费了。因为程序是pb9.0调用webservice,所以一直以为是pb的问题。现在看来刚开始的方向就不对。唉!这种问题,打破脑袋也想不出来啊!还好找到问题的原因了。
namespace WebServiceExample
{
/// <summary>
/// Summary description for Service1
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[ToolboxItem(false)]
[SoapRpcService(RoutingStyle = SoapServiceRoutingStyle.SoapAction)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line.
// [System.Web.Script.Services.ScriptService]
public class Service1 : System.Web.Services.WebService
-------------------------------------- 割 -------------------------------------------------------------------------------
这个是从网上的到的答案(http://www.cnblogs.com/MaxWoods/archive/2008/08/01/1258031.html):
只需要在 WebService的类属性中加入SoapRpcServiceAttribute属性就可以了。
[SoapRpcService(RoutingStyle=SoapServiceRoutingStyle.SoapAction)]
现在发现这半下午的时间都浪费了。因为程序是pb9.0调用webservice,所以一直以为是pb的问题。现在看来刚开始的方向就不对。唉!这种问题,打破脑袋也想不出来啊!还好找到问题的原因了。
相关文章推荐
- ios按钮滑动切换
- java 调用系统外部的某个程序
- JSP的真实面目
- 拦截器处理类
- Linux杂项
- java西天取经之路(三)JSP技术学习要点
- javascript必知必会之prototype
- Nginx实战系列之功能篇----后端节点健康检查(转)
- Java输入输出(3) 处理流和节点流
- cogs 362. [CEOI2004]锯木厂选址
- Android项目开发实战之使用Fragment和FragmentTabHost搭建底部菜单(一)
- 使用ZooKeeper实现配置同步
- 三层交换机是否会代替路由器?
- java NIO selector全面深入理解
- swap&& ADL
- ABAP 读取销售订单抬头文本自建函数
- 全面理解line-height与vertical-align
- App架构经验总结
- 检测域名是否存在
- 关于UE4动态资源加载(蓝图类)