public interface MM7Service extends MMSService
MM7 is the protocol between the Multimedia Service Center (MMSC) and a Value Added Service Provider (VASP). It is based on SOAP and uses HTTP(S) as the transport protocol. It can be used by third-party applications to send and receive multimedia messages to/from MMS-capable mobile devices.
Outgoing messages will be submitted from your system to the MM7 MMS center using a HTTP(S) POST request. For incoming messages, the MM7 MMSC will submit a HTTP(S) POST request to your machine.
In standalone mode, jSMS uses an embedded HTTP server (Jetty) for processing
incoming MM7 HTTP requests. To turn on reception, you must call the connect()
method. To stop reception, invoke disconnect()
.
MM7ReceiverServlet
and install this servlet into your webapp server.
Please notice that MM7 requires Java 1.4.2 or later. The MM7 implementation depends on the JavaMail API (V1.4). You will also need the JavaBeans Activation Framework (JAF - V1.1). The jSMS distribution already contains the JavaMail (lib/javamail.jar) and JAF (lib/activation.jar) libraries. Those libraries must be added to your CLASSPATH. *
capabilites
:
Property | Description | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mm7.namespace |
MM7 namespace and version to use. The following combinations are supported:
The defaults are
The MM7-namespace will then be:
Notice:
When only |
||||||||||||||||||||||
mm7.out.url |
URL used for submitting short messages to the MM7 MMSC | ||||||||||||||||||||||
mm7.out.username |
Username used for authenticating jSMS with the MM7 MMSC (optional) | ||||||||||||||||||||||
mm7.out.password |
Password used for authenticating jSMS with the MM7 MMSC (optional) | ||||||||||||||||||||||
mm7.listen |
When using jSMS in a standalone (non-webapp) application, this property
can be used to enable reception. It must contain the port number where jSMS
is listening for incoming messages and reports from the MMSC. If you want
to listen on a specific network-interface only, prepend its IP address
followed by a collon to this property. Examples:
Notice: jSMS makes use of the Jetty WebServer for MM7 message reception in standalone mode. To enable standalone reception, you must first download the Jetty WebServer and place the Jetty JAR files (jetty-6.x.jar, jetty-util-6.x.jar) into your classpath. |
||||||||||||||||||||||
mm7.in.path |
This is the path component of the URL for incoming
messages / reports from the MM7 MMSC. If unset, the path defaults to / .
|
||||||||||||||||||||||
mm7.in.ssl |
Set to true to enable HTTPS for the embedded web server. Defaults to false . |
||||||||||||||||||||||
mm7.in.ssl.clientauth |
Set to true to require certificate based client authentication
from the MM7 MMSC. Default: false . This property is ignored unless HTTPS is enabled. |
||||||||||||||||||||||
mm7.in.username |
Username required for connecting to the embedded HTTP(s) server. If unset, no username/password authentication is required. | ||||||||||||||||||||||
mm7.in.password |
Password required for connecting to the embedded HTTP(s) server. This setting is ignored unless mm7.in.username is set. |
||||||||||||||||||||||
mm7.use-complete-mms-address-format |
Specifies whether the full addressing format (including /TYPE=*, see MMSAddress.getMMSAddress() ) should be used.
Possible values are: true (default) and false
|
For more information about the settings required, contact your MM7 provider.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_MM7_VERSION
Default MM7 version to use (6.8.0)
|
static java.lang.String |
MM7_IN_PASSWORD
MM7_IN_PASSWORD is the name of the constant holding the value "mm7.in.password"
|
static java.lang.String |
MM7_IN_PATH
MM7_IN_PATH is the name of the constant holding the value "mm7.in.path"
|
static java.lang.String |
MM7_IN_SSL
MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl"
|
static java.lang.String |
MM7_IN_SSL_CLIENTAUTH
MM7_IN_SSL is the name of the constant holding the value "mm7.in.ssl.clientauth"
|
static java.lang.String |
MM7_IN_USERNAME
MM7_IN_USERNAME is the name of the constant holding the value "mm7.in.username"
|
static java.lang.String |
MM7_LISTEN
MM7_LISTEN is the name of the constant holding the value "mm7.listen"
|
static java.lang.String |
MM7_NAMESPACE
MM7_NAMESPACE is the name of the constant holding the value "mm7.namespace"
|
static java.lang.String |
MM7_OUT_PASSWORD
MM7_OUT_PASSWORD is the name of the constant holding the value "mm7.out.password"
|
static java.lang.String |
MM7_OUT_USERNAME
MM7_OUT_USERNAME is the name of the constant holding the value "mm7.out.username"
|
static java.lang.String |
MM7_OUTGOING_URL
MM7_OUTGOING_URL is the name of the constant holding the value "mm7.out.url"
|
static java.lang.String |
MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT
MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT is the name of the constant holding the value "mm7.use-complete-mms-address-format"
|
static java.lang.String |
MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT_DEFAULT
Default value ('true') for the property
MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT |
static java.lang.String |
MM7_VASID
MM7_VASID is the name of the constant holding the value "mm7.vas.id"
|
static java.lang.String |
MM7_VASPID
MM7_VASPID is the name of the constant holding the value "mm7.vasp.id"
|
static java.lang.String |
MM7_VERSION
MM7_VERSION is the name of the constant holding the value "mm7.version"
|
Modifier and Type | Method and Description |
---|---|
void |
connect()
If MM7 is used in standalone mode and reception is enabled (property
mm7.listen ), this method will start the embedded web server. |
void |
disconnect()
If MM7 is used in standalone mode and reception is enabled (property
mm7.listen ), this method will stop the embedded web server. |
void |
extendedCancel(MMSMessage message)
MM7 extended cancel operation.
|
void |
extendedReplace(MMSMessage oldMessage,
MMSMessage newMessage)
MM7 extended replace operation.
|
cancel, fetch, getListener, getName, hasCapability, replace, send, setListener
static final java.lang.String MM7_VASID
static final java.lang.String MM7_VASPID
static final java.lang.String MM7_OUTGOING_URL
static final java.lang.String MM7_OUT_USERNAME
static final java.lang.String MM7_OUT_PASSWORD
static final java.lang.String MM7_LISTEN
static final java.lang.String MM7_IN_PATH
static final java.lang.String MM7_IN_USERNAME
static final java.lang.String MM7_IN_PASSWORD
static final java.lang.String MM7_IN_SSL
static final java.lang.String MM7_IN_SSL_CLIENTAUTH
static final java.lang.String MM7_VERSION
static final java.lang.String DEFAULT_MM7_VERSION
static final java.lang.String MM7_NAMESPACE
static final java.lang.String MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT
static final java.lang.String MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT_DEFAULT
MM7_USE_COMPLETE_MMS_ADDRESS_FORMAT
void connect() throws MMSException, ProtocolException, TransportException, java.io.IOException
mm7.listen
), this method will start the embedded web server.connect
in interface MMSService
MMSException
- if connecting to the MMS Relay/Server failsProtocolException
- if the underlying Protocol implementation failsTransportException
- if the underlying Transport layer failsjava.io.IOException
- if an I/O error occursvoid disconnect() throws MMSException, ProtocolException, TransportException, java.io.IOException
mm7.listen
), this method will stop the embedded web server.disconnect
in interface MMSService
MMSException
- if connecting to the MMS Relay/Server failsProtocolException
- if the underlying Protocol implementation failsTransportException
- if the underlying Transport layer failsjava.io.IOException
- if an I/O error occursvoid extendedCancel(MMSMessage message) throws MM7Exception, MMSException, ProtocolException
This method can be used to cancel a previously submitted multimedia message which may already have been delivered to the recipent's mobile phone.
The message passed to extendedCancel
must contain
the ID
of the message to cancel.
message
- the message to cancel.MM7Exception
- if cancelling the message failed.MMSException
- if the service is not inizialized or not connected.ProtocolException
- if the underlying Protocol implementation failsvoid extendedReplace(MMSMessage oldMessage, MMSMessage newMessage) throws MM7Exception, MMSException, ProtocolException
This method can be used to replace a previously submitted multimedia message which may already have been delivered to the recipient's mobile phone.
oldMessage
- the previously sent message (the message to replace).newMessage
- the replacement message.MM7Exception
- if the message could not be replaced.MMSException
- if the service is not initialized or connected.ProtocolException
- if the underlying Protocol implementation failsobject XP, Inc. © 2000-2013. All rights reserved object XP