SOAP Access Service

The SOAP web service provides functionality for maintaining a contact book, sending single messages, and sending bulk messages. Users can create groups and store contacts in those groups, submit bulk messages, and receive delivery reports.

This web service can be integrated using the following WSDL link.

http://<ipaddress>:<port>/SOAPServices/Service?wsdl

How to consume the web service

The provided web service is of type JAX-WS. To consume this web service, create a standard Java application or web application and use the WSDL link above to create a Web Service Client.

Once the web service client has been configured properly, the methods present in the web service will be visible in the Web Service Reference. Use these methods for sending messages.

Method NameDescription
addGroupAdds a group into the system.
updateGroupUpdates an available group.
deleteGroupDeletes a present group.
getGroupReturns all the present groups for the given user.
getContactReturns all the contacts present in the given group for the given user.
addContactAdds a contact into the system.
updateContactUpdates a contact present in the given group.
deleteContactDeletes contacts from the system.
sendBulkMessageSends bulk messages.
sendSingleMessageSends single messages.
getCreditDetailsGives the balance of the given user account.
getSenderUsed to give the allowed source for the given user.
sendGroupMessageUsed to send a message to all destinations present in the given group.
scheduleMessageUsed to schedule a message.
groupScheduleUsed to schedule a message for the destinations present in a group.
getDlrGets DLR information.
updateDlrUpdates DLR information.

System Boundary

addGroup

This method adds a new group as per the name provided. If the group is already present for the user, then it won't get added.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2groupnameGroup name to be added.
3passwordPassword for the respective user.

Response

Sr. No.Error CodeDescription
11701Success, Group has been added successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6101Operation Failed. Because of some internal error, group addition operation failed.
7102Group Already Exists. Group name already present for the given user.

updateGroup

This method updates the name of the present group with a new name provided. It first checks if the group to be updated is present or not, and if present it will check if there is any group with the same name as the new group name for the given user.

Request Parameters

Sr. No.Parameter NameDescription
1usernameName of the user.
2passwordPassword for the respective user.
3newnameNew name for the group.
4previousnameCurrent name of the group to be updated.

Response

Sr. No.Error CodesDescription
11701Success, Group has been updated successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6101Operation Failed. Because of some internal error, group updation operation failed.
7102Group Already Exists. Group name already present for the given user.
8103Group Not Found. Group to be updated not present.

deleteGroup

This method deletes the provided group name for the given user. First it will be checked if the group is present for the given user or not.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3groupnameNew name for the group.

Response

Sr. No.Error CodesDescription
11701Success, Group has been deleted successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6101Operation Failed. Because of some internal error, group deletion operation failed.
7103Group Not Found. Group to be deleted not present.

getGroup

This method returns the list of present groups for the given user. In this case, if there is more than one group present for the user, then group names would be separated by |.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.

Response

Sr. No.Error CodeDescription
1-In case of success, group names would be returned as response. For more than one group name, names would be separated by ``.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6104No Record Found. No groups found for the given user.

addContact

This method adds the given contact into the specified group for the provided user. It first checks if the provided group exists or not; if it does, then it will check if the given user name is present in the group for the given user or not, and then it will add the contact into the group.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3groupnameNew name for the group.
4contactnameName of the contact to be added.
5contactnumberContact number for the corresponding name to be added.

Response

Sr. No.Error CodesDescription
11701Success, Contact has been added successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41706Bad Destination. Contact number given by the user is invalid.
51710Unknown Error.
61712Database Error.
7101Operation Failed. Because of some internal error, contact addition operation failed.
8103Group Not Found. Group into which contact has to be added not found for the given user.
9105Contact Exists. Contact name to be added already exists in the specified group for the given user.

updateContact

This method updates the given contact information. The current name or number of any contact can be updated, provided the contact and the group are present for the user.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3groupnameNew name for the group.
4newnameUpdated contact name.
5newnumberUpdated contact number for the corresponding contact name.
6oldnameContact name which has to be updated.
7oldnumberCorresponding contact number which has to be updated.

Response

Sr. No.Error CodeDescription
11701Success, Contact has been updated successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41706Bad Destination. Contact number given by the user is invalid.
51710Unknown Error.
61712Database Error.
7101Operation Failed. Because of some internal error, contact update operation failed.
8103Group Not Found. Group into which contact has to be updated not found for the given user.
9104No Record Found. Given contact name to be updated not found in the given group for the given user.
10105Contact Exists. Contact name to be updated already exists in the specified group for the given user.

deleteContact

