Reverse cancellation interface specification - process description
1) SP instead of the user, initiate reverse cancellation requests for MISC UnsubscribeServiceReq
And wait for MISC processing
2) MISC's source address, corporate code, judge whether it is allowed
The SP is reversed in reverse
3) After the access authentication is successful, the user authentication and ordering relationship is performed, and the user is determined.
Whether the state is correct and there is a subscription relationship
4) After the above authentication is successful, MISC sends a subscription relationship synchronous request package to the SP.
SyncorderReLanceReq
5) After the SP receives the synchronous request, the corresponding cancellation process is made to the order request, and return
Synchronize SyncOrderReranceResp
6) After the MISC receives the response, it is determined whether the response value is 0. If the answer value is 0, then
The order relationship is canceled in the MISC, and the SP returns a successful reverse cancellation process.
UnsubscribeServiceResp; if the answer value is not 0, the order relationship is not canceled, the same
Return to SP Back to Unsubscriber UnsubscribeServiceResp
7) SP If the error response from MISC is received, the cancellation failed, and the SP must lose this.
Losing messages are handled, such as recovering the canceled order relationship, and more.
8) If you receive the correct response of your MISC, the sp can not be processed.
11, reverse cancellation interface message definition
• Function Description
This interface is used for the user to cancel the subscribed data service through the SP, and the SP first cancels the user's request to MISC. After the MISC is successfully canceled, the SP cancels the service ordering relationship corresponding to the user.
Message name
Message type
News direction
UnsubscribeServiceReq
REQUEST
SP
àmisc
UnsubscribeServiceResp
Response
MISC
àsp
•
Interface content description
UnsubscribeServiceReq
Message field description
:
Field name
importance
Types of
Description
MSGType
have to
String
Message type
TransactionID
have to
String
This message number (cannot exceed 16 digits)
Version
have to
String
The version number of the interface message, all interface messages
The version is "1.5.0"
Send_address
have to
Address_INFO_SCHEMA
Sender's address
DEST_ADDRESS
have to
Address_INFO_SCHEMA
Receiver's address
Feeuser_id
have to
User_id_schema
Billing user logo
Destuser_id
have to
User_id_schema
Use user ID
When using the user and billing user for the same user,
FeEUser_ID and Destuser_ID are the same.
Service_id
have to
Service_id_schema
Service logo
UNSUBSCRIBESERVICERESP Message Field Description:
Field name
importance
Types of
Description
MSGType
have to
String
Message type
TransactionID
have to
String
This message number
Version
have to
String
The version number of the interface message, all of this interface
The version of interest is "1.5.0"
Hret
have to
Integer
return value. For specific definitions, see "MISC"
System SMS SP Access Guide - Interface Reconstruction Volume
Reverse instance code in reverse.
The following code retains ownership. Please don't reprint it.
<% @ page language = "java" contenttype = "text / html; charSet = GB2312" Import = "java.sql. * "%>
<% @ include file = "../ cos / cos.jsp"%>
<% @ include file = "fun.jsp"%>
<% @ Page Import = "java.util. *"%>
<% @ Page Import = "java.net. *"%>
<% @ Page Import = "java.io. *"%>
<% @ Page Import = "com.aaa.appk. *"%>
<%!
Private string sendreq (String TransactionID, String SP_ID, String Dest_Mobile,
String Fee_Mobile, String Service, String SpNumber, String Send_DeviceId, StringBuffer BF) {
String Sreturn = "Success";
Try
{
//Http://dsmp.gd.monternet.com/dsmp/dsmp.wsdl
// ??? p: //211.136.253.116/dsmp/dsmp.wsdl
String surl = "
http://211.136.253.116/dsmp/dsmp.wsdl ";
SURL = SURL.TRIM ();
URL URL = New URL (SURL);
HttpurlConnection Connection = (httpurlconnection) URL.OpenConnection (); // Establish a connection
Connection.SetRequestMethod ("post");
Connection.SetDoinput (TRUE);
Connection.SetDoOutput (TRUE);
Connection.SetuseCaches (FALSE);
Connection.SetRequestProperty ("Content-Type", "Text / XML; Charset = UTF-8");
PrintWriter out = new printwriter ()); // Prepare output data.
/ / Reverse XML UnsubscribeServiceReq package data is written in StringBuffer.
StringBuffer Xmlstr = new stringbuffer ("
XMLSTR.Append (" XMLSTR.Append ("XMLns: soap-env = /" http://schemas.xmlsoap.org/soap/envelope// ""); Xmlstr.Append ("XMLns: soap-enc = /" http://schemas.xmlsoap.org/soap/encoding// ""); XMLSTR.APpend ("XMLns: XSI = /" http://www.w3.org/2001/xmlschema-instance/ ""); XMLSTR.APpend ("XMLns: XSD = /" http://www.w3.org/2001/xmlschema/ "" "); Xmlstr.Append ("soap-env: encodingstyle = /" http://schemas.xmlsoap.org/soap/ENCoding// ""); Xmlstr.Append ("XMLns = /" Http://www.monternet.com/dsmp/schemas// ">"); XMLSTR.Append (" Xmlstr.Append (" Http://www.monternet.com/dsmp/schemas// "XSI: Type = /" XSD: String / "> 0011" Dest_Mobile " TransactionID>"); Xmlstr.Append (" soap-env: header>"); Xmlstr.Append (" Xmlstr.Append (" Http://www.monternet.com/dsmp/schemas// ">"); XMLSTR.APpend (" Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" send_address>"); Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" dest_address>"); Xmlstr.Append (" XMLSTR.Append (" Xmlstr.Append (" Xmlstr.Append (" feedr_id>"); XMLSTR.APpend (" XMLSTR.Append (" XMLSTR.APpend (" Xmlstr.Append (" Xmlstr.Append (" Destuser_ID>"); Xmlstr.Append (" Xmlstr.Append (" Xmlstr.Append (" XMLSTR.APpend (" XMLSTR.APpend (" Xmlstr.Append (" XMLSTR.APpend (" service_id>"); Xmlstr.Append (" unsubscribeServiceReq>"); Xmlstr.Append (" soap-env: body>"); Xmlstr.Append (" soap-env: envelope>); / / Output data to MISC Out.println (xmlstr.tostring ()); // Save the output data to BF, bf.append ("start"); bf.append (xmlstr.tostring ()); bf.append ("end"); Out.close (); // read the data returned by the connection. UnsbscribeServiceResp? SyncORDERRELATIONREQ? SyncORDERRELATIONRESP? BufferedReader IN = New BufferedReader (New InputStreamReader ())); String line; While ((line = IN.Readline ())! = null) { bf.append ("rstart"); bf.append (line); bf.append ("rend"); } In.Close (); } Catch (Malformedurlexception E) { Sreteurn = "fail"; BF.Append ("WAP Connect SP Error1: E.toString ()); } Catch (IOException E) { Sreteurn = "fail"; BF.Append ("WAP Connect SP Error2:" E.TOString ()); } Return Sreturn; } %> <% String phoneno = getString (Request.getParameter ("Phoneno")); INT app = getint (Request.getParameter ("app")); IF (phoneno == null) phoneno = "" String serviceID = ""; IF (app == 2) { ServiceId = "- otyx"; } else if (app == 1) { ServiceId = "- olby"; } else if (app == 3) { ServiceId = "- otyx"; } else if (app == 6) { ServiceId = "- otyx"; } String res = NULL; String command = getString (Request.GetParameter ("Command")); IF (Command! = Null && Command.equals ("Send") && Phoneno! = null && phoneeno.length ()> 0) { String TransactionId = system.currenttimemillis () ""; String send_deviceid = "10666666"; String feeuser_id = phoneno; String destuser_id = Phoneno; String spservicEid = serviceId; String sp_code = "456789"; Transaction ID = sp_code transactionid.substring (sp_code.length () - (15-TransactionId.Length ()), TransactionId.Length ()); StringBuffer SB = New StringBuffer (""); String restr = sendreq (TransactionID, SP_CODE, DESTUSER_ID, FEEUSER_ID, SPSERVICEID, Send_DeviceId, Send_DeviceID, SB); RES = restr; //out.println ("res :" restr "full:" sb.tostring ()); // You can read, after sending UNSUBSCRIBESERVICEREQ data, the data returned by MISC, } Collection apps = NULL; IF (phoneno.length ()> 0) { Apps = bizutil.list ("Select * from userreg u, account a where u.id = a.id and a.phonenum = '" phoneno ""); } %> hEAD>
Function Send (ID) {//v3.0 Formi.command.value = "send"; Formi.app.value = id; Formi.submit (); } // -> script>