...
|
The ServiceMix SMPP component provides support for receiving and sending SMS using the [SMPP protocol|http://en.wikipedia.org/wiki/SMPP] via the enterprise service bus. It uses the [jSMPP|http://code.google.com/p/jsmpp] library.
|
{note:title=Availability} Note that this component is now available only in snapshot, not yet included in a ServiceMix release. {note}
|
h2. Maven Archetype
|
|
h2. Installation
|
You can use Maven servicemix-smpp-service-unit archetype to create a SMPP service unit:
|
|
Simply drop the servicemix-smpp installer zip in an hotdeploy directory monitored by ServiceMix.
|
{code} mvn archetype:create \ -DarchetypeGroupId=org.apache.servicemix.tooling \ -DarchetypeArtifactId=servicemix-smpp-service-unit \ -DarchetypeVersion=2010.01 \ -DgroupId=your.group.id \ -DartifactId=your.artifact.id \ -Dversion=your-version {code}
|
|
h2. Endpoints
|
Once you've customized the service unit, simply install the SU:
|
|
{code} mvn install {code} {info} Remember that to be deployable in ServiceMix, the ServiceUnit has to be embedded in a Service Assembly: only the Service Assembly zip file can be deployed in ServiceMix. To add your SU in a SA, you need to define it in the dependency sets: {code} <dependency> <groupId>your.group.id</groupId> <artifactId>your.artifact.id</artifactId> <version>your-version</version> </dependency> {code} {info} h2. Endpoints Configuration h3. Consumer Endpoint A SMPP Consumer endpoint connects to a SMPP server, waiting for incoming SMS message. When a SMS message comes, the endpoint converts it into a JBI message (using the marshaler) and send to the NMR.
|
{code:lang=xml|title=Consumer Endpoint} <smpp:consumer service="test:service"
|
...
|
{code}
|
{code:lang=xml|title=Provider Endpoint} <smpp:provider service="test:service" endpoint="endpoint" host="smpp.example.com" port="2700" systemId="user" password="passwd"/> {code}
|
|
{info:title=Consumer endpoint attributes|borderStyle=solidbgColor='lightblue'}
|
{info:title=Consumer Endpoint Attributes|borderStyle=solidbgColor='lightblue'}
|
|| Name || Type || Description || Default || | service | QName | the service name of the endpoint | require to be spec'd | | endpoint | string | the endpoint name of the endpoint | require to be spec'd |
|
| targetService | QName | the service name of the target endpoint | |
|
| targetEndpoint | string | the endpoint name of the target endpoint | | | host | string | the SMPP server hostname/IP | require to be spec'd |
|
...
|
| systemId | string | the SMPP user system ID | require to be spec'd | | password | string | the SMPP user password | require to be spec'd |
|
| marshaler | class | org.apache.servicemix.smpp.marshaler.SmppMarshalerSupport | DefaultSmppMarshaler | DefaultSmppMarshaler |
|
{info}
|
|
|
{info:title=Provider endpoint attributes|borderStyle=solidbgColor='lightblue'}
|
h3. Provider Endpoint A SMPP Provider endpoint expects messages coming from the NMR, converts it into a SMS message (using the marshaler) and send to the SMPP server. {code:lang=xml|title=Provider Endpoint} <smpp:provider service="test:service" endpoint="endpoint" host="smpp.example.com" port="2700" systemId="user" password="passwd"/> {code} {info:title=Provider Endpoint Attributes|borderStyle=solidbgColor='lightblue'}
|
|| Name || Type || Description || Default || | service | QName | the service name of the endpoint | require to be spec'd |
|
...
|