Webservice on Powerbook 12", using Bluetooth through SOAP?

Posted:
in Mac Software edited January 2014
Hello all,



I have the following question, i am currently trying to build a webservice on my local machine ( a powerbook 12" ) which i can use to send SMS / textmessages through my phone using Bluetooth. I was wondering if it would be possible to use the Bluetooth adapter through an API? I searched the forums and Google but nothing really. I am just starting with Mac ( OSX ) development so bear with me, maybe i am not using the correct search terms. I am coming from a Java/WIN32 background, and this is really my first project on the OS X platform. For example, could i use AppleScript? Basically, it boils down to the following questions:



- What is the quickest way to deploy / install a webservice on my powerbook? What servlet engine do you recommend ( or anything else? )

- How can i communicate with the build in BlueTooth adapter using SOAP? IS there an interface, API for it?



Thank you for your time



Owen van Dijk

Comments

  • Reply 1 of 4
    Quote:

    Originally posted by ohwhen

    Hello all,



    I have the following question, i am currently trying to build a webservice on my local machine ( a powerbook 12" ) which i can use to send SMS / textmessages through my phone using Bluetooth. I was wondering if it would be possible to use the Bluetooth adapter through an API?




    No need if you just want to use IP networking (which is what webservices are designed to run over). Let the OS connect then just listen for requests in the service method.



    Quote:

    I am just starting with Mac ( OSX ) development so bear with me, maybe i am not using the correct search terms. I am coming from a Java/WIN32 background



    If you've managed to develop Java on Win32 then you'll have no problems on Mac.



    Quote:

    - What is the quickest way to deploy / install a webservice on my powerbook? What servlet engine do you recommend ( or anything else? )



    Put tomcat in any folder you like, and fire it up using ./startup.sh (rather than the windowsy startup.bat). Write your webservice in Java, compile to a war file and drop in the webapp's folder. You'll be serving on port 8080 by default.



    I recommend Apple's project builder and ant as a development setup. The any scripts that come with Tomcat will allow hot deployment



    I don't use web services but I've done loads of JSP/servlet/EJB development on Mac. I develop my forum's software on my powerbook, and when I'm done I just scp the war file to my Linux webserver and off it goes...



    Quote:

    - How can i communicate with the build in BlueTooth adapter using SOAP? IS there an interface, API for it?



    Why would you want to talk to a hardware device thats connected to your machine with a protocol that allows remote calls to objects over the internet using XML?



    If you want to talk to something connected via bluetooth thats offering an IP connect then just get its IP address. Otherwise SOAP & webservices arn't much use.



    For instance I connect to the web using bluetooth & my phone (GPRS). I could run a webserver on my laptop and people on the web could (theoretically) connect to it and view pages.
  • Reply 2 of 4
    Quote:

    Why would you want to talk to a hardware device thats connected to your machine with a protocol that allows remote calls to objects over the internet using XML?



    If you want to talk to something connected via bluetooth thats offering an IP connect then just get its IP address. Otherwise SOAP & webservices arn't much use.



    For instance I connect to the web using bluetooth & my phone (GPRS). I could run a webserver on my laptop and people on the web could (theoretically) connect to it and view pages.




    it's for an presentation i am doing that needs to be run offline. I am not sure if i have a running internetconnection, so i better be save. I want to present a webservice that shows them how to send an SMS, the underlying architecture is not really important. It needs to be a webservice running on SOAP because that's where the presentation will be about, currently i found no hooks whatsoever on connection to the Bluetooth adapter, it has no API or interface with Applescript, Perl, C or Java.



    This is my idea, i have a page that has a simple form on it, when i hit send, it will connect to my local webservice, that sends the SMS through Bluetooth and returns a succes or fail response, that will be shown on the screen. That's about it.



    thx for the reply
  • Reply 3 of 4
    Quote:

    Originally posted by ohwhen

    This is my idea, i have a page that has a simple form on it, when i hit send, it will connect to my local webservice, that sends the SMS through Bluetooth and returns a succes or fail response, that will be shown on the screen. That's about it.



    So you have a web browser on your laptop. You click a button on a form, then it connects to a webserver on your local machine triggering code on the webserver that does something with SOAP and sends an SMS message.



    It must be possible to connect to the phone and send an SMS because Apple do it in the address book. If the API is documented it will be on Apples developer site, as a Cocoa API (which is accessible from Java). However the code will not then be cross platform.



    Could you not use your phone as an internet connection, go onto the web and send the SMS using an online web service? Online companies offer a service where you can send them some XML to a particular URL and they will SMS for you for a few pence.
  • Reply 4 of 4
    Quote:

    Originally posted by Bygimis Turug VIII

    So you have a web browser on your laptop. You click a button on a form, then it connects to a webserver on your local machine triggering code on the webserver that does something with SOAP and sends an SMS message.



    It must be possible to connect to the phone and send an SMS because Apple do it in the address book. If the API is documented it will be on Apples developer site, as a Cocoa API (which is accessible from Java). However the code will not then be cross platform.



    Could you not use your phone as an internet connection, go onto the web and send the SMS using an online web service? Online companies offer a service where you can send them some XML to a particular URL and they will SMS for you for a few pence.




    that's exactly the idea! i'll have a look at the developers site, maybe there is some sample code available. i tried searching online for SMS services but either they don't work for dutch telcos or are way to expensive.



    thnx again
Sign In or Register to comment.