Multimedia Messaging Service Center (MMSC) v 2.6

30
Multimedia Messaging Service Center (MMSC) v 2.6 MM7 Interface v 1.0 Reference: MMSC-2.6-MM7-1.0

Transcript of Multimedia Messaging Service Center (MMSC) v 2.6

Multimedia Messaging Service Center (MMSC) v 2.6 MM7 Interface v 1.0R efer enc e: MMSC- 2.6-MM7-1.0

Confidentiality Statement Copyright 2009-2010, Comviva Technologies Ltd. All rights reserved. This product or document may not, in whole or in part, be copied, photocopied, reproduced, translated, or reduced to any electronic medium or machine readable form, by any means electronic, mechanical, photographic, optic recording or otherwise without prior consent, in writing, of the copyright owner. Statutory declaration under section 52A of the Copyright Act 1957.

i

Restrictions and Copyright DeclarationThe information in this document is subject to change without notice and describes only the product defined in the introduction of this documentation. This document is intended for the use of prospective Comviva customers for the sole purpose of the agreement under which the document is submitted. No part of it may be reproduced or transmitted in any form or means without the prior written permission of Comviva. The intended audience for this document is professional personnel, who assume full responsibility for using the document appropriately. Comviva welcomes customer comments as part of the process of continuous development and improvement of its documentation. The information or statements given in this document concerning the suitability, capacity, or performance of the mentioned hardware or software products cannot be considered binding, but shall be defined in contextual specific eventual agreement made between Comviva and the customer. However, Comviva has made all reasonable efforts to ensure that the instructions contained in the document are adequate, sufficient and free of material errors and omissions. Comviva will, if necessary, explain issues, which may not be covered by the document. Comvivas liability for any errors in the document is limited to the documentary correction of errors. Comviva will not be responsible, in any event, for errors in this document or for any damages, incidental or consequential, including monetary losses, that might arise from the use of this document or the information in it. This document and the product it describes are considered protected by Patent, Copyright and Trademark laws in accordance with relevant Indian laws. The only warranties for Comviva products and services are set forth in the express warranty statements accompanying its products and services. Nothing herein should be construed as constituting an additional warranty. Comviva shall not be liable for technical or editorial errors or omissions contained herein. The Comviva logo is a registered trademark of Comviva Technologies Ltd. Other product names mentioned in this document may be trademarks of their respective companies and they are mentioned for identification purposes only. Copyright 2009 Comviva Technologies Ltd. All rights reserved.

iii

Contents1 MM7 Interface ........................................................................................................................................... 1-11.1 1.2 1.3 Dependencies ............................................................................................................................................. 1-1 MM7 SOAP Architecture ........................................................................................................................... 1-1 SOAP Server ............................................................................................................................................... 1-4

1.2.1 Adding VAS User ......................................................................................................................................... 1-1

1.3.1 MM7 SOAP Service Methods ...................................................................................................................... 1-4 1.3.2 MM7 Submit ................................................................................................................................................. 1-4 1.3.3 MM7 Deliver ................................................................................................................................................. 1-9 1.3.4 MM7 Replace/Cancel ................................................................................................................................. 1-11

2 Sample Programs .................................................................................................................................... 2-12.1 2.2 Dependencies ............................................................................................................................................. 2-1 Steps to Write MM7 SOAP Client ............................................................................................................. 2-1

2.2.1 Program to send a MM7_Submit.REQ to the SOAP Server ..................................................................... 2-1 2.2.2 How to Compile and Execute ...................................................................................................................... 2-5

Appendix A Error Codes and Texts...................................................................................................... 2-1 Appendix B Deploy SOAP Service ...................................................................................................... 2-1 Appendix C SOAP Messaging Client .................................................................................................. 2-1 Appendix D SOAP Service Handler ..................................................................................................... 2-1 Document Change History .............................................................................................................................I Contact Us ......................................................................................................................................................III

v

TablesTable 1: Document Change History .................................................................................................... I

vii

