From: Sherlock on 18 Nov 2009 06:44 Gary This is one way to do a POST... in VO2.8 Phil McGuinness CuserName := "howdy" cpasword := "howdyagain" cHost := "onlinesms.smsplace.com" cSMSMessage := "this is some SMS stuff..." nPort := 443 // https in this case.. but normally port 80 // sRequest := [&xmlApi=<?xml version="1.0" encoding="UTF-8"?>] + CRLF + [<sms>] + CRLF + ; [<authentication user="] + cUserName + ["] + CRLF + ; [ password="] + cPassword + [" client_app="OnlineSMS">] + CRLF + ; //"xmlApi" !!! [<product name="Desktop XML API" />] + CRLF + [</authentication>] + CRLF + ; [<message type="text" responseDetail="3" ] + CRLF + [replyPath="EmailAddress" action="send">] + CRLF + ; [<content>] + AllTrim( cSMSMessage) + [</content>] + CRLF + ; [<message to="] + AllTrim(cRecipientMobile) + ["/>] + CRLF + [</ message>] + CRLF + [</sms>] + CRLF oHttp := cHttp{ "TestSMS", nPort } IF oHttp:ConnectRemote( SELF:cHost ) IF oHttp:OpenRequest( "POST", "/xmlapiclient", INTERNET_FLAG_RELOAD + ; INTERNET_FLAG_SECURE + INTERNET_FLAG_IGNORE_CERT_CN_INVALID + NTERNET_FLAG_IGNORE_CERT_DATE_INVALID ) ENDIF ENDIF // sHeaders:= "Content-Length: " + NTrim(SLen(sRequest)) + CRLF + "Accept- Language: en" + CRLF + ; "Connection: Keep-Alive" + CRLF + "Content-Type: application/x-www- form-urlencoded" + CRLF // pBuffer := StringAlloc( sRequest ) oHttp:SendRequest( sHeaders, pBuffer, SLen(sRequest) ) MemFree( pBuffer ) // cResponseData := oHttp:GetResponse() // oHttp:CloseRequest() oHttp := NULL_OBJECT
From: Gary Miller on 18 Nov 2009 13:38 Thanks everyone for your help. As it turns out I can use a web service interface instead. Gary
From: Geoff Schaller on 19 Nov 2009 02:29
Gary, This is often the best way because if the interface changes, it is relatively easy to alter to VO code accordingly. And the web service can thus be used equally from VO, C#, VB or whatever. Geoff "Gary Miller" <gary(a)lucero.com> wrote in message news:0bXMm.18993$ky1.13934(a)newsfe14.iad: > Thanks everyone for your help. As it turns out I can use a web service > interface instead. > > Gary |