Please advise if you can.
I am creating an SMS web services API that will allow people to send SMS to their phone numbers. The request will be sent to the interface, then we will process this request based on the provided account information and loans available in their account.
We have two proposed XML structures for requesting an interface, and I would like you to advise which one is better, since we are going to swallow each other about it.
Interface A
print("<?xml version = "1.0" encoding="UTF-8" standalone="yes"?> <Message version="1.0"> <ClientID>11111</ClientID> <PassPhrase>shjfkh</PassPhrase> <Request Type="sms" Refno="10" ToAddress="27732687745332"> <Content> hello world </Content> </Request> </Message> ");
Interface B
print("<?xml version = "1.0" encoding="UTF-8" standalone="yes"?> <Message> <mmtag name="Version">1.0</mmtag> <mmtag name="ClientID">1001</mmtag> <mmtag name="RefNO">120</mmtag> <mmtag name="Encoding">base64</mmtag> <mmtag name="Type">SMS</mmtag> <mmtag name="Content">hello world</mmtag> <mmtag name="MSISDN">27781010102</mmtag> </Message>");
Now, looking at two examples that you think are best suited for our API, regardless of the technology at the back. Please support your answer if you select it.
source share