1 MM7 InterfaceThe Interface between a Value Added Service (VAS) and the MMS Relay/Server, over the MM7 reference point is realized using SOAP 1.1. The MM7 SOAP message consists of a SOAP Envelope, SOAP Header and SOAP Body Element. The SOAP message binds to the HTTP request/response model by providing SOAP request parameters in the body of the HTTP Post Data. The MM7 SOAP interface uses a message oriented SOAP service approach in order to provide full control over request and response SOAP Envelopes. Thus it is the responsibility of the message oriented SOAP service implementation, to process the SOAP Envelope contents and generate appropriate response SOAP Envelope. The Message Oriented SOAP Services is hosted by a Servlet container (Jakarta Tomcat). Hence all the HTTP requests for SOAP service must be delivered to the SOAP Servlet (Messagerouter and rpcrouter). SOAP Servlet performs following operations:

Invoke the service methods Send the response generated by the service method to the requesting client.

Register/deploy the SOAP service Un-register/Un-deploy the SOAP service

1.1

DependenciesJava Vesion1.3 or higher, and a Servlet engine supporting version 2.1 or above of the Java Servlet API (Tomcat V 3.3 used) A JAXP compatible, namespace aware XML parser (Jxerces-1.2.3 used) JavaMail (mail.jar) and the JavaBeans Activation Framework (activation.jar) Apache SOAP V 2.2 It requires jxreces-1.2.3 namespace aware xml parser so xerces.jar file must be set as the first jar files in the CLASSPATH. W3C SOAP Schema 1.1 as published by 3GPP (http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-5-MM7-10)

1.2

M M 7 S OA P A rch ite c tu re

To enable a VAS application to access the Comviva MMSC, the VAS must be registered. This can be done using Add Subscriber link on the MMSC Web GUI.

1.2.1 Adding VAS User1. 2. 3. 4. 5. The user name field is mapped to VAS ID and the value must be digits. Enter appropriate values for password, e-mail ID and class ID. Select the Subscriber Type as VAS User. Enter the VASP ID. This is mapped to VAS provider ID. VAS URL field has 3 parts in sequence, each separated by a | a) HTTP URL b) Soap Service Name c) Service Method Name to handle MM7_deliver.REQ

MM7 Interface

1-1

Troubleshooting Manual: MMSC-3.1 For Example: http://127.0.0.1:8080/soap/servlet/messagerouter|mm7interface|DeliverReq 6. Add type of message rule. The current version of MMSC provides following service methods: 1. SubmitReq: This is a 3GPP specifications service method for MM7_submit.REQ requests. The SOAP response generated by this method adheres to 3GPP MM7_submit.RES format. 2. ReplaceReq: This is a 3GPP specifications service method for MM7_replace.REQ request. The SOAP response generated by this method confirms to 3GPP MM7_replace.RES format. 3. CancelReq: This is a 3GPP specifications service method for MM7_cancel.REQ request. The SOAP response generated by this method confirms to the 3GPP MM7_cancel.RES format. 4. DeliverReq: This is a 3GPP specifications service method for MM7_deliver.REQ request. The SOAP response generated by this method confirms to the 3GPP MM7_deliver.RES format. All these service methods are grouped under SOAP service, mm7interface. The SOAP service is deployed during installation of the MM7 Interface. A VAS provider can deploy its own customized service by registering the deployment descriptor. Refer to Appendix A Deploy SOAP Service for details on creating deployment descriptor and registering. MMSCs MM7 interface supports the following messaging services:

VAS Application Originated (AO): A multimedia message is sent by VAS application to Comviva MMSC for processing. The VASP application can send SOAP requests for SubmitReq, ReplaceReq and CancelReq service methods of mm7inteface SOAP service. The SOAP request and response data are described in the following section. VAS Application Terminated (AT): A message that is passed by the Comviva MMS Relay/Server to a VASP for processing. For example, this may include cases where the message originated from the MMS User-Agent.

MM7 Interface

1-2

Troubleshooting Manual: MMSC-3.1 The following figure gives the architecture of AO MT interface.

The interfaces between VAS and database, file, other trigger applications are proprietary. The interface between VAS and SOAP Client is a function call for which an Apache SOAP library can be used over HTTP 1.1 interface. The SOAP Envelope and payload is sent as POST Data.

Figure 2-1: Application Originated Mobile Terminated

The following figure illustrates the architecture of MO AT interface.

