webservice实现了的Provision接口,不明白服务如何接收数据包。
dsmp请求的是个类似下面Url的Url
[url]http://www.url.com:7000[/url]
在服务器上该地址已指向webservice文件
在那里接收,对webservice了解不多。
谢谢!~
基本代码如下:
  using   System;   
  using   System.Collections;   
  using   System.ComponentModel;   
  using   System.Data;   
  using   System.Diagnostics;   
  using   System.Web;   
  using   System.Web.Services;   
  using   System.Web.Services.Protocols;   
  using   System.Xml;   
  using   System.Xml.Serialization;   
  using   System.Web.Services.Description;   
  using   System.IO;   
  using   System.Text;   
    
  namespace   Provision   
  {   
  /**////   <summary>   
  ///   Dsmp   的摘要说明。   
  ///   </summary>   
  ///     
  [XmlRoot(Namespace="http://www.monternet.com/dsmp/schemas/")]   
  public   class   TransactionID   :   SoapHeader   
  {   
  [XmlText(typeof(string))]   
  public   string   ID;   
  }   
    
  public   class   UserID   
  {   
  public   int   UserIDType;   
  public   string   MSISDN;   
  public   string   PseudoCode;   
  }   
    
  public   class   AddressInfo   
  {   
  public   int   DeviceType;   
  public   string   DeviceID;   
  }   
    
  public   class   SyncOrderRelationResp   
  {   
  public   string   Version;   
  public   string   MsgType;   
  public   int   hRet;   
  }   
    
  [WebService(Namespace="http://www.monternet.com/dsmp/schemas/")]   
  [SoapDocumentService(RoutingStyle=SoapServiceRoutingStyle.RequestElement)]   
  public   class   Provision   :   System.Web.Services.WebService   
  {   
  public   Provision()   
  {   
  //CODEGEN:   该调用是   ASP.NET   Web   服务设计器所必需的   
  InitializeComponent();   
  }   
    
    
    
  组件设计器生成的代码#region   组件设计器生成的代码   
    
  //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   

    
  public   TransactionID   transID;   
  public   TextWriter   w;   
    
  /**////   <summary>   
  ///   正向订购服务   
  ///   </summary>   
  ///   <param   name="Version"></param>   
  ///   <param   name="MsgType"></param>   
  ///   <param   name="Send_Address"></param>   
  ///   <param   name="Dest_Address"></param>   
  ///   <param   name="FeeUser_ID"></param>   
  ///   <param   name="DestUser_ID"></param>   
  ///   <param   name="LinkID"></param>   
  ///   <param   name="ActionID"></param>   
  ///   <param   name="ActionReasonID"></param>   
  ///   <param   name="SPID"></param>   
  ///   <param   name="SPServiceID"></param>   
  ///   <param   name="AccessMOde"></param>   
  ///   <param   name="FeatureStr"></param>   
  ///   <param   name="hRet"></param>   
  [WebMethod]   
  [SoapHeader("transID",   Direction=SoapHeaderDirection.InOut)]   
  [SoapDocumentMethod("sim.SyncOrderRelation",RequestElementName="SyncOrderRelationReq",ResponseElementName="SyncOrderRelationResp")]   
  [return:   System.Xml.Serialization.SoapElementAttribute("return")]   
  public   void   SyncOrderRelationReq(   
  ref   string   Version   ,   
  ref   string   MsgType,   
  AddressInfo   Send_Address,   
  AddressInfo   Dest_Address,   
  UserID   FeeUser_ID,   
  UserID   DestUser_ID,   
  string   LinkID,   
  int   ActionID,   
  int   ActionReasonID,   
  string   SPID,   
  string   SPServiceID,   
  int   AccessMOde,   
  byte[]   FeatureStr,   
  out   int   hRet   
  )   
  {   
    
  Version="1.5.0";   
  MsgType   =   "SyncOrderRelationResp";   

  hRet   =   0   
// 下面是业务处理   
  }   
  }
aden 2006-12-22 11:25
用ProvisionClient.exe模拟测试,在本地可以正常接收请求并返回数据包,
在公网上请求正常,返回错误,
下面是返回包:

2006-12-22 11:23:19
返回Resp了:
2006-12-22 11:23:19
HTTP/1.1 405 Method not allowed
Server: Microsoft-IIS/5.0
Date: Fri, 22 Dec 2006 03:23:19 GMT
Allow: OPTIONS, TRACE, GET, HEAD
Content-Length: 3647
Content-Type: text/html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html dir=ltr>

<head>
<style> a:link                        {font:9pt/11pt 宋体; color:FF0000} a:visited                {font:9pt/11pt 宋体; color:#4e4e4e}
</style>

<META NAME="ROBOTS" CONTENT="NOINDEX">

<title>网页无法显示</title>

<META HTTP-EQUIV="Content-Type" Content="text-html; charset=gb2312">
<META NAME="MS.LOCALE" CONTENT="ZH-CN">
</head>

<script>
function Homepage(){
<!--
// in real bits, urls get returned to our script like this:
// res://shdocvw.dll/http_404.htm#[url]http://www.DocURL.com/bar.htm[/url]

        //For testing use DocURL = "res://shdocvw.dll/http_404.htm#[url]https://www.microsoft.com/bar.htm[/url]"
        DocURL=document.URL;

        //this is where the http or https will be, as found by searching for :// but skipping the res://
        protocolIndex=DocURL.indexOf("://",4);

        //this finds the ending slash for the domain server
        serverIndex=DocURL.indexOf("/",protocolIndex + 3);

        //for the href, we need a valid URL to the domain. We search for the # symbol to find the begining
        //of the true URL, and add 1 to skip it - this is the BeginURL value. We use serverIndex as the end marker.
        //urlresult=DocURL.substring(protocolIndex - 4,serverIndex);
        BeginURL=DocURL.indexOf("#",1) + 1;
        urlresult=DocURL.substring(BeginURL,serverIndex);

        //for display, we need to skip after http://, and go to the next slash
        displayresult=DocURL.substring(protocolIndex + 3 ,serverIndex);
        InsertElementAnchor(urlresult, displayresult);
}

function HtmlEncode(text)
{
    return text.replace(/&/g, '&amp').replace(/'/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
}

function TagAttrib(name, value)
{
    return ' '+name+'="'+HtmlEncode(value)+'"';
}

function PrintTag(tagName, needCloseTag, attrib, inner){
    document.write( '<' + tagName + attrib + '>' + HtmlEncode(inner) );
    if (needCloseTag) document.write( '</' + tagName +'>' );
}

function URI(href)
{
    IEVer = window.navigator.appVersion;
    IEVer = IEVer.substr( IEVer.indexOf('MSIE') + 5, 3 );

    return (IEVer.charAt(1)=='.' && IEVer >= '5.5') ?
        encodeURI(href) :
        escape(href).replace(/%3A/g, ':').replace(/%3B/g, ';');
}

function InsertElementAnchor(href, text)
{
    PrintTag('A', true, TagAttrib('HREF', URI(href)), text);
}

//-->
</script>

<body bgcolor="FFFFFF">

<table width="410" cellpadding="3" cellspacing="5">

  <tr>
    <td align="left" valign="middle" width="360">
        <h1 style="COLOR:000000; FONT: 12pt/15pt 宋体"><!--Problem-->网页无法显示</h1>
    </td>
  </tr>

  <tr>
<td width="400" colspan="2"> <font style="COLOR:000000; FONT: 9pt/11pt 宋体">网页地址不正确,因此您要寻找的网页无法显示。</font> </td>
  </tr>

  <tr>
    <td width="400" colspan="2"> <font style="COLOR:000000; FONT: 9pt/11pt 宋体">

        <hr color="#C0C0C0" noshade>

<p>请尝试下列操作:</p>

        <ul>
<li>如果您在“地址”栏中键入了网页地址,请检查地址输入是否正确。<br>
      </li>

<li>打开 <script>
           <!--
           if (!((window.navigator.userAgent.indexOf("MSIE") > 0) && (window.navigator.appVersion.charAt(0) == "2")))
           {
                    Homepage();
           }
           //-->
           </script> 主页,寻找指向所需信息的链接。</li>
    </ul>

<h2 style="COLOR:000000; FONT: 9pt/11pt 宋体">HTTP 405 - 资源被禁止<br> Internet 信息服务</h2>

        <hr color="#C0C0C0" noshade>

        <p>技术信息(支持个人)</p>

<ul>
<li>详细信息:<br><a href="http://www.microsoft.com/ContentRedirect.asp?prd=iis&sbp=&pver=5.0&pid=&ID=405&cat=web&os=&over=&hrd=&Opt1=&Opt2=&Opt3=" target="_blank">Microsoft 支持</a>
</li>
</ul>

    </font></td>
  </tr>

</table>
</body>
</html>

2006-12-22 11:23:19
返回的RESP数据有错误
2006-12-22 11:23:19
MsgType: 
TransactionID: 
Version: 
hRet: 
2006-12-22 11:23:19
连接断开了

Provision,webservice怎么接收dsmp发过来的包?相关推荐

  1. STM32通过串口如何接收服务器发来的数据

    STM32通过串口如何接收服务器发来的数据代码如下: //在stm32f10x_it.c中的代码 void USART1_IRQHandler(void) { u8 GetData;if(USART_ ...

  2. 【客户下单】后台提供webservice服务接收数据

    [客户下单]后台提供webservice服务接收数据 在bos_fore系统中,添加OrderAction封装订单数据. 接下来调用webservice,将数据传递给bos_management系统. ...

  3. ESP32通过蓝牙接收回发数据(有示例代码和步骤)

    目录 1.APP需求 2.蓝牙需要做到的要求 2.1 实际操作过程 2.2 对于蓝牙建立连接,关闭连接.接受数据.发送数据的简单介绍 2.3 示例代码 2.4 蓝牙基础初始化及其他 2.5 蓝牙在串口 ...

  4. vlc-android对于通过Live555接收到音视频数据包后的处理分析

    转载地址:https://blog.csdn.net/c_m_deng/article/details/8487456 通过ndk-gdb跟踪调试vlc-android来分析从连接到RTSP服务器并接 ...

  5. Android调用.net的webservice服务器接收参数为空的情况

    问题描述:安卓开发中,用Android调用.net开发的wenService时候,从Android客户端传递参数到服务器端,服务器端接收为空 解决方法: 1.设置envelope.dotNet = t ...

  6. keil接收别人发的工程打不开_PPT转成PDF发你以后还能转回来编辑吗?

    别人发我的PPT真就一个错字 你有没有遇到过这么一个问题:同学同事给你发来一个制作精美的PDF,可里面愣是就有这么几个错别字,PDF是由PPT转来的,弄的你总是束手无策: 让对方再发一遍转一下麻烦别人 ...

  7. 使用Fiddler调用WebService接口,模拟发HTTP请求

    1.百度一个免费WebService接口 如:天气预报http://www.webxml.com.cn/WebServices/WeatherWebService.asmx 其下有一个方法 2.打开F ...

  8. 使用idea编写代码作为生产者,Kafka接收其发来的信息【小案例】(一)

    对于这个小案例,简单来个图示, 友情补充pom <dependencies><dependency><groupId>org.apache.spark</gr ...

  9. keil接收别人发的工程打不开_STM32工程模板建立之 KEIL 开发平台设置(一)

    根据前面的 KEIL 开发平台知识,根据自己的习惯,建立一个专门属于自己的工程模板.那么为什么要建立模板呢? 1. 你希望每次开发项目的时候都从头开始建立工程吗? 2. 你希望每次将常用的函数都重新编 ...

最新文章

  1. 【 MATLAB 】信号处理工具箱之 dct 简介及案例分析
  2. listview的divider边距
  3. Git常用命令和Git团队使用规范指南
  4. 10年嵌入式工程师经验之谈:对于研发工作的感悟
  5. shell学习笔记--自我总结
  6. 61二叉搜索树的第k个结点
  7. Python 基本数据类型 (二) - 字符串
  8. 联想ghost重装系统_联想怎么安装ghostwin7系统的教程
  9. mysql5.7.10安装_MySQL5.7.10下载及安装及配置-阿里云开发者社区
  10. ptmalloc、tcmalloc与jemalloc内存分配器对比分析
  11. MongoDB查询文档(非常详细,不要错过哦~)
  12. 通过Stratus 服务器在Flash Player中使用RTMFP 开发P2P应用
  13. css标签权重计算知识详解
  14. PySide使用QVariant
  15. 我们,让9300万人办事少跑一趟
  16. java ajax传参问题
  17. pipe 半双工_linux进程间通信之管道(无名管道pipe)实现全双工双向通信
  18. 上海 政府性 常用网站
  19. 【欧拉计划第 3 题】最大质因数 Largest prime factor
  20. TensorFlow.js简介

热门文章

  1. TD-LTE系统测试无线环境比较
  2. java 设计模式之解释器模式(十九)
  3. python-文章相似度计算
  4. Windows 任务计划程序定时执行 powershell 脚本
  5. Kali破解wifi最基础版
  6. vscode ssh连接linux虚拟机在重置虚拟机网络后连接不上的问题(已解决)
  7. 一次排查线上线程池数量过高的报警经历
  8. ISO 3166-1
  9. 碰到个阿里p8,终于知道了别人为什么这么强,算是见识到了基础的天花板
  10. 龙教版微型计算机系统,2017龙教版七年级信息技术教案.doc