This method will delete the specified contact details from the given group for the provided user. It will first check if the contact is present or not and then will delete it.

Request Parameters

Sr. No.Parameter NameDescription
1usernameName of the user.
2passwordPassword for the respective user.
3groupnameNew name for the group.
4contactsContacts which have to be deleted. It is possible to delete more than one contact at a time; the user has to pass contactname,contactnumber|contactname,contactnumber|……

Response

Sr. No.Error CodesDescription
11701Success, Contact has been deleted successfully.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6103Group Not Found. Group from which contact has to be deleted not found for the given user.
7104No Record Found. Given contact name to be deleted not found in the given group for the given user.

getContact

This method returns the contacts present in the given group for the specified user.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3groupnameNew name for the group.

Response

Sr. No.Error CodeDescription
1-In case of success, contacts would be returned as contactname,contactno|contactname,contactno|…
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.
6103Group Not Found. Group from which contacts has to be retrieved not found.
7104No Record Found. No contacts found in the specified group.

sendSingleMessage

This method sends a single message to the specified destination.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3senderSource of the message.
4destinationDestination to which message has to be sent.
5messageMessage content.
6typeType of the message.
0: Text
1: Flash
2: Unicode
6: Unicode Flash
7urlUsed when message type=4. In case of other types, it can be blank.

Response

Sr. No.Error CodeDescription
1-In case of successful message sending, 1701|destination:messageid would be returned as response.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41704Bad Type. Specified type is invalid. Please check the type values given in the 'Request Parameters' table above.
51705Bad Message. Message provided might be empty or null.
61706Bad Destination. Destination number given by the user is invalid.
71707Bad Source. Message source given is invalid.
81710Unknown Error.
91712Database Error.

sendBulkMessage

This method is used to send bulk messages. More than one destination can be given at a time. The only requirement is that every destination has to be on a new line.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3senderSource of the message.
4destinationDestination to which message has to be sent. More than one destination has to be given on a new line.
5messageMessage content.
6typeType of the message.
0: Text
1: Flash
2: Unicode
6: Unicode Flash
7urlUsed when message type=4. In case of other types, it can be blank.

Response

Sr. No.Error CodesDescription
11701Success. Bulk message has been loaded successfully on the server. Will get processed in some time.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41704Bad Type. Specified type is invalid. Please check the type values given in the 'Request Parameters' table above.
51710Unknown Error.
61712Database Error.
7101Operation Failed. Bulk message sending operation failed for some internal reasons.

getCreditDetails

This method returns the balance of the given user account.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.

Response

Sr. No.Error CodeDescription
1-In case of success, balance of the account would be returned as response.
21702Bad URL. Means one of the parameters is missing.
31703Bad Username Password. Means user authentication failed.
41710Unknown Error.
51712Database Error.

getSender

This method returns sender names for the respective username.

Request Parameters

Sr. No.ParameterDescription (Values should be URL Encoded)
1usernameName of the user.

Response

Sr. No.Error CodeDescription
1-In case of success, sender from database is returned.
2BAD_URLOne of the parameters is missing.
3NOT_EXISTSNo record found. No sender found for that particular username.
4DB_ERRORDatabase Error.
5ERRORUnknown Error.

sendGroupMessage

This method is used to send a group message.

Request Parameters

Sr. No.ParameterDescription
1usernameName of the user.
2passwordPassword for the respective user.
3messageMessage to be sent.
4typeType of the message.
0: Text
1: Flash
2: Unicode
3: Binary
4: WAP
6: Unicode Flash
5groupnameName of group.
6sourceSource of message.
7urlUsed when message type=4. In case of other types, it can be blank.

Response

Sr. No.Error CodesDescription
11701Message sent successfully.
21702One of the parameters is missing.
31703Bad Username Password. This means user authentication failed.
41704Message type is invalid.
51705Invalid message.
61706Invalid destination.
71707Invalid sender.
81710Unknown Error.
91915Group name not present.
101916Destination not available for given group name.

scheduleMessage

This method is used to schedule a message.

Request Parameters