HTTP 1.1 interface, the SOAP Envelope and payload is sent as POST Data. The interface between VAS and SOAP Client is a function call for which an Apache SOAP library can be used. A proprietary Interface is used between VAS and database, file or other applications.

Figure 2-2: Mobile Originated Application Terminated

The MM7 interface has 2 logical components:

The SOAP server The MM7 SOAP Service methods

1-3

MM7 Interface

Troubleshooting Manual: MMSC-3.1

1.3

S OA P Se rv e r

The target URL used by the VAS Provider MM7 application is the apache SOAPs messagerouter servlet. The messagerouter Servlet is deployed in the application server. Thus the Apache SOAP Servlet and the application server together provide the ability to receive and process the SOAP request. The Servlet invokes the Java service methods.

1.3.1 MM7 SOAP Service MethodsThe SOAP service methods must be deployed and registered with SOAP server. The SOAP server finds the service descriptor and informs the application server to load the Java class to perform the service. The application server invokes the Java method with SOAP message body and attachments as parameter. The following diagram describes the intercommunication of all the components:

Figure 2-3: MM7 Components

1.3.2 MM7 Submit1. MM7 MM7_submit.REQ/MM7_cancel.REQ/MM7_replace.REQ from VAS to MMSC. 2. MM7_submit.RES/MM7_cancel.REQ/MM7_replace.REQ from MMSC to VAS. MM7 Interface 1-4

Troubleshooting Manual: MMSC-3.1 3. The messagerouter Servlet requests for registered service functions against the urn. 4. Service deployment descriptor returns the class name and the function name. 5. The SOAP server instantiates the SOAP service class and invokes the corresponding service method. 6. The SOAP service method generates MM7 SOAP format response and sends it to the VAS through step 2. 7. The MM7 interface service method communicates with Comviva MMSC in a proprietary format over HTTP. MM7 Message Format: Subsequent sub-clauses will specify the detailed architecture as defined by the 3GPPs MM7 protocol. The VAS submits a multimedia message as payload to MMSC and waits for SOAP Response.

MM7_Submit.REQInformation ElementTransaction ID MM7 Version VASP ID VAS ID Sender Address TO CC BCC Service Code Linked ID Message Class Time Stamp Earliest Delivery Time Expiry Date Reply Charging Reply Charging Size Reply Dead Line Delivery Report Read Reply Priority Subject

SOAP Name

Element

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String String String String String String String String Date Time Date Time

PresenceMandatory Mandatory Mandatory Mandatory Optional Mandatory Optional Optional Optional Optional Optional Optional Optional Optional Optional Optional

TransactionID MM7Version VASPID VASID SenderAddress To Cc Bcc ServiceCode LinkedID MessageClass TimeStamp EearliestDeliveryTime ExpiryDate ReplyCharging replyChargingSize replyDeadLine DeliveryReport ReadReply Priority Subject

Date Time Boolean Boolean String String

Optional Optional Optional Optional Optional

1-5

MM7 Interface

Troubleshooting Manual: MMSC-3.1 Information ElementCharged Party Distribution Protection Content href Allow Content Adaptation

SOAP Name

Element

LocationSOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString Number

PresenceOptional Optional Optional

ChargedParty DistributionProtection Content Href allowAdaptations

String Boolean

Optional Optional

MM7_Submit.RESInformation ElementTransaction ID MM7 Version Message ID Response Status Response Text Detail Description

SOAP Name

Element

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String String

PresenceMandatory Mandatory Mandatory Mandatory Mandatory Optional

TransactionID MM7Version MessageID StatusCode StatusText Details

Sample MM7_Submit.REQPOST /soap/servlet/messagerouter HTTP/1.0 Host: 192.10.2.195 Content-Type: multipart/related; boundary="---type="text/xml"; =_Part_1_6085183.1050660704628"; start="5285337.1050660705250.apache-soap.node2.jataayu.co.in" Content-Length: 3004 SOAPAction: "" ------=_Part_1_6085183.1050660704628 Content-Type: text/xml; charset=utf-8 Content-Transfer-Encoding: 8bit Content-ID: Content-Length: 1425 123 MM7 Interface 1-6

