[Tutor] send and receive HTTP POST

shawn bright nephish at gmail.com
Wed Apr 30 20:13:56 CEST 2008


Hey there all,

I have been spending some time trying to get my head around how to
send info by POST and read the result.

These are examples of what i need to read and write .  I think i can
pull off the writing part, but how do i call it?

POST /soap/SMS.asmx HTTP/1.1
Host: api.upsidewireless.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://upsidewireless.com/webservice/sms/Send_Plain"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Send_Plain xmlns="http://upsidewireless.com/webservice/sms">
      <token>string</token>
      <signature>string</signature>
      <recipient>string</recipient>
      <message>string</message>
      <encoding>Seven or Eight or Sixteen</encoding>
    </Send_Plain>
  </soap:Body>
</soap:Envelope>

HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <Send_PlainResponse xmlns="http://upsidewireless.com/webservice/sms">
      <Send_PlainResult>
        <isOk>boolean</isOk>
        <trackingId>string</trackingId>
        <number>string</number>
        <convertedNumber>string</convertedNumber>
        <deferUntilOccursInThePast>boolean</deferUntilOccursInThePast>
        <messageIsEmpty>boolean</messageIsEmpty>
        <tooManyMessages>boolean</tooManyMessages>
        <invalidCountryCode>boolean</invalidCountryCode>
        <isBlocked>boolean</isBlocked>
        <BlockedReason>string</BlockedReason>
      </Send_PlainResult>
    </Send_PlainResponse>
  </soap:Body>
</soap:Envelope>

Thanks for any tips
-shawn


More information about the Tutor mailing list