Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

SOAP?

Options
  • 29-04-2009 8:44pm
    #1
    Registered Users Posts: 8,070 ✭✭✭


    Need to send batch sms , around 35k,
    but apparently the provider doesnt support this for PHP,

    but it does for SOAP,
    http://www.esendex.com/en/Developers/APIs/SOAP-XML-SMS-API/

    can anyone just briefly tell me what this is ? trying to look online but its going over my head, will the file be saved as .xml and could i use it in conjunction with php or something?

    thanks


Comments

  • Registered Users Posts: 7,182 ✭✭✭Genghiz Cohen


    SOAP AFAIK is just a way of wrapping up info in an XML file in a pretty standard cross platform manner.(super tired, answer may be wrong)


  • Registered Users Posts: 8,070 ✭✭✭Placebo


    thanks, gathered that but how exactly can it [eg sms info - sending] be executed?


  • Registered Users Posts: 18,272 ✭✭✭✭Atomic Pineapple


    SOAP is a standard way of creating a web service.

    An alternative is REST, SOAP involves wrapping the xml up with other information in a "envelope" that is platform, language and environment independent.

    So the developer is providing the service in the form of SOAP, so all you have to do is follow the SOAP protocol to create your application, I'm not sure but you should actually be able to do it in php


  • Closed Accounts Posts: 5,029 ✭✭✭um7y1h83ge06nx


    Hi, I had a quick look at the link, the required WSDL's appear to be there so that's good.

    Firstly, you should probably check out about WSDLs if you're not familiar with them already:

    http://en.wikipedia.org/wiki/Web_Services_Description_Language

    Do a bit of reading about Web Services and you'll be fine.

    The big issue is whether all this is possible in PHP, any Web Services I have worked on, have been developed in Java EE.

    Hang on, you might be okay:

    http://webservices.xml.com/pub/a/ws/2004/03/24/phpws.html

    http://uk2.php.net/soap

    Hope this helps.


  • Registered Users Posts: 6,465 ✭✭✭MOH


    At the end of the day it's just XML, so once you can pass an XML request formatted in the expected manner, and parse the response, you should be able to do it. (If it can be done in iSeries COBOL, php should be a breeze!).


  • Advertisement
  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    www.soapui.org

    You can get a free program there called SoapUI. Create a new project in it and and point it to the WSDL file.

    The WSDL file is XML that describes how you talk to the web service. SoapUI will create a sample SOAP message you can send to the webservice.

    You can fill that out and test it and it will show you the response you get back.

    After that it is just a matter of crafting your XML Soap message and reading the response.

    Most programming languages these days though will read a WSDL file and create an object for you to talk to the web service so you don't even have to mess with XML code at all. For example Apache Axis WSDL2Java will convert the WSDL file into java for you.

    But it is good to see whats going on in the background.

    For PHP found this:
    http://webservices.xml.com/pub/a/ws/2004/03/24/phpws.html?page=1

    Not sure if its any good though (I don't do PHP)


  • Registered Users Posts: 163 ✭✭stephenlane80


    Hi,

    If you want to send an sms then you need to send an asynchronous xml saop message to the providers service, i.e. there is no reply

    You can do this long hand by creating an HTTP header that contains the XML request message, but it is easier to use the PHP SOAP api. With the SOAP api installed you could use:
    public string SoapClient::__doRequest  ( string $request  , string $location  , string $action  , int $version  [, int $one_way= 0  ] )
    
    Details of the parameters are here:
    http://ie2.php.net/manual/en/soapclient.dorequest.php

    If the providers SOAP function returns a value then it will be returned from the doRequest function call as a string encoded SAOP meassage.

    Like a previous poster mentioned the format of the SOAP messages is described in the providers WSDL document.

    This page describes the format of WSDL files in detail:

    http://www.web-services-forum.com/index.php/Web_Service_Description_Language


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    SOAP AFAIK is just a way of wrapping up info in an XML file in a pretty standard cross platform manner.(super tired, answer may be wrong)

    For a very liberal definition of 'standard', more or less.

    It's a rather unpleasant example of an RPC system, XML-backed. You should be able to use it from PHP, with some annoyance. Look for PHP SOAP libraries.


  • Closed Accounts Posts: 1 neilkilbride


    Placebo,

    I work for Esendex as a developer and I was alerted to yyour post by one of our sales team to see if I could help you out at all.

    Currently we are working on a new Beta PHP SDK (SMS + VOICE) to interact with our new ReST API (SMS + Voice). This new API will supersede our SOAP API and supports message batches. Although we currently don’t make use of this in the new SDK, we could add the functionality for you and send it to you. Alternatively, we could send you info about the ReST API and you could interact directly with that or another option would be for you to extend the SDK yourself (it is open source) if you need a quick turn-around. This is probably the best option and should be quite a simple job for a PHP developer.


    If you wished you could interact with the SOAP SMS XML API too. A couple of years ago the PHP SOAP libraries weren’t much to talk about but maybe they are better these days?

    Let us know your thoughts and we’ll get some more info over to you ASAP.

    Neil :)


Advertisement