Troubleshooting Manual: MMSC-3.1 1.0 TNN 1234 JataayuVAS_SAMPLE 9845331850 [email protected] gold-sp33-im42 mms00016666 Informational 2005-09-21T19:05:58 2005-09-21T19:05:5805:30 2005-09-23T19:05:58 True Normal Sender True News for today ------=_Part_1_6085183.1050660704628 Content-Type: application/smil Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=foo.smil Content-ID: foo.smil Content-Location: foo.smil

1-7

MM7 Interface

Troubleshooting Manual: MMSC-3.1 ------=_Part_1_6085183.1050660704628 Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=foo.txt Content-ID: foo.txt Content-Location: foo.txt this is a text file. ------=_Part_1_6085183.1050660704628 Content-Type: image/gif Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename=08.gif Content-ID: 08.gif Content-Location: 08.gif GIF89a~L^@^O^@~@^@!^D^A^@^@^A^@,^@^@^@^@~L^@^O^@^@^B~L^_|\~J ^O~\~K,^O~F"~Uc~]~JN~@c~J~A3vCo$k~@4"qh;v~MNQ^@^@; ------=_Part_1_6085183.1050660704628--

Sample MM7_Submit.RES 123 1.0 4000 gerneral service error MM7 Interface 1-8

Troubleshooting Manual: MMSC-3.1

1.3.3 MM7 DeliverMM7 deliver interface is invoked in Mobile Originated to VAS Terminated scenario. The current version of MM7Deliver() stores the multimedia message along with attachment to the directory as specified in the ATSaveDir parameter of the MM7 configuration file. VAS Providers can add its own service methods, instead of using MM7Deliver() for handling MM7_deliver.REQ.

MM7_deliver.REQInformation ElementTransaction ID MM7 Version Linked ID Sender Address Recipient Time Stamp Priority Subject Content Href

SOAP Element NameTransactionID MM7Version LinkedID Sender To TimeStamp Priority Subject Content href

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String String String String String String

PresenceMandatory Mandatory Optional Mandatory Mandatory Optional Optional Optional Optional Optional

Sample MM7_deliver.REQPOST /soap/servlet/messagerouter HTTP/1.1 Host: 192.10.2.195 Content-Type: multipart/related; boundary="---=_NextPart_000_0017_01C2A8E7.84B40FE0"; type="text/xml; charset=utf8"; start="startid" Content-Length: 2750 SOAPAction: "" ------=_NextPart_000_0017_01C2A8E7.84B40FE0 Content-Type: text/xml; charset= utf-8 Content-ID: Content-Transfer-Encoding: 7bit vas00001-sub 1.0 +9845326569/TYPE=PLMN +8888/TYPE=PLMN gold-sp33-im42 mms00016666 Informational 123456 20020 1234 True Normal Sender True News for today ------=_NextPart_000_0017_01C2A8E7.84B40FE0 Content-Type: image/jpeg Content-ID: Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="alarm.jpg" /9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UH RofHh0a..... NextPart_000_0017_01C2A8E7.84B40FE0--

Sample MM7_Deliver.RES vas00001-sub 1.0

MM7 Interface

1-10

Troubleshooting Manual: MMSC-3.1 1000 Success Content stored in [/var/tmp/saveddata/9845115059/1049954669005]

1.3.4 MM7 Replace/CancelMMSC provides option for VASP to cancel a submitted message prior to delivery or replace a submitted message with a new message.

MM7_replace.REQInformation ElementTransaction ID MM7 Version VASP ID VAS ID Message ID Service Code Time Stamp Earliest Delivery Time Expiry Date Reply Charging Reply Charging Size Reply Dead Line Delivery Report Read Reply Distribution Protection Content Href Allow Content Adaptation

SOAP Element NameTransactionID MM7Version VASPID VASID MessageID ServiceCode TimeStamp EearliestDeliveryTime ExpiryDate ReplyCharging replyChargingSize replyDeadLine DeliveryReport ReadReply DistributionProtection Content href allowAdaptations

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String String String Date Time Date Time

PresenceMandatory Mandatory Mandatory Mandatory Mandatory Optional Optional Optional Optional Optional Optional

Date Time Boolean Boolean Number

Optional Optional Optional Optional Optional

