当前位置: 代码迷 >> Web Service >> 调用电信ISAG返回【SVC0905】【soapHeader Error】异常
  详细解决方案

调用电信ISAG返回【SVC0905】【soapHeader Error】异常

热度:587   发布时间:2012-09-01 09:33:03.0
调用电信ISAG返回【SVC0905】【soapHeader Error】错误
我试了一天了,参数没有错啊,为什么调用发送方法就返回异常了呢??希望有做过的朋友帮个忙,提点提点我,拜托各位大哥了!!!

代码如下:
  SendSmsService SmsService = new SendSmsService();

  //消息头
  RequestSOAPHeader header = new RequestSOAPHeader();

  header.spId = spId;
  header.timeStamp = "04011025";
  header.spPassword = spPwd;
  header.productId = "114000000000000011195";
  header.OA = "";
  header.FA = "";
  SmsService.RequestSOAPHeaderValue = header;

  //目标服务器地址
  SmsService.Url = "http://222.77.183.102:5080/isag/North/SMS/SendSms";
   
  //消息内容
  sendSms SmsInfo = new sendSms();
  SmsInfo.addresses = new string[] { "tel:+8613859098178" };
  SmsInfo.message = "测试短信0123456789ABCDEFGabcdefg";
  SmsInfo.senderName = "10659447";

  ChargingInformation charging = new ChargingInformation();
  charging.description = "费用描述";
  charging.currency = "货币";
  charging.amountSpecified = true;
  charging.amount = 0;
  charging.code = "code";

  SmsInfo.charging = charging;

  string strErrorMessage = "OK";

  try
  {
  sendSmsResponse smsResponse = SmsService.sendSms(SmsInfo);
  }

------解决方案--------------------
参考
------解决方案--------------------
既然说是soapheader的问题,看看文档示例上soapheader是不是少赋什么值了?
  相关解决方案