Mobile MISC interface 1.6 program [Java]

xiaoxiao2021-04-04  268

Java processing source code

Package com.xzm.wapplatform;

Import java.io.ioException;

Import java.io.printwriter;

Import javax.servlet.servletException;

Import javax.servlet.servletinputStream;

Import javax.servlet.http.httpservlet;

Import javax.servlet.http.httpservletRequest;

Import javax.servlet.http.httpservletResponse;

Import javax.xml.parsers. *;

Import org.w3c.dom.document;

Public class provisioncmcc extends httpservlet {

Public void dopost

HTTPSERVLETREQUEST REQUEST,

Httpservletresponse response

Throws servletexception, ioException {

System.out.println ("provisioncmcc:" new java.util.date ());

ServletInputStream in;

Printwriter out;

String TransactionID = "";

// IN = Request.getinputStream ();

//System.out.println ("in.available = " in.available ());

// Byte [] Temp = new byte [in.available ()];

//in.read (tMP);

// string straTemp = new string (temp);

//System.out.println ("ProvisionCmcc body = " strTemp);

/ * int b = 0;

While ((b = in.read ())! = - 1) {

System.out.println (CHAR) B);

}

OUT = response.getwriter ();

Out.println ("");

Out.println ("");

Out.println (" provision_response ");

Out.println (");

Out.println (" 0 ");

Out.println (" surcessful );

Out.println ("");

Out.println ("");

Out.close (); * /

Try {

IN = Request.getInputStream ();

String DeviceType_send = ""

String DeviceType_DEST = "" "" "" "" ""

String deviceid_dest = ""

String useridtype_fee = ""

String useridtype_dest = ""

String isdn_fee = ""

String isdn_dest = "";

String pseudocode_fee = "";

String pseudocode_dest = "";

String linkid = "";

String actionID = "";

String ActionReasonID = ""

String SPID = "";

String spservicEid = ""

String AccessMode = "";

String featureStr = "";

DocumentBuilderFactory Factory =

DocumentBuilderFactory.newInstance ();

DocumentBuilder Builder = Factory.NewDocumentBuilder ();

Document Document = Builder.Parse (in);

// TransactionID

IF (Document.getElementsBytagname ("TransactionID")! = NULL

&& document.getElementsBytagname ("TransactionID"). Item (0)! = NULL

&& document.getElementsBytagname ("TransactionID"). Item (0) .GetfirstChild ()! = null) {

TransactionId = document.getElementsBytagname ("TransactionID"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get TransactionId =" TransactionID);

} else {

System.out.println ("Provisioncmcc Get TransactionID == Null");

}

// DeviceType

IF (Document.GtelementsBytagname ("DeviceType")! = NULL

&& document.getElementsBytagname ("DeviceType"). Item (0)! = NULL

&& document.getElementsBytagname ("DeviceType"). Item (0) .GetfirstChild ()! = null) {

DeviceType_send = document.getElementsBytagname ("deviceType"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("provisioncmcc get send address.deviceType =" deviceType_send);} else {

System.out.println ("Provisioncmcc Get Send Address.DeviceType == Null");

}

IF (Document.GtelementsBytagname ("DeviceType")! = NULL

&& document.getElementsBytagname ("DeviceType"). Item (1)! = NULL

&& document.getlements "). Item (1) .GetfirstChild ()! = null) {

DeviceType_Dest = Document.getElementsBytagname ("DeviceType"). Item (1) .GetfirstChild (). GetNodeValue ();

System.out.println ("Provisioncmcc Get Dest Address.DeviceType =" DeviceType_Dest);

} else {

System.out.println ("Provisioncmcc Get Dest Address.DeviceType == Null");

}

// deviceID

IF (Document.GetelementsBytagname ("DeviceID")! = NULL

&& document.getElementsBytagname ("DeviceID"). Item (0)! = NULL

&& document.getElementsBytagname ("DeviceID"). Item (0) .GetfirstChild ()! = null) {

DeviceID_send = document.getlementsBytagname ("DeviceID"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("provisioncmcc get send address.Deviceid =" deviceid_send);

} else {

System.out.println ("Provisioncmcc Get Send Address.DeviceId == Null");

}

IF (Document.GetelementsBytagname ("DeviceID")! = NULL

&& document.getlementSbyTagname ("DeviceID"). Item (1)! = NULL

&& Document.GtelementsBytagname ("DeviceID"). Item (1) .GetfirstChild ()! = null) {

DeviceID_DEST = Document.GtelementsBytagname ("DeviceID"). Item (1) .GetfirstChild (). getnodevalue ();

System.out.println ("provisioncmcc get de cut devices.deviceid =" deviceid_dest);} else {

System.out.println ("Provisioncmcc Get Dest Address.DeviceId == Null");

}

// useridtype

IF (Document.GetElementsBytagname ("UseridType")! = NULL

&& document.GtelementsBytagname ("UserIdType"). Item (0)! = NULL

&& document.getlements ("UserIdType"). Item (0) .GetfirstChild ()! = null) {

UseridType_fee = document.getElementsBytagname ("useridtype"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("provisioncmcc get send feed =" useridtype_fee);

} else {

System.out.println ("Provisioncmcc Get Send Feeuser_id.useridType == Null");

}

IF (Document.GetElementsBytagname ("UseridType")! = NULL

&& Document.GtelementsBytagname ("UseridType"). Item (1)! = NULL

&& document.getlements ("UserIdType"). Item (1) .GetfirstChild ()! = null) {

UseridType_Dest = Document.getElementsBytagname ("UserIdType"). Item (1) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get Dest Destuser_id.useridType =" UserIDTYPE_FEE);

} else {

System.out.println ("Provisioncmcc Get Dest Destuser_id.useridType == Null");

}

// msisdn

IF (Document.GtelementsBytagname ("MSISDN")! = null

&& document.getElementsBytagname ("MSISDN"). Item (0)! = NULL

&& document.GtelementsBytagname ("msisdn"). Item (0) .GetfirstChild ()! = null) {

ISDN_FEE = Document.getElementsBytagname ("msisdn"). Item (0) .GetfirstChild (). getnodevalue ();

IF (ISDN_FEE == Null) {

System.out.println ("Provisioncmcc Get Send FeEuser_id.msdn == Null");} else {

System.out.println ("provisioncmcc get send feed_id.msisdn =" ISDN_FEE);

}

} else {

System.out.println ("Provisioncmcc Get Send Feeuser_id.msdn == Null");

}

IF (Document.GtelementsBytagname ("MSISDN")! = null

&& document.getElementsBytagname ("MSISDN"). Item (1)! = NULL

&& document.GtelementsBytagname ("MSISDN"). Item (1) .GetfirstChild ()! = null) {

ISDN_DEST = Document.GtelementsBytagname ("msisdn"). Item (1) .GetfirstChild (). getnodevalue ();

IF (ISDN_DEST == NULL) {

System.out.println ("Provisioncmcc Get Dest Destuser_id.msdn == Null);

} else {

System.out.println ("Provisioncmcc Get Dest Destuser_ID.MSISDN =" ISDN_DEST);

}

} else {

System.out.println ("Provisioncmcc Get Dest Destuser_id.msdn == Null);

}

// pseudocode

IF (Document.GtelementsBytagname ("pseudocode")! = null

&& document.GetElementsBytagname ("pseudocode"). Item (0)! = NULL

&& Document.GtelementsBytagname ("pseudocode"). Item (0) .GetfirstChild ()! = null) {

Pseudocode_fee = document.getElementsBytagname ("pseudocode"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get Send FeEuser_Id.pseudocode =" Pseudocode_fee);

} else {

System.out.println ("Provisioncmcc Get Send FeEuser_Id.pseudocode == Null");

}

IF (Document.GtelementsBytagname ("pseudocode")! = null

&& document.getElementsBytagname ("pseudocode"). Item (1)! = null

.! && document.getElementsByTagName ( "PseudoCode") item (1) .getFirstChild () = null) {pseudoCode_Dest = document.getElementsByTagName ( "PseudoCode") item (1) .getFirstChild () getNodeValue ()..;

System.out.println ("Provisioncmcc Get Dest Destuser_Id.pseudocode =" Pseudocode_Dest);

} else {

System.out.println ("Provisioncmcc Get Dest Destuser_id.pseudocode == Null");

}

// linkid

IF (Document.GetelementsBytagname ("linkid")! = NULL

&& Document.GtelementsBytagname ("LinkID"). Item (0)! = NULL

&& document.getElementsBytagname ("LinkID"). Item (0) .GetfirstChild ()! = null) {

Linkid = document.getage ("linkid"). item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("provisioncmcc get linkid =" linkid);

} else {

System.out.println ("provisioncmcc get linkid == null");

}

// ActionID

IF (Document.GetElementsBytagname ("ActionID")! = NULL

&& document.getElementsBytagname ("ActionID"). Item (0)! = NULL

&& document.getElementsBytagname ("ActionID"). Item (0) .GetfirstChild ()! = null) {

ActionID = Document.getElementsBytagname ("ActionID"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get ActionId =" ActionID);

} else {

System.out.println ("Provisioncmcc Get ActionID == Null");

}

// ActionReasonID

IF (Document.GetelementsBytagname ("ActionReasonID")! = NULL

&& document.getElementsBytagname ("ActionReasonID"). Item (0)! = NULL

&& document.GtelementsBytagname ("ActionReasonID"). Item (0) .GetfirstChild ()! = null) {

ActionReasonId = Document.getElementsBytagname ("ActionReasonID"). Item (0) .GetfirstChild (). getnodeValue (); System.out.Println ("provisioncmcc get actionReasonID =" ActionReasonID);

} else {

System.out.println ("Provisioncmcc Get ActionReasonId == Null");

}

// spid

IF (Document.GtelementsBytagname ("spid")! = null

&& document.GetElementsBytagname ("spid"). Item (0)! = null

&& document.getElementsBytagname ("spid"). Item (0) .GetfirstChild ()! = null) {

Spid = document.getlementsBytagname ("spid"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("ProvisionCMCC Get SPID =" SPID);

} else {

System.out.println ("Provisioncmcc Get SPID == Null");

}

// spserviceid

IF (Document.GtelementsBytagname ("spserviceid")! = null

&& document.getElementsBytagname ("spserviceid"). Item (0)! = null

&& document.getElementsBytagname ("spserviceid"). Item (0) .GetfirstChild ()! = null) {

SPSERVICEID = Document.getElementsBytagname ("spserviceid"). Item (0) .GetfirstChild (). getnodeValue ();

System.out.println ("provisioncmcc get spserviceid =" spserviceID);

} else {

System.out.println ("Provisioncmcc Get SpServiceId == Null");

}

// AccessMode

IF (Document.getElementsBytagname ("AccessMode")! = NULL

&& document.getElementsBytagname ("AccessMode"). Item (0)! = NULL

&& document.GetElementsBytagname ("Accessmode"). Item (0) .GetfirstChild ()! = null) {

Accessmode = document.getElementsBytagname ("AccessMode"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get Accessmode =" AccessMode);} else {

System.out.println ("Provisioncmcc Get Accessmode == Null");

}

// FeatureStr

IF (Document.GtelementsBytagname ("featureStr")! = NULL

&& document.getlements "). Item (0)! = NULL

&& document.getlements ("featureStr"). Item (0) .GetfirstChild ()! = NULL) {

Featurestr = document.getlementsBytagname ("featureStr"). Item (0) .GetfirstChild (). getnodevalue ();

System.out.println ("Provisioncmcc Get Featurestr =" FeatureStr);

} else {

System.out.println ("Provisioncmcc Get FeatureStr == Null");

}

OUT = response.getwriter ();

Out.println ("");

Out.println ("");

Out.println ("");

Out.println (" ");

Out.println ("");

Out.println ("");

Out.println ("");

Out.println (" 1.5.0 ");

Out.println (" SyncOrderReranceResp );

Out.println (" 0 "); out.println ("");

Out.println ("");

Out.println (");

Out.close ();

// 洢

UserOfcmcc user = new userofcmcc ();

//user.setUserstate (straction ,strserviceid_gate ,strmid ,strmdn);

Provisioncmccdata data = new provisioncmccdata ();

Data.setVarval (DeviceType_send, DeviceType_Dest, DeviceId_send, DeviceId_Dest

Useridtype_fee, useridtype_dest, isdn_fee, isdn_dest, pseudocode_fee

, Pseudocode_Dest, LinkID, ActionID, ActionReasonID, SPID

, SpServiceID, AccessMode, FeatureStr);

User.setUserstate (DATA);

} catch (exception e) {

OUT = response.getwriter ();

Out.println ("");

Out.println ("");

Out.println ("");

Out.println (" ");

Out.println ("");

Out.println ("");

Out.println ("");

Out.println (" 1.5.0 ");

Out.println (" SyncOrderReranceResp );

Out.println (" 0 ");

Out.println ("); out.println (" );

Out.println (");

Out.close ();

E.PrintStackTrace (System.err);

}

System.out.println ("ReceiveD over");

}

Public void doget (httpservletRequest request, httpservletResponse response)

Throws servletexception, ioException {

DOPOST (Request, Response);

}

}

WAP1.6 business ordering data package sample .txt

MISC1.6's business ordering relationship synchronous request package:

XMLns: xsd = "http://www.w3.org/2001/xmlschema"

XMLns: soap-env = "http://schemas.xmlsoap.org/soap/envelop/"

XMLns: soap-enc = "http://schemas.xmlsoap.org/soap/encoding/">

00110100037392

1.5.0

SyncORDERRELATIONREQ

0

0011

400

0

2

00116000000286

2

00116000000286

sp

1

1

919102

0000000064

2

MISC1.6's business ordering relationship synchronous response package:

SD = "http://www.w3.org/2001/xmlschema" xmlns: soap-env = "http://schemas.xmlsoap.org

/ soap / envelope / "xmlns: soap-enc =" http://schemas.xmlsoap.org/soap/encoding/ ">

00110100037392

1.5.0

SyncORDERRELATIONRESP

0

转载请注明原文地址:https://www.9cbs.com/read-131786.html

New Post(0)