String Boolean

Optional Optional

1-11

MM7 Interface

Troubleshooting Manual: MMSC-3.1

MM7_replace.RESInformation ElementTransaction ID MM7 Version Response Status Response Text Detail Description

SOAP Name

Element

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String

PresenceMandatory Mandatory Mandatory Mandatory Optional

TransactionID MM7Version StatusCode StatusText Details

MM7_cancel.REQInformation ElementTransaction ID MM7 Version VASP ID VAS ID Sender Address Message ID

SOAP Name

Element

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String String

PresenceMandatory Mandatory Optional Optional Optional Mandatory

TransactionID MM7Version VASPID VASID SenderAddress MesageID

MM7_cancel.RESInformation ElementTransaction ID MM7 Version Response Status Response Text Detail Description

SOAP Name

Element

LocationSOAP Header SOAP Body SOAP Body SOAP Body SOAP Body

TypeString String String String String

PresenceMandatory Mandatory Mandatory Mandatory Optional

TransactionID MM7Version StatusCode StatusText Details

Sample MM7_cancel.REQPOST /soap/servlet/messagerouter HTTP/1.0 Host: 192.10.2.195 Content-Type: text/xml; charset=utf-8 Content-Length: 719 SOAPAction: "" vas00001-sub MM7 Interface 1-12

Troubleshooting Manual: MMSC-3.1 1.0 TNN 8888 JataayuVAS_SAMPLE 4GaU4nzr4WRVW400004VRyW.kWRqV4kc38Qc0Wg

Sample MM7_cancel.RESPOST /soap/servlet/messagerouter HTTP/1.0 Host: 192.10.2.195 Content-Type: text/xml; charset=utf-8 Content-Length: 719 SOAPAction: "" vas00001-sub 1.0 3001 Not possible

1-13

MM7 Interface

2 Sample Programs2.1

Dependenciesxerces.jar Version 1.2.3 mail.jar Version 1.3 activation.jar Version 1.0 or above soap.jar Version 2.2 or above

The sample MM7 SOAP client requires following jar files in the CLASSPATH:

2.21. 2. 3. 4.

S te p s to Write M M 7 S OA P C lie n tCreate an org.apache.soap.messaging.Message object Add all attachments to the message object Create SOAP Envelope XML Send the SOAP Envelope and attachment(s) to the Servlet listening for message oriented soap requests 5. Read the response SOAP Envelope 6. Parse the response SOAP Envelope

2.2.1 Program to send a MM7_Submit.REQ to the SOAP Server/*The SOAP service urn is urn:mm7interface and must be deployed on the SOAP server. * parameter List

*/ import import import import import import import import import import import import import import import

The message router Servlet URL http://{SOAP_SERVER_IP}:{TOMCAT_PORT}/soap/servlet/messagerouter passed as first command line argument to this application.

and

is is

Service method name is SubmitReq and is the first child node after XML body element. Service method name is passed as second command line argument to this application. All subsequent command line arguments are the file names that will be sent as attachments. java.io.*; java.util.*; java.net.*; org.w3c.dom.*; org.xml.sax.*; org.apache.soap.util.xml.*; org.apache.soap.util.mime.*; org.apache.soap.*; org.apache.soap.transport.*; org.apache.soap.encoding.*; org.apache.soap.encoding.soapenc.*; org.apache.soap.rpc.*; org.apache.soap.messaging.*; javax.activation.*; javax.mail.internet.*;

Sample Programs

2-1

