Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Tip: Use XML to Send SMS Messages

By Nicholas Chase
2005-04-11


Message Responses

Once the message is received and dealt with, the receiver sends a response. If all has gone well, it sends a SuccessResponse, such as:

Listing 5. Sample SuccessResponse











<SOAP:Envelope xmlns:SOAP="http://www.w3.org/2003/05/soap-envelope"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3.org/2003/05/soap-envelope
http://www.w3.org/2003/05/soap-envelope">
<SOAP:Header>
<MMAP:MMAPHeader SOAP:mustUnderstand="1"
xmlns:MMAP="http://www.smsforum.net/schemas/mmap/v1.0"
xsi:schemaLocation="http://www.smsforum.net/schemas/mmap/v1.0
http://www.smsforum.net/schemas/mmap/v1.0/mmap.xsd">
<MMAP:ApplicationContext bodyType="SuccessResponse"
sourceOperationReference="1138"/>
</MMAP:MMAPHeader>
</SOAP:Header>
<SOAP:Body>

<SMAP:SubmitResponse
xmlns:SMAP="http://www.smsforum.net/schemas/smap/v1.0"
xsi:schemaLocation="http://www.smsforum.net/schemas/smap/v1.0
http://www.smsforum.net/schemas/smap/v1.0/smap.xsd">

<SMAP:MessageRef>3263827</SMAP:MessageRef>

</SMAP:SubmitResponse>

</SOAP:Body>
</SOAP:Envelope>
In this case, the body contains a SubmitResponse with a reference number, but no indication of whether the operation succeeded or not. That information resides in the ApplicationContext element, where the bodyType is set as SuccessResponse. The sourceOperationReference refers back to the value provided with the original request, so they can be correlated.



Tutorial Pages:
» Reap the benefits of MMAP and SMAP
» What is SMS?
» SMAP messages
» A Simple MMAP Conversation
» Message Responses
» Other Options
» Resources


First published by IBM developerWorks


 | Bookmark
Related Tutorials:
» Starting with XML
» Performing Client-Side XSL Transformations
» Create a Google Sitemap for your Web Site
» XML and Scripting Languages
» Parsing Comma-Separated Values
» XML Security Suite: Increasing the Security of E-Business