`
逆风的香1314
  • 浏览: 1388198 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

移动MISC1.6平台Provision同步接口开发(Tomcat5.5 + AXIS1.2)

阅读更多

 

http://blog.chinaunix.net/u/8202/showart.php?id=34553首页 | 文章 | 相册 | 收藏夹 | 留言

 
移动MISC1.6平台Provision同步接口开发(Tomcat5.5 + AXIS1.2)

移动MISC1.6平台Provision同步接口开发(Tomcat5.5 + AXIS1.2)

 

----------------------------------------------------------------

/**

 *   版权:  雪夜清风 [ Jeansan]   所有 ;

 *

 *   MSN: qingfeng0826@hotmail.com

 *   QQ  : 331999816

 *

 *  */

----------------------------------------------------------------

 

 

说明 : 系统采用AXIS 1.2+Tomcat 5.5,如果无axis知识,建议可以到IBM开发者上搜索相关 AXIS 文档浏览

 

—————————————————————————————————————

 

1、    配置好AXIS 1.2

2、    wsdl 文件 copy   TOMCAT_HOMEwebappsaxisWEB-INF

 

 

 

Wsdl 文件由于MISC提供的不能生成 header ;经过修改以后的新的WSDL文件为:

 

 

 

<definitions xmlns:ws="http://www.monternet.com/dsmp/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.ort/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:dsmp="http://www.monternet.com/dsmp/schemas/" targetNamespace="http://www.monternet.com/dsmp/wsdl/">
 <types>
  <schema targetNamespace="http://www.monternet.com/dsmp/schemas/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified">
   <complexType name="address_info_schema">
    <sequence>
     <element name="DeviceType" type="xsd:integer"/>
     <element name="DeviceID" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="user_id_schema">
    <sequence>
     <element name="UserIDType" type="xsd:integer"/>
     <element name="MSISDN" type="xsd:string"/>
     <element name="PseudoCode" type="xsd:base64Binary"/>
    </sequence>
   </complexType>
   <complexType name="service_id_schema">
    <sequence>
     <element name="ServiceIDType" type="integer"/>
     <element name="SPID" type="string"/>
     <element name="SPServiceID" type="string"/>
     <element name="AccessNo" type="string"/>
     <element name="FeatureStr" type="base64Binary"/>
    </sequence>
   </complexType>
   <!-- request & response -->
   <element name="TransactionID" type="xsd:string"/>
   <element name="SyncOrderRelationReq" type="dsmp:SyncOrderRelationReqType"/>
   <complexType name="SyncOrderRelationReqType">
    <sequence>
     <element name="MsgType" type="xsd:string"/>
     <element name="Version" type="xsd:string"/>
     <element name="Send_Address" type="dsmp:address_info_schema"/>
     <element name="Dest_Address" type="dsmp:address_info_schema"/>
     <element name="FeeUser_ID" type="dsmp:user_id_schema"/>
     <element name="DestUser_ID" type="dsmp:user_id_schema"/>
     <element name="LinkID" type="xsd:string" minOccurs="0"/>
     <element name="ActionID" type="xsd:integer"/>
     <element name="ActionReasonID" type="xsd:integer"/>
     <element name="SPID" type="xsd:string" minOccurs="0"/>
     <element name="SPServiceID" type="xsd:string"/>
     <element name="AccessMode" type="xsd:integer" minOccurs="0"/>
     <element name="FeatureStr" type="xsd:base64Binary" minOccurs="0"/>
    </sequence>
   </complexType>
   <element name="SyncOrderRelationResp" type="dsmp:SyncOrderRelationRespType"/>
   <complexType name="SyncOrderRelationRespType">
    <sequence>
     <element name="MsgType" type="xsd:string"/>
     <element name="Version" type="xsd:string"/>
     <element name="hRet" type="xsd:integer"/>
    </sequence>
   </complexType>
   <element name="SubscribeServiceReq" type="dsmp:SubscribeServiceReqType"/>
   <complexType name="SubscribeServiceReqType">
    <sequence>
     <element name="Version" type="string"/>
     <element name="MsgType" type="string"/>
     <element name="Send_Address" type="dsmp:address_info_schema"/>
     <element name="Dest_Address" type="dsmp:address_info_schema"/>
     <element name="FeeUser_ID" type="dsmp:user_id_schema"/>
     <element name="DestUser_ID" type="dsmp:user_id_schema"/>
     <element name="Service_ID" type="dsmp:service_id_schema"/>
     <element name="FeatureStr" type="base64Binary" minOccurs="0"/>
    </sequence>
   </complexType>
   <element name="SubscribeServiceResp" type="dsmp:SubscribeServiceRespType"/>
   <complexType name="SubscribeServiceRespType">
    <sequence>
     <element name="Version" type="string"/>
     <element name="MsgType" type="string"/>
     <element name="hRet" type="integer"/>
     <element name="LinkID" type="string" minOccurs="0"/>
    </sequence>
   </complexType>
   <element name="UnSubscribeServiceReq" type="dsmp:UnSubscribeServiceReqType"/>
   <complexType name="UnSubscribeServiceReqType">
    <sequence>
     <element name="Version" type="string"/>
     <element name="MsgType" type="string"/>
     <element name="Send_Address" type="dsmp:address_info_schema"/>
     <element name="Dest_Address" type="dsmp:address_info_schema"/>
     <element name="FeeUser_ID" type="dsmp:user_id_schema"/>
     <element name="DestUser_ID" type="dsmp:user_id_schema"/>
     <element name="Service_ID" type="dsmp:service_id_schema"/>
    </sequence>
   </complexType>
   <element name="UnSubscribeServiceResp" type="dsmp:UnSubscribeServiceRespType"/>
   <complexType name="UnSubscribeServiceRespType">
    <sequence>
     <element name="Version" type="string"/>
     <element name="MsgType" type="string"/>
     <element name="hRet" type="integer"/>
    </sequence>
   </complexType>
  </schema>
 </types>
 <message name="ma.SyncOrderRelationReq">
  <part name="SyncOrderRelationInput" element="dsmp:SyncOrderRelationReq"/>
  <part name="TransactionIDInput" element="dsmp:TransactionID"/>
 </message>
 <message name="ma.SyncOrderRelationResp">
  <part name="SyncOrderRelationOutput" element="dsmp:SyncOrderRelationResp"/>
  <part name="TransactionIDOut" element="dsmp:TransactionID"/>
 </message>
 <message name="ma.SubscribeServiceReq">
  <part name="SubscribeServiceInput" element="dsmp:SubscribeServiceReq"/>
  <part name="TransactionIDInput" element="dsmp:TransactionID"/>
 </message>
 <message name="ma.SubscribeServiceResp">
  <part name="SubscribeServiceOutput" element="dsmp:SubscribeServiceResp"/>
  <part name="TransactionIDOut" element="dsmp:TransactionID"/>
 </message>
 <message name="ma.UnSubscribeServiceReq">
  <part name="UnSubscribeServiceInput" element="dsmp:UnSubscribeServiceReq"/>
  <part name="TransactionIDInput" element="dsmp:TransactionID"/>
 </message>
 <message name="ma.UnSubscribeServiceResp">
  <part name="UnSubscribeServiceOutput" element="dsmp:UnSubscribeServiceResp"/>
  <part name="TransactionIDOut" element="dsmp:TransactionID"/>
 </message>
 <portType name="maPort">
  <operation name="SyncOrderRelation">
   <input message="ws:ma.SyncOrderRelationReq"/>
   <output message="ws:ma.SyncOrderRelationResp"/>
  </operation>
  <operation name="SubscribeService">
   <input message="ws:ma.SubscribeServiceReq"/>
   <output message="ws:ma.SubscribeServiceResp"/>
  </operation>
  <operation name="UnSubscribeService">
   <input message="ws:ma.UnSubscribeServiceReq"/>
   <output message="ws:ma.UnSubscribeServiceResp"/>
  </operation>
 </portType>
 <binding name="maPortBinding" type="ws:maPort">
  <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="SubscribeService">
   <soap:operation soapAction="sim.SubscribeService" style="document"/>
   <input>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.SubscribeServiceReq" part="TransactionIDInput" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </input>
   <output>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.SubscribeServiceResp" part="TransactionIDOut" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </output>
  </operation>
  <operation name="SyncOrderRelation">
   <soap:operation soapAction="sim.SyncOrderRelation" style="document"/>
   <input>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.SyncOrderRelationReq" part="TransactionIDInput" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </input>
   <output>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.SyncOrderRelationResp" part="TransactionIDOut" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </output>
  </operation>
  <operation name="UnSubscribeService">
   <soap:operation soapAction="sim.UnSubscribeService" style="document"/>
   <input>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.UnSubscribeServiceReq" part="TransactionIDInput" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </input>
   <output>
    <soap:body use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
    <soap:header message="ws:ma.UnSubscribeServiceResp" part="TransactionIDOut" use="literal" encodingStyle="http://schemas.xmlsoap.org/soap/encoding" namespace="http://10.1.2.122/misc/dsmp.xsd"/>
   </output>
  </operation>
 </binding>
 <service name="dsmp">
  <port name="maPort" binding="ws:maPortBinding">
   <soap:address location="http://localhost:8080/axis/services/maPort"/>
  </port>
 </service>
</definitions>

 

 

 

 

 

 

3、    生成客户端,服务端代码:
使用命令:Java -Djava.ext.dirs=lib org.apache.axis.wsdl.WSDL2Java --server-side --skeletonDeploy true dsmp.wsdl

4、    deploy.wsdd              用来发布service
MaPortBindingImpl.java   
服务短编程使用
MaPortBindingStub.java   
客户端编程使用

5、    建立服务:

使用命令 java org.apache.axis.utils.Admin client|server deploy.wsdd

 

 

 

 

 

 

建立服务端和客户端的服务。

如果建立服务不成功,可以直接将commonternetwwwdsmpwsdl下的deploy.wsdd中的<service>...</service>之间的文字直接拷贝到server-config.wsdd文件中。

查看服务,如果没有发布成功是因为没有生成相关的class文件,可以先编译MaPortBindingSkeleton.java文件,然后查看是否发布。

 

 

 

6、    编写测试代码:

 

 

 

package com.misc.client;

import java.math.BigInteger;

import java.net.URL;

import javax.xml.rpc.holders.StringHolder;

import com.monternet.www.dsmp.schemas.Address_info_schema;

import com.monternet.www.dsmp.schemas.SyncOrderRelationReqType;

import com.monternet.www.dsmp.schemas.SyncOrderRelationRespType;

import com.monternet.www.dsmp.schemas.User_id_schema;

import com.monternet.www.dsmp.schemas.holders.SyncOrderRelationRespTypeHolder;

import com.monternet.www.dsmp.wsdl.MaPortBindingStub;

//import com.monternet.www.dsmp.*;
/*

 * 移动MISC系统升级,SP客户端测试环境

 */

public class miscClient {
 
    private static BigInteger msg;

    public static void main(String[] args) {

        MaPortBindingStub binding = null;

        SyncOrderRelationRespType resp = null;

        SyncOrderRelationReqType req=new SyncOrderRelationReqType();

        SyncOrderRelationRespTypeHolder syncOrderRelationOutput = new SyncOrderRelationRespTypeHolder();

        StringHolder transactionIDOut = new StringHolder();      

        /**

         *

         *   TransactionID 由返回的provision包里面的对应字段来决定,然后放到响应包里面的对应字段

         *   TransactionID不是sp生成的

         *

         */      

        // 根据 -  数据业务管理平台接口规范-1.5.1 定义。可以参考schemas 下的类文件      

        BigInteger devicetypeSend_Address = BigInteger.valueOf(201);

        BigInteger devicetypeDest_Address = BigInteger.valueOf(0);

        BigInteger UserIDTypeFeeUser_ID = BigInteger.valueOf(1);

        BigInteger ActionID = BigInteger.valueOf(1);

        BigInteger ActionReasonID = BigInteger.valueOf(1);

        BigInteger AccessMode = BigInteger.valueOf(3);
      
        byte[] pseudoCode = new byte[]{};

       

        // 对于一些固定的值来决定

        Address_info_schema Send_Address = new Address_info_schema();

        Send_Address.setDeviceID("misc");

        Send_Address.setDeviceType(devicetypeSend_Address);
 

        Address_info_schema Dest_Address = new Address_info_schema();

        Dest_Address.setDeviceID("1212");

        Dest_Address.setDeviceType(devicetypeDest_Address);


        User_id_schema FeeUser_ID = new User_id_schema();

        FeeUser_ID.setMSISDN("13583153328");

        FeeUser_ID.setUserIDType(UserIDTypeFeeUser_ID);
        FeeUser_ID.setPseudoCode(pseudoCode);

 

        User_id_schema DestUser_ID = new User_id_schema();

        DestUser_ID.setMSISDN("13583153328");

        DestUser_ID.setUserIDType(UserIDTypeFeeUser_ID);
        DestUser_ID.setPseudoCode(pseudoCode);

        /**

         *  给请求赋值

         */

        req.setMsgType("SubscribeServiceReq");     

        req.setVersion("1.5.0");

        req.setSend_Address(Send_Address);

        req.setDest_Address(Dest_Address);

        req.setFeeUser_ID(FeeUser_ID);

        req.setDestUser_ID(DestUser_ID);

        req.setLinkID("");   // 可选

        req.setActionID(ActionID);

        req.setActionReasonID(ActionReasonID);

        req.setSPID("082601");

        req.setSPServiceID("dz");

分享到:
评论

相关推荐

    MISC相关文档MISC1.6 SP订购通知接口要求.pdf

    MISC相关文档MISC1.6 SP订购通知接口要求.pdf MISC相关文档MISC1.6 SP订购通知接口要求.pdf MISC相关文档MISC1.6 SP订购通知接口要求.pdf MISC相关文档MISC1.6 SP订购通知接口要求.pdf MISC相关文档MISC1.6 SP订购...

    misc1.6的provision测试工具

    misc1.6的provision测试工具

    MISC1.6 SP订购通知接口源代码

    MISC1.6 SP订购通知接口源代码 provision接口

    MISC1.6 SP 订购通知接口要求

    MISC1.6 SP 订购通知接口要求 MISC 平台与SP 之间的接口,MISC 平台通过该接口进行订购关系同步和在用户自助服 务时设置于订购服务相关的属性。

    移动正向测试工具Provision

    移动短信MISC1.6Provision订购关系同步接口测试程序。

    模拟网关——风起水流

    SMGP3.0、SMPP3.3、SMPP3.4、SMPP5.0、Misc1.6、Provision、SMAIS2、 EMPP2.0、EMPPv2、CIMD2、SEMA、UCP等等短信网关协议, 采用WinSock开发,没有用到任何API;  支持 Mis1.6订制同步接口、反向取消接口、...

    Wap接口程序provision

    中国移动MISC 1.6 Provision Java API 直接使用HttpServer的方式实现,不需要任何其它API,不需要Apache,IIS,Tomcat等Web服务器,直接实现底层. 运行环境 Windows/Linux JDK 1.4.2 产品完全免费,可自由转载,但请注明...

    MISC SP 业务反向取消接口

    MISC SP 业务反向取消接口 pdf格式

    MISC WAP业务应用程序接口规范(V1.6)

    定义了中国移动移动信息业务中心Mobile Information Service Center(以下简称为MISC)平台V1.5版本与WAP业务SP之间的应用程序接口,目的是为SP开发可接入MISC平台的WAP业务提供指导规范。 本文档并不用于指导SP如何...

    中国移动MISC平台

     MISC系统是中国移动“移动梦网”计划中的技术支撑平台、业务资源调度平台,系统采用先进的技术和高扩展性的系统架构,建立一个有中国特色的全网统一的移动数据服务平台,提供全方位信息服务和商务服务的管理,是SP...

    移动MISC provision wsdl

    dsmp.wsdl maport 懂得人需要的东西

    MISC WAP业务应用程序接口规范V1.6

    文档描述的是移动misc系统 wap 业务接口规范

    中国移动和中国联通Provision模拟器.zip

    Provision模拟器主要是模拟使用中国移动Provision协议的MISC网关。此类型网关使用基于SOAP协议的通讯模式

    sp接入指南的详细资料

    MISC1.6 SP订购通知接口要求 pdf MISC16系统SP接入指南-SP doc 移动数据业务管理平台-SSO平台SP接入解决方案v1.7.0(4SP doc provision_api: DSMP_ProvisionAPI_win-20040225 DSMP_Provision_API_LINUX_20040303 ...

    手机短信平台软件开发

    中国移动:(MISC 1.6)、(CMPP2.0) (CMPP3.0) 中国电信: (SMGP 1.3) (SMGP 3.0) 电信ISAG/ISMP 中国联通: SGIP1.2.CNGP 2.0(网通小灵通) 国际标准: SMPP 二、短信管理平台部分 2.1业务管理:针对短信业务的管理,...

    短信模拟网关

    本工具包包含中国移动、中国联通、中国电信、中国网通及短信中心短信网关模拟器及用于测试用途的手机终端模拟器,另外增加了符合MISC 1.6规范中国移动Provision接口.

    provision模拟器

    模拟移动provision接口,方便SP端代码的开发,可用于短信、彩信移动MISC接口的开发

    MISC基础知识介绍

    MISC1.6作为唯一一个完全符合中国移动集团公司DSMP数据业务管理规范的产品,它能够支撑多种数据业务模式,包括wap、sms、pda、kjava、mPic等,完成代理访问、用户及定购关系鉴全批价、SP定购关系同步、SSO网站登录等...

    DSMP MISC 移动网关定制 SP反向业务定制

    DSMP MISC 移动网关定制 SP反向业务定制

Global site tag (gtag.js) - Google Analytics