Which of these APIs can I use?

Startbeitrag von issah am 20.10.2013 14:14


In a bit of a bind. Need to use an API to access an internet SMS provider. They provide HTTP API using class files for java, python, php and C#. Is it possible to load any of these for use with windev 16?




Hi Issah

all of these are NOT different APIs, just examples on how to call THE http api from different languages...

So NO, you cannot directly use the examples, you have to look at the api description (documentation) and possibly at those examples for clarification, but you have to do the calls directly in wlanguage, most probably using httprequest, as it is an http api

Best regards

von Fabrice Harari - am 20.10.2013 14:40
Thanks Fabrice....
These api's, ocx's and .nets have always been my weakest link.

I went through the sample programs and they all load the class files in order to expose the various methods and properties so I am assuming that unless the library is loaded, I will not have access to those methods and properties.

BTW it says the java classes are JSON compatible....

Was thinking of running the java sample using javaload and javaexecute.....but hey, open to all suggestions.



von issah - am 20.10.2013 15:24
Hi issah,

another simplest method to send sms ( for low budget only) , is using 3G/GMS modem.
just google and you will find alot instruction .

i used before on my 3G modem with 3G data plan only . somehow i still able to send sms and no extra charge on monthly bills . not sure if what i did is illegal or not .:rp:

von CCC2 - am 21.10.2013 07:06

I have been using modems successfully for sometime now but they are slow and problematic...especially in a networked environment. When you take the modem out...in all likelihood the comm port will change etc.


von issah - am 21.10.2013 21:38

Just like you I am not able to convert a software that is centered around SMS feature to WD just because I am not able to find any reliable library that will work in WD without any problems. :(

von Yogi Yang - am 23.10.2013 14:18

That's surprising.. .A simple "sms windev webdev" search in google gives me several working solutions, including full components already written...

I agree that some of most of these results are in french, but google translate is your friend

Best regards

von Fabrice Harari - am 23.10.2013 14:59
Thanks to you all. @Fabrice, I understand that many of the HTTP connection methods are simple, unfortunately my preferred provider has his own API which forces you to use his classes that are written in java, c# etc.

Will find time to try and load his java classes and see if the properties and methods are exposed; otherwise I may have to just change provider.



von issah - am 26.10.2013 03:33
Hi Issah

either we are not talking about the same thing, or we have a comprehension problem here... In your original post, you said:

"They provide HTTP API using class files for java, python, php and C#. I"

if it is an HTTP API, then you can (and should)à access it using httprequest... All the classes and examples they are providing (like everybody who provides an http api) are EXAMPLE in several languages doing exactly that (encapsulating the equivalent of what we call httprequest in wlanguage)

So, either your original statement is incorrect, or your comprehension of how this system work is... Or I do not understand what your problem is :-)

Best regards

von Fabrice Harari - am 28.10.2013 13:24
Hello Fabrice and thanks for coming back...

I also mentioned having a weak link......why dont you have a quick peek at the documentation here: http://www.panaceamobile.com/wp-content/uploads/2012/09/Panacea-Mobile-SMS-API-Integration-Guide.pdf

Tell me what you think.....


von issah - am 28.10.2013 23:56
Hi Issah

just on the first page:
"Requests can be sent using HTTP"

which means that you can use httprequest, exactly as I was describing it.

Then further, they say:
Sending a request via HTTP
You now need to decide what action you want your application to perform with
your Panacea Mobile account.
You can browse our API reference guide at the address below for a list of actions that can be performed over HTTP. The reference list will show you how the requests should be formatted.
API Reference List


Best regards

von Fabrice Harari - am 29.10.2013 12:08
Mea culpa....I did say I have a weakness.:D

Will look again and give it a try. Would be grateful if you could help me with one command so I get the hang of it.

Will get back to you.



von issah - am 29.10.2013 23:03

As you have said before they are providing JAVA class so I think you should be able to use that in WD.

Try it this way....


von Yogi Yang - am 31.10.2013 11:29
Hi Issah,

I would advise you to use Fabrice's suggestion, using JAVA seems silly if you can use native wLanguage.
To get you started I looked up a little function that I used years ago to send an sms using Clickatell:
FUNCTION smsSend(sMessage,sTelNr)
sUrl,sMcode,sRcode,sRequest,x,sMessEncoded are string

IF OnTestMode() THEN RESULT False
IF sTelNr="" THEN RESULT False

x=Replace(sTelNr," ","")
x=x[[ 2 TO ]]

IF HTTPRequest(sRequest) THEN
IF Left(x,3)="ERR" THEN
ELSE IF Left(x,2)="OK" OR Left(x,2)="ID" THEN

The proc_Urlencode can be replaced with the function UrlEncode that was not available at the time.
Nowadays I would use stringbuild to make the request, but again, that was not available at the time or not gotten to my attention yet.
You just need to adapt the code a little bit to the rules for your specific api.


von Piet van Zanten - am 31.10.2013 23:10
This is to inform all those had a look at and was or was not able to help me with this issue. Got it working sometime ago and was able to extend it. Special thanks to Fabrice and especially Piet whose sample code really got me going.



von issah - am 07.12.2013 19:30
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.