当前位置:编程学习 > C#/ASP.NET >>

通过http协议向服务器发送soap请求,webservice返回客户端XML格式的数据不成功

using  System; 
using  System.Collections; 
using  System.ComponentModel; 
using  System.Data; 
using  System.Diagnostics; 
using  System.Web; 
using  System.Web.Services; 

namespace  webserver 

///  <summary> 
///  Service1  的摘要说明。 
///  </summary> 
public  class  Service1  :  System.Web.Services.WebService 

public  Service1() 

//CODEGEN:该调用是  ASP.NET  Web  服务设计器所必需的 
InitializeComponent(); 


#region  Component  Designer  generated  code 

//Web  服务设计器所必需的 
private  IContainer  components  =  null; 

///  <summary> 
///  设计器支持所需的方法  -  不要使用代码编辑器修改 
///  此方法的内容。 
///  </summary> 
private  void  InitializeComponent() 



///  <summary> 
///  清理所有正在使用的资源。 
///  </summary> 
protected  override  void  Dispose(  bool  disposing  ) 

if(disposing  &&  components  !=  null) 

components.Dispose(); 

base.Dispose(disposing); 


#endregion 

//  WEB  服务示例 
//  HelloWorld()  示例服务返回字符串  Hello  World 
//  若要生成,请取消注释下列行,然后保存并生成项目 
//  若要测试此  Web  服务,请按  F5  键 

// [WebMethod] 
// public  string  HelloWorld() 
// { 
// return  "Hello  World"; 
// } 



找不到错误啊 --------------------编程问答-------------------- 那你得到什么错呢? --------------------编程问答-------------------- 代码看上去没有问题啊,你看看是不是wcf服务配置有问题导致不能返回数据 --------------------编程问答-------------------- 准确详细的描述一下问题。

找不到错误啊

webservice也可以断点进行调试。

先确认一下是否正确调用方法了
补充:.NET技术 ,  Web Services
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,