The AMS Developer API is provided as a SOAP web service. The XML types are defined in a separate XSD schema.
The XSD schema is defined here: https://api.ams.io/ws/v5/AMSWebService?xsd=AMSWebServicev5.xsd
The WSDL for the SOAP service is located here: https://api.ams.io/ws/v5/AMSWebService?wsdl.
All methods in the API require the use of your account API Key and secret Key for authentication. These can be found on the settings page of the AMS web application after you have logged in.
The process for authentication is the same for all methods and requires the generation of a hash using the method outlined below.
Authentication
All methods required these parameters as part of the request:
Parameter |
Type |
Value |
ApiKey |
String |
Can be found in the Account Settings section of the AMS web application. Must be in lower case. |
Timestamp |
DateTime |
Current Time in UTC. Must be within 15 minutes of the AMS server otherwise the request is rejected. |
Signature |
String |
HMAC-SHA256 signature of ‘AMSWebService’ + operation name + current time in utc formatted as ‘yyyy-MM-ddTHH:mm:ss.fffZ’ signed using your accounts secret key. |
Example of creating the Signature for the GetMessages operation in C# using .Net 4.0
using System.Security.Cryptography;
0
1
2
3
4
|
var now = DateTime.UtcNow;
HMAC signer = new HMACSHA256(Encoding.UTF8.GetBytes("<your accounts secret key>"));
string sigString = "AMSWebServiceGetMessages" + now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
byte[] toSign = Encoding.UTF8.GetBytes(sigString);
string signature = Convert.ToBase64String(signer.ComputeHash(toSign));
|
Sending and Receiving Messages
The are two main methods in the API which centre around sending and receiving AMS messages.
Sending Messages
method: SendMessages
Sending messages basically involves sending an array of Message XML objects. Each message can be sent to one or more mobile accounts or
groups. You need to include the template ID of the message to be sent which can be obtained from the “Edit Template” page of the web application. You can also use the “external name” attribute of the template which can be more convenient and easier to remember than the ID. The server will look first for a template matching the ID then the external name. If no template is found, a fault will be returned.
The next main part is a list of addresses. These can be of user or group type (more info is available in the XSD docs). The value for an address should be the username of the target mobile account. The main part to deal with is the message content element. This element contains the XML content of the message you are trying to send. The Message XML Format section has more
information on determining what the XML equivalent structure of a message is for a given template. Basically, you encapsulate the XML for your message inside the message content element.
Request Values
Parameter |
Type |
Value |
ApiKey |
String |
Can be found in the Account Settings section of the AMS web application. Must be in lower case. |
Timestamp |
DateTime |
Current Time in UTC. Must be within 15 minutes of the AMS server otherwise the request is rejected. |
Signature |
String |
HMAC-SHA256 signature of ‘AMSWebService’ + ‘SendMessages’ + current time in utc formatted as ‘yyyy-MM-ddTHH:mm:ss.fffZ’ signed using your accounts secret key. |
Message |
Message array |
One or more Message objects. |
TestMode |
Boolean |
An optional parameter. If true the new message will be available only to the specified Mobile Accounts when they are in Test Mode. This can be enabled on a per Mobile Account basis within the web application |
Message types are used when sending and receiving. When sending only these parameters are used:
Parameter |
Type |
Value |
TemplateId |
String |
Template UUID or External Name. This template will be the one use to parse the Content XML. |
CustomId |
String |
This is a value that you can associate with the created Messages. It is returned to you in the response for this request along with the AMS ID for the message that was sent. It is not saved in AMS and only lasts for the duration of the request. It can be useful for associating your own internal ids with the resulting message id for matching reply messages or for tracking multiple messages created for one send request. |
Address |
Array of Address values |
Use either mobile account usernames or tags for group sending. Can have as many addresses as required. Each recipient receives a distinct messages with it’s own id but the same content. |
Content |
MessageContent type |
This is where the XML for the message goes. The Message XML Format section has more information on determining what the XML equivalent structure of a message is for a given template. |
Return Values
Parameter |
Type |
Value |
Status |
Status type, contains code (int) and description (string) properties. |
See table below |
MessageResult |
MessageResult type Array |
A list of message result types. A MessageResult contains the MessageId and the CustomId used in the request (if specified) When a Message is retrieved via the GetMessages operation that was a reply to one that was sent using this method it’s ReplyId should match the MessageId returned at this point. |
Status Code |
Status Description |
0 |
message sent ok |
1 |
invalid api key |
2 |
request error (e.g. signature verification failure) |
21 |
invalid address |
22 |
requested template not found |
23 |
message content not parseable |
24 |
template not assigned to addressee |
3 |
internal server error |
Faults
Fault Name |
Cause |
ValidationError |
Thrown if the message content XML doesn’t match the expected format for the template. |
GeneralError |
Thrown if any other exception is encountered during the request, such as a network error. |
C# Example
Example in C# using a Web Service client generated using .Net 4.0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Xml;
using System.Security.Cryptography;
using System.IO;
namespace AMSWebServiceExampleClient
{
class Program
{
static void Main(string[] args)
{
var client = new AMSWebServiceReference.AMSWebServiceClient();
var xml = XElement.Parse(
@"<timesheet>
<name>John Smith</name>
<day>Monday</day>
</timesheet>
");
var doc = new XmlDocument();
var sendXml = doc.ReadNode(xml.CreateReader()) as XmlElement;
var request = new AMSWebServiceReference.SendMessagesRequest();
request.ApiKey = "<your api key>";
var now = DateTime.UtcNow;
request.Timestamp = now;
HMAC signer = new HMACSHA256(Encoding.UTF8.GetBytes("<your secret key"));
string sigString = "AMSWebServiceSendMessages" + now.ToString("yyyy-MM-ddTHH:mm:ss.fffZ");
byte[] toSign = Encoding.UTF8.GetBytes(sigString);
string signature = Convert.ToBase64String(signer.ComputeHash(toSign));
request.Signature = signature;
var msg = new AMSWebServiceReference.Message();
msg.TemplateId = "<target template id>";
var address = new AMSWebServiceReference.Address();
address.Value = "<mobile account username>";
address.Type = ServiceReference.AddressType.user;
List<AMSWebServiceReference.Address> addresses = new List<AMSWebServiceReference.Address>();
addresses.Add(address);
msg.Address = addresses.ToArray<AMSWebServiceReference.Address>();
msg.CustomId = "<optional internal id>";
msg.Content = sendXml;
List<AMSWebServiceReference.Message> msgs = new List<AMSWebServiceReference.Message>();
msgs.Add(msg);
request.Message = msgs.ToArray<ServiceReference.Message>();
var response = client.SendMessages(request);
Console.Out.WriteLine(response.Status);
Console.Out.WriteLine(response.MessageResult);
if (response.MessageResult.Count() > 0)
{
foreach(AMSWebServiceReference.MessageResult mr in response.MessageResult) {
Console.Out.WriteLine("MessageId: {0} - CustomId: {1}", mr.MessageId, mr.CustomId);
}
}
Console.Out.WriteLine("finished");
}
}
}
|
Receiving Messages
method: GetMessages
Getting messages is essentially the reverse of the sendMessages method. The response will contain a list of all new messages, if any, encoded as Message objects. Apart from indicating which template the messages are related to and who sent them, they will contain a message content element which will contain the message’s XML representation along with some additional meta data. The Message XML Format section has more information on determining what the XML equivalent structure of a message is for a given template.
Request Values
Parameter |
Type |
Value |
ApiKey |
String |
Can be found in the Account Settings section of the AMS web application. Must be in lower case. |
Timestamp |
DateTime |
Current Time in UTC. Must be within 15 minutes of the AMS server otherwise the request is rejected. |
Signature |
String |
HMAC-SHA256 signature of ‘AMSWebService’ + ‘GetMessages’ + current time in utc formatted as ‘yyyy-MM-ddTHH:mm:ss.fffZ’ signed using your accounts secret key. |
Test Mode |
Boolean |
An optional parameter. If true will only fetch test messages. Test messages are those that have been sent from Mobile Accounts whilst they are in Test Mode. |
Return Values
Parameter |
Type |
Value |
Status |
Status type, contains code (int) and description (string) properties. |
0 method completed ok. 1 api key invalid. 2: request error (e.g. signature verification error). 3 internal server error |
Message |
Message array |
One or more Message objects. |
Message types are used when sending and receiving. When receving these parameters are used:
Parameter |
Type |
Value |
MessageId |
String |
The AMS message id |
TemplateId |
String |
Template UUID or External Name. This template will be the one use to parse the Content XML. |
Address |
Array of Address values |
This will be the mobile account that sent the message |
ReplyTo |
String |
If this message was a reply to another message this will be the ID of the source message. |
Created |
DateTime |
The time the message was received at the AMS gateway. |
Resent |
Boolean |
Indicates if this message was resent from the mobile device. |
SentFromDevice |
DateTime |
The time when the message was first attempted to be sent from the mobile device. At delay between this and the Created time on the server can occur due to data network coverage issues or device problems. |
Content |
MessageContent type |
This is where the XML for the message goes. The Message XML Format section has more information on determining what the XML equivalent structure of a message is for a given template. |
Longitude |
Double |
The Longitude that the message was sent from, if collected by the device. |
Latitude |
Double |
The Latitude that the message was sent from, if collected by the device. |
Tag |
Tag array |
The tags associated with this message. |
Faults
Fault Name |
Cause |
GeneralError |
Thrown if any other exception is encountered during the request, such as a network error. |
Checking Message Status
method: CheckMessageStatus
This method allows you to check on the current status of a sent message.
Request Values
Parameter |
Type |
Value |
ApiKey |
String |
Can be found in the Account Settings section of the AMS web application. Must be in lower case. |
Timestamp |
DateTime |
Current Time in UTC. Must be within 15 minutes of the AMS server otherwise the request is rejected. |
Signature |
String |
HMAC-SHA256 signature of ‘AMSWebService’ + ‘CheckMessageStatus’ + current time in utc formatted as ‘yyyy-MM-ddTHH:mm:ss.fffZ’ signed using your accounts secret key. |
MessageId |
String Array |
One or more message IDs to check on. |
Return Values
Parameter |
Type |
Value |
|
Status |
Status type, contains code (int) and description (string) properties. |
Status Code 0 method completed ok, 1 invalid api key, 2 request error (e.g. signature verification error), 3 internal server error |
|
MessageStatus |
Array of MessageStatus objects |
Each MessageStatus object contains the requested message id, its status and if available the time the message was delivered to the device. |
“Awaiting Delivery” means that the message has been received by the gateway but has not be downloaded to the mobile device. “Delivered To Device” means that the user has downloaded this message and it is considered delivered and is eligible for deletion in the future. |
Faults
Fault Name |
Cause |
GeneralError |
Thrown if any other exception is encountered during the request, such as a network error. |
The structure of XML representation of a message is determined by the external label and collection external label values used when creating thetemplate for that message. To assist in the development of tools to parse this XML, a sample of the XML produced by a particular template is shown on the “Tools” section of the “Edit Template” page.
Example XML From “Tools” section of the “Edit Template” page
Lists
method: ModifyList
This method allows you to alter the content of a List.
Request Values
Parameter |
Type |
Value |
ApiKey |
String |
Can be found in the Account Settings section of the AMS web application. Must be in lower case. |
Timestamp |
DateTime |
Current Time in UTC. Must be within 15 minutes of the AMS server otherwise the request is rejected. |
Signature |
String |
HMAC-SHA256 signature of ‘AMSWebService’ + ‘ModifyList’ + current time in utc formatted as ‘yyyy-MM-ddTHH:mm:ss.fffZ’ signed using your accounts secret key. |
ListId |
String |
The id of the list to modify. |
ModificationType |
ModificationType type |
Currently only Replace is supported. |
Items |
Array of ListItem types. |
Each list item is the XML content representing the value of an item in the list. The format of the XML should be the sample for messages. |
Return Values
Parameter |
Type |
Value |
Status |
Status type, contains code (int) and description (string) properties. |
0 method completed ok, 1 api key invalid, 2 request error (e.g. signature verification error), 3 internal server error |
Faults
Fault Name |
Cause |
GeneralError |
Thrown if any other exception is encountered during the request, such as a network error. |
Common Errors
Most errors that occur using the API are related to signature generation. Things to check include:
- Confirm that the timestamp that was used to generate the signature is the same one that is passed in the method call
- Check the the correct method name is being included in the signature
Some .Net specific issues:
If you receive an error like “The remote server returned an unexpected response: (417) Expectation” this may be caused by the ‘Expect: 100-continue’ http header being present. To resolve you can:
Try adding this to your web.config or app.config
<configuration>
<system.net>
<settings>
<servicePointManager expect100Continue="false" />
</settings>
</system.net>
</configuration>
Alternatively set the ServicePointManager.Expect100Continue property to false (see http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx )
XML Schema
This is the current version of the XSD schema that defines the types used in the above methods:
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
|
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
xmlns:tns="http://api.ams.io/soap/v2/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://api.ams.io/soap/v2/"
elementFormDefault="qualified">
<xsd:element name="GetMessages">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string"/>
<xsd:element name="Filter" type="tns:SearchFilter" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="FilterOperator" type="tns:LogicalOperator" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetMessagesResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="xsd:string"/>
<xsd:element name="Message" type="tns:Message" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SendMessages">
<xsd:annotation>
<xsd:documentation>
Use to send AMS messages to mobile devices.
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string"/>
<xsd:element name="Message" type="tns:Message" maxOccurs="unbounded" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SendMessagesResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="xsd:string"/>
<xsd:element name="MessageResult" type="tns:MessageResult" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CheckMessageStatus">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string"/>
<xsd:element name="MessageId" type="xsd:string" maxOccurs="unbounded" minOccurs="1" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CheckMessageStatusResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="xsd:string"/>
<xsd:element name="MessageStatus" type="tns:MessageStatus" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ValidationError" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Thrown when a validation error occurs when
converting XML to message or list data. The element content will
indicate the problem encountered.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
<xsd:element name="GeneralError" type="xsd:string" />
<xsd:element name="ModifyList">
<xsd:annotation>
<xsd:documentation>
Use to change the content of a list
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string"/>
<xsd:element name="ListId" type="xsd:string"/>
<xsd:element name="ModificationType" type="tns:ModificationType"/>
<xsd:element name="Items" type="tns:ListItems"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ModifyListResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="tns:Status" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CreateMobileAccounts">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string" />
<xsd:element name="MobileAccount" type="tns:MobileAccount" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CreateMobileAccountResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="tns:Status" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ModifyMobileAccounts">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string" />
<xsd:element name="MobileAccount" type="tns:MobileAccount" maxOccurs="unbounded" minOccurs="0" />
<xsd:element name="ModificationType" type="tns:ModificationType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ModifyMobileAccountsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="tns:Status" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RemoveMobileAccounts">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="ApiKey" type="xsd:string"/>
<xsd:element name="Timestamp" type="xsd:dateTime"/>
<xsd:element name="Signature" type="xsd:string" />
<xsd:element name="Username" type="xsd:string" maxOccurs="unbounded" minOccurs="0" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="RemoveMobileAccountsResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Status" type="tns:Status" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="Status">
<xsd:sequence>
<xsd:element name="Code" type="xsd:int" />
<xsd:element name="Description" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MobileAccount">
<xsd:sequence>
<xsd:element name="Username" type="xsd:string" />
<xsd:element name="Password" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="DisplayName" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Status" type="tns:MobileAccountStatus" minOccurs="0" maxOccurs="1" />
<xsd:element name="Locked" type="xsd:boolean" minOccurs="0" maxOccurs="1" />
<xsd:element name="DeviceKey" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Templates" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Lists" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="Tags" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="ListFilter" type="tns:ListFilter" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="DefaultData" type="tns:DefaultData" minOccurs="0" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="MobileAccountStatus">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="active"/>
<xsd:enumeration value="inactive"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Message">
<xsd:sequence>
<xsd:element name="MessageId" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="TemplateId" type="xsd:string"/>
<xsd:element name="CustomId" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="Created" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Address" type="tns:Address" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="ReplyTo" type="xsd:string" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Resent" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
<xsd:element name="SentFromDevice" type="xsd:dateTime" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Longitude" type="xsd:double" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Latitude" type="xsd:double" minOccurs="0" maxOccurs="1"/>
<xsd:element name="Content" type="tns:MessageContent"/>
<xsd:element name="Tag" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
<xsd:element name="Attachments" type="tns:Attachments" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MessageContent">
<xsd:sequence>
<xsd:any namespace="##any" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Attachments">
<xsd:sequence>
<xsd:element name="Attachment" type="tns:Attachment" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Attachment">
<xsd:sequence>
<xsd:element name="Id" type="xsd:int"/>
<xsd:element name="Type" type="xsd:string"/>
<xsd:element name="Data" type="xsd:base64Binary" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Address">
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="Type" type="tns:AddressType" use="required"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
<xsd:simpleType name="AddressType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="user"/>
<xsd:enumeration value="group"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="MessageStatus">
<xsd:sequence>
<xsd:element name="MessageId" type="xsd:string"/>
<xsd:element name="Status" type="xsd:string"/>
<xsd:element name="DeliveredToDevice" type="xsd:dateTime" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ListItems">
<xsd:sequence>
<xsd:any namespace="##any" processContents="skip"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="ModificationType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="replace"/>
<xsd:enumeration value="merge"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="ListFilter">
<xsd:sequence>
<xsd:element name="ListId" type="xsd:string"/>
<xsd:element name="Value" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="DefaultData">
<xsd:sequence>
<xsd:element name="TemplateId" type="xsd:string" />
<xsd:element name="Values" type="tns:KeyValuePair" minOccurs="0" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="KeyValuePair">
<xsd:sequence>
<xsd:element name="Key" type="xsd:string"/>
<xsd:element name="Value" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MessageResult">
<xsd:sequence>
<xsd:element name="MessageId" type="xsd:string"/>
<xsd:element name="CustomId" type="xsd:string" minOccurs="0" maxOccurs="1" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="SearchFilter">
<xsd:sequence>
<xsd:element name="FilterBy" type="tns:FilterType"/>
<xsd:element name="ValueType" type="tns:FilterValueType"/>
<xsd:element name="Value" type="xsd:string" minOccurs="1" maxOccurs="unbounded"/>
</xsd:sequence>
</xsd:complexType>
<xsd:simpleType name="FilterType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="template"/>
<xsd:enumeration value="mobileAccount"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="FilterValueType">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="id"/>
<xsd:enumeration value="username"/>
<xsd:enumeration value="tag"/>
<xsd:enumeration value="name"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="LogicalOperator">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="and"/>
<xsd:enumeration value="or"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
### WSDL
This is the current version of the wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://api.ams.io/soap/v2/"
xmlns:tns="http://api.ams.io/soap/v2/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="AMSWebService" >
<wsdl:types>
<xsd:schema
elementFormDefault="qualified"
targetNamespace="http://api.ams.io/soap/v2/">
<xsd:include schemaLocation="AMSWebService.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="GetMessagesRequest">
<wsdl:part element="tns:GetMessages" name="parameters" />
</wsdl:message>
<wsdl:message name="GetMessagesResponse">
<wsdl:part element="tns:GetMessagesResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="SendMessagesRequest">
<wsdl:part element="tns:SendMessages" name="parameters" />
</wsdl:message>
<wsdl:message name="SendMessagesResponse">
<wsdl:part element="tns:SendMessagesResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="CheckMessageStatusRequest">
<wsdl:part element="tns:CheckMessageStatus" name="parameters" />
</wsdl:message>
<wsdl:message name="CheckMessageStatusResponse">
<wsdl:part element="tns:CheckMessageStatusResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="ModifyListRequest">
<wsdl:part element="tns:ModifyList" name="parameters"/>
</wsdl:message>
<wsdl:message name="ModifyListResponse">
<wsdl:part element="tns:ModifyListResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="CreateMobileAccountsRequest">
<wsdl:part element="tns:CreateMobileAccounts" name="parameters"/>
</wsdl:message>
<wsdl:message name="CreateMobileAccountsResponse">
<wsdl:part element="tns:CreateMobileAccountResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="RemoveMobileAccountsRequest">
<wsdl:part element="tns:RemoveMobileAccounts" name="parameters" />
</wsdl:message>
<wsdl:message name="RemoveMobileAccountsResponse">
<wsdl:part element="tns:RemoveMobileAccountsResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="ModifyMobileAccountsRequest">
<wsdl:part element="tns:ModifyMobileAccounts" name="parameters" />
</wsdl:message>
<wsdl:message name="ModifyMobileAccountsResponse">
<wsdl:part element="tns:ModifyMobileAccountsResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="ValidationError">
<wsdl:part element="tns:ValidationError" name="parameters" />
</wsdl:message>
<wsdl:message name="GeneralError">
<wsdl:part element="tns:GeneralError" name="parameters" />
</wsdl:message>
<wsdl:portType name="AMSWebService">
<wsdl:operation name="SendMessages">
<wsdl:input name="SendMessagesRequest" message="tns:SendMessagesRequest" />
<wsdl:output name="SendMessagesResponse" message="tns:SendMessagesResponse" />
<wsdl:fault name="ValidationErrorFault" message="tns:ValidationError" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="GetMessages">
<wsdl:input name="GetMessagesRequest" message="tns:GetMessagesRequest" />
<wsdl:output name="GetMessagesResponse" message="tns:GetMessagesResponse"/>
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="CheckMessageStatus">
<wsdl:input name="CheckMessageStatusRequest" message="tns:CheckMessageStatusRequest" />
<wsdl:output name="CheckMessageStatusResponse" message="tns:CheckMessageStatusResponse" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="ModifyList">
<wsdl:input name="ModifyListRequest" message="tns:ModifyListRequest" />
<wsdl:output name="ModifyListResponse" message="tns:ModifyListResponse" />
<wsdl:fault name="ValidationErrorFault" message="tns:ValidationError" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="CreateMobileAccounts">
<wsdl:input name="CreateMobileAccountsRequest" message="tns:CreateMobileAccountsRequest" />
<wsdl:output name="CreateMobileAccountsResponse" message="tns:CreateMobileAccountsResponse" />
<wsdl:fault name="ValidationErrorFault" message="tns:ValidationError" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="RemoveMobileAccounts">
<wsdl:input name="RemoveMobileAccountsRequest" message="tns:RemoveMobileAccountsRequest" />
<wsdl:output name="RemoveMobileAccountsResponse" message="tns:RemoveMobileAccountsResponse" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
<wsdl:operation name="ModifyMobileAccounts">
<wsdl:input name="ModifyMobileAccountsRequest" message="tns:ModifyMobileAccountsRequest" />
<wsdl:output name="ModifyMobileAccountsResponse" message="tns:ModifyMobileAccountsResponse" />
<wsdl:fault name="ValidationErrorFault" message="tns:ValidationError" />
<wsdl:fault name="GeneralErrorFault" message="tns:GeneralError" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="AMSWebServiceSoapBinding" type="tns:AMSWebService">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SendMessages">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="SendMessagesRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="SendMessagesResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationErrorFault">
<wsdlsoap:fault name="ValidationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetMessages">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="GetMessagesRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetMessagesResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CheckMessageStatus">
<wsdlsoap:operation soapAction="" />
<wsdl:input name="CheckMessageStatusRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
<wsdl:output name="CheckMessageStatusResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ModifyList">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="ModifyListRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="ModifyListResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationErrorFault">
<wsdlsoap:fault name="ValidationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CreateMobileAccounts">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="CreateMobileAccountsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="CreateMobileAccountsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationErrorFault">
<wsdlsoap:fault name="ValidationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="RemoveMobileAccounts">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="RemoveMobileAccountsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="RemoveMobileAccountsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ModifyMobileAccounts">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="ModifyMobileAccountsRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
<wsdl:output name="ModifyMobileAccountsResponse">
<wsdlsoap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ValidationErrorFault">
<wsdlsoap:fault name="ValidationErrorFault" use="literal"/>
</wsdl:fault>
<wsdl:fault name="GeneralErrorFault">
<wsdlsoap:fault name="GeneralErrorFault" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="AMSWebService">
<wsdl:port name="AMSWebServicePort" binding="tns:AMSWebServiceSoapBinding">
<wsdlsoap:address location="http://localhost:9090/amsws/services/AMSWebService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
|