Sr. No.ParameterDescription (Values should be URL encoded)
1usernameName of the user.
2passwordPassword of the respective user.
3messageMessage to be sent.
4destinationDestination to which the message is to be sent. More than one destination needs to be separated by a comma (,).
5typeType of the message.
0: Text
1: Flash
2: Unicode
3: Binary
4: WAP
6: Unicode-Flash
6sourceSource of the message.
7scheduledateScheduled date for the message. Date needs to be in the following format:
MM/DD/YYYY
MM: Examples of month: 01,12
DD: Examples of date: 01,18,30
YYYY: Example of year: 2013
Example of scheduledate: 03/03/2013
8scheduletimeScheduled time for the message. Time needs to be in the following format:
hh:mm am/pm
hh: Hours range from 00 to 12
mm: Examples of minutes: 00, 15, 30
am/pm: one of (am) or (pm)
Example of scheduletime: 03:45 am OR 11:51 pm
9gmtGMT +hh:mm OR GMT -hh:mm OR +hh:mm OR -hh:mm
hh: Hours range from 0 to 12
mm: Examples of minutes: 00 or 30
Example: GMT +1:30 OR -10:00
10urlURL is used in case of type=4 messages. In other cases, it can be kept empty.

Response

Sr. No.Error CodeDescription
11701Message scheduled successfully.
21702One of the parameters is missing.
31703User authentication has failed.
41704Invalid message type.
51705Invalid message.
61706Invalid destination.
71707Invalid sender.
81710Unknown error.
91902Bad schedule date.
101904Bad schedule time.
111903Invalid GMT.
121905Invalid date and time OR date and time is already past.

groupSchedule

This method is used to schedule a group message.

Request Parameters

Sr. No.ParameterDescription (Values should be URL encoded)
1usernameName of the user.
2passwordPassword of the respective user.
3groupnameName of group.
4messageMessage to be sent.
5typeType of the message.
0: Text
1: Flash
2: Unicode
3: Binary
4: WAP
6: Unicode-Flash
6sourceSource of the message.
7scheduledateScheduled date for the message. Date needs to be in the following format:
MM/DD/YYYY
MM: Examples of month: 01,12
DD: Examples of date: 01,18,30
YYYY: Example of year: 2013
Example of scheduledate: 03/03/2013
8scheduletimeScheduled time for the message. Time needs to be in the following format:
hh:mm am/pm
hh: Hours range from 00 to 12
mm: Examples of minutes: 00, 15, 30
am/pm: one of (am) or (pm)
Example of scheduletime: 03:45 am OR 11:51 pm
9gmtGMT +hh:mm OR GMT -hh:mm OR +hh:mm OR -hh:mm
hh: Hours range from 0 to 12
mm: Examples of minutes: 00 or 30
Example: GMT +1:30 OR -10:00
10urlURL is used in case of type=4 messages. In other cases, it can be kept empty.

Response

Sr. No.Error CodeDescription
11701Message scheduled successfully.
21702One of the parameters is missing.
31703User authentication has failed.
41704Invalid message type.
51705Invalid message.
61707Invalid sender.
71710Unknown error.
81902Bad schedule date.
91904Bad schedule time.
101903Invalid GMT.
111905Invalid date and time OR date and time is already past.
121915Group name not present.
131916Destination not available for given group name.

getDlr

This method returns DLR information of a given messageid.

Request Parameters

Sr. No.ParameterDescription (Values should be URL encoded)
1usernameName of the user.
2passwordPassword for the respective user.
3messageidMessage Id of the message whose DLR information is to be returned.

Response

Sr. No.Error CodeDescription
1-In case of success, dlr info would be returned as sender|mobileno|status|dtSubmit|dtDone|costPerSms|charge|errorExpression; (one entry per line).
21702Bad URL. This means one of the parameters is missing.
31710Unknown Error.
4104No Record Found. No messageid found for particular username.

updateDlr

This method deletes the record of the given messageid.

Request Parameters

Sr. No.ParameterDescription (Values should be URL encoded)
1usernameName of the user.
2passwordPassword for the respective user.
3messageidMessage Id of the message whose record is to be deleted.

Response

Sr. No.Error CodeDescription
11701In case of success, records are deleted.
21702Bad URL. This means one of the parameters is missing.
31710Unknown Error.
4104No Record Found. No messageid found for particular username.

Error Codes

Error CodeDescription
101Operation Failed.
102Group Exists.
103Group Not Found.
104No Record Found.
105Contact Exists.
1701Success.
1702Bad Type.
1703Bad Username Password.
1704Bad Type.
1705Bad Message.
1706Bad Destination.
1707Bad Source.
1710Unknown Error.
1712Database Error.
1901Bad Content Type.
1902Bad Schedule Date.
1903Bad GMT.
1904Bad Schedule Time.
1905Bad Schedule Timestamp.
1913Too many requests.
1914Invalid date.
1915No Group available.
1916No Contacts available.


Did this page help you?