Troubleshooting Manual: MMSC-3.1 import javax.xml.parsers.*; public class MM7Client { public static void main(String[] args) throws Exception { String encodingStyleURI = Constants.NS_URI_SOAP_ENC; /* URL of the messagerouter servlet */ URL url = new URL(args[0]); try { // Build the Message. Step 1 Message msg = new Message () ; // Add attachments. Step 2 String attachments = "" ; for (int i = 2; i < args.length; i++) { ByteArrayDataSource ds = new ByteArrayDataSource (new File (args [i]), null); DataHandler dh = new DataHandler (ds); MimeBodyPart bp = new MimeBodyPart (); bp.setDataHandler (dh); bp.setFileName (args[i]); bp.setHeader (org.apache.soap.Constants.HEADER_CONTENT_LOCATION,"myfile" + (i 2)); msg.addBodyPart (bp) ; attachments += "\n" + args[i] + ""; } // Build the envelope. Step 3 String xmlmsg = ""; // SOAP Envelope. xmlmsg += " \n" ; // SOAP Header xmlmsg += " \n" ; // Transaction ID xmlmsg += " vas00001sub \n" ; xmlmsg += " \n" ; // SOAP Body xmlmsg += " \n" ; Sample Programs 2-2

Troubleshooting Manual: MMSC-3.1 // args [1] is the service function // mm7interface is the SOAP Service urn as deployed in the SOAP Server xmlmsg += " \n" ; xmlmsg xmlmsg xmlmsg xmlmsg xmlmsg += += += += += " " " " " 1.0 \n" ; \n" ; TNN \n" ; News \n" ; \n" ; \n" ; \n" ; 9844001436 \n" \n" ; \n" ;

;

xmlmsg += " xmlmsg += " xmlmsg += " xmlmsg += " xmlmsg += "

xmlmsg += " Informational \n" ; xmlmsg += " 2005-0927T11:48:25 \n" ; xmlmsg += " Normal \n" ; xmlmsg += " News for today \n" ; xmlmsg += " \n" ; xmlmsg += " \n" ; xmlmsg += " \n" ; xmlmsg += " \n" ;

DocumentBuilder xdb = XMLParserUtils.getXMLDocBuilder (); Document doc = xdb.parse (new InputSource (new StringReader (xmlmsg))); if (doc == null) { System.err.println ("Failed to parse XML"); return; } // SOAP Envelope. Step 3 Envelope msgEnv (doc.getDocumentElement()); // Invoke. Step 4 msg.send (url, "", msgEnv);

=

Envelope.unmarshall

2-3

Sample Programs

Troubleshooting Manual: MMSC-3.1 // Receive response as DataHandler. Step 5 printObject(msg.receive()); } catch(Exception e) { e.printStackTrace(); }

}

/* Parse the response object and prints the status. Step 6 */ public static void printObject(Object obj) { if (obj instanceof DataHandler) { DataHandler dh = (DataHandler)obj; Object o; try { o = dh.getContent(); } catch(IOException ioe) { o = ioe; } System.out.println("DataHandler, name=" + dh.getName() + ", type=" + dh.getContentType() + ", content: (" + o.getClass().getName() + ")\n" + o); DataSource ds = dh.getDataSource(); String fname = "" + System.currentTimeMillis() + ".out"; System.out.println(" Writing attachment to file: " + fname); try { ByteArrayDataSource bds = new ByteArrayDataSource( ds.getInputStream(), dh.getContentType()); bds.writeTo(new FileOutputStream(fname)); } catch(IOException ioe) { System.out.println(ioe); ioe.printStackTrace(System.err); } } else if (obj instanceof Vector) { for (Enumeration enum = ((Vector)obj).elements(); enum.hasMoreElements(); ) printObject (enum.nextElement()); } else if (obj instanceof Object[]) { Object[] s = (Object[])obj; for (int i = 0; i < s.length; i++) printObject(s[i]); } else System.out.println(obj); } }

Sample Programs

2-4

Troubleshooting Manual: MMSC-3.1

2.2.2 How to Compile and Execute/* Provide absolute path for the following jar files */ CLASSPATH=xerces.jar CLASSPATH=$CLASSPATH:mail.jar CLASSPATH=$CLASSPATH:soap.jar CLASSPATH=$CLASSPATH:activation.jar CLASSPATH=$CLASSPATH:. export $CLASSPATH /* Compiling the client */ Javac classpath $CLASSPATH MM7Clinet.java /* Executing the client */ java classpath

http://192.10.2.6:8080/soap/servlet/messagerouter SubmitReq foo.txt

$CLASSPATH

MM7Client

2-5

Sample Programs

Appendix A Error Codes and TextsThe following table gives the MM7 Interfaces error codes and texts. Status Code1000 1100

Status TextSuccess Partial success

MeaningThis code indicates that the request was executed completely This code indicates that the request was executed partially but some parts of the request could not be completed. Lower order digits and the optional Details element may indicate what parts of the request were not completed. Client made an invalid request The request was refused due to lack of permission to execute the command. The address supplied in the request was not in a recognized format or the MMS Relay/Server ascertained that the address was not valid for the network because it was determined not to be serviced by this MMS Relay/Server. When used in responseresult, and multiple recipients were specified in the corresponding push submission, this status code indicates that at least one address is incorrect. The address supplied in the request could not be located by the MMS Relay/Server. This code is returned when an operation is requested on a previously submitted message and the MMS Relay/Server cannot find the message for the address specified. The server could not parse the MIME content that was attached to the SOAP message and indicated by the Content element or the content size or media type was unacceptable. This code is returned when an operation is requested on a previously submitted message and the MMS Relay/Server cannot find the message for the message ID specified or when the VASP receives a report concerning a previously submitted message and the message ID is not recognized. This code is returned when a LinkedID was supplied and the MMS Relay/Server could not find the related message. An element value format is inappropriate or incorrect. The server failed to fulfill an apparently valid request. The request could not be carried out because it is not possible. This code is normally used as a result of a cancel or status query on a message that is no longer available for cancel or status query. The MMS Relay/Server has recognized the message in question, but it cannot fulfill the request because the message is already complete or status is no longer available. Server could not complete the service requested. The MMS Relay/Server does not support this

2000 2001 2002

Client error Operation restricted Address Error

2003

Address Not Found

2004

Multimedia content refused

2005

Message ID Not found

2006

LinkedID not found

2007 3000 3001

Message format corrupt Server Error Not Possible

3002 3003

Message rejected Multiple addresses not

Appendix A Error Codes and Texts

2-1

Troubleshooting Manual: MMSC-3.1 Status Code Status Textsupported 4000 4001 General service error Improper identification

Meaningoperation on multiple recipients. The operation MAY be resubmitted as multiple single recipient operations. The requested service cannot be fulfilled. Identification header of the request does not uniquely identify the client (either the VASP or MMS Relay/Server). The version indicated by the MM7 Version element is not supported. The server does not support the request indicated by the Message Type element in the header of the message. The SOAP and XML structures could not be parsed, mandatory fields are missing, or the message-format is not compatible to the format specified. Details field may specify the parsing error that caused this status. The operation caused a server (either MMS Relay/Server or VASP) failure and should not be resent. This indication may be sent by the server when service is temporarily unavailable, e.g. when server is busy The client does not have permission or funds to perform the requested operation.

4002 4003

Unsupported version Unsupported operation

4004

Validation error

4005

Service error

4006

Service unavailable

4007

Service denied

Appendix A Error Codes and Texts

2-2

Appendix B Deploy SOAP ServiceHow to deploy the SOAP serviceStep 1: Create a deployment descriptor file. Alongside the java source files for the Quotation Database service is the corresponding deployment descriptor (DeploymentDescriptor.xml). If you are developing your own service classes then note the sections shown in green below - these are where you will potentially need to make changes. Explanatory notes follow. org.apache.soap.server.DOMFaultListener

id="urn:QuotationService" : This is where you specify the URN of the service. You can choose any URN - but it will need to be made known to the client. scope="Application" : The scope refers to the lifetime of the service object (in our case the QuotationDB object) and it can take one of three values. In this way you can specify to the SOAP servlet how long the service object should stay alive. Specifying Request means that the object will only live for the duration of the service invocation. Specifying Session means that the object will remain alive as long as the http session that created it (the object is available only to that http session). We have specified Application to indicate that we want the service object to be instantiated once and that everyone should share this object from then on. This makes sense as our service class represents a shared database of quotations where by "shared" we mean shared across all invocations and http sessions. methods="getAllQuotations getQuotationsByAuthor submitQuotation" : This is simply where you specify your service method names. class="com.soapuser.soap.server.quotation.QuotationDB" : The fully qualified classname of the implementing class (note that following this, you can specify static as true if the service methods are defined static in the implementing class).

Step 2: Register the service using the following command: javaorg.apache.soap.server.ServiceManagerClient http://localhost:8080/soap/servlet/rpcrouter deploy descriptor file name>