You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devicemap.apache.org by Reza <re...@yahoo.com> on 2013/05/13 02:23:14 UTC
Java webservice
The Java webservice is available.
Plain HTML:
http://devicemap-vm.apache.org/javaservice.html
JSON:
http://devicemap-vm.apache.org/javaservice.js
JSONP:
http://devicemap-vm.apache.org/javaservice.js?callback=cb1234
All of the above calls can take in a user defined UA parameter:
http://devicemap-vm.apache.org/javaservice.html?ua=Mozilla/5.0%20(iPhone;%20U;%20CPU%20iPhone%20OS%203_0%20like%20Mac%20OS%20X;%20en-us)%20AppleWebKit/528.18%20(KHTML,%20like%20Gecko)%20Version/4.0%20Mobile/7A341%20Safari/528.16
http://devicemap-vm.apache.org/javaservice.js?ua=Mozilla/5.0%20(BlackBerry;%20U;%20BlackBerry%209900;%20en)%20AppleWebKit/534.11+%20(KHTML,%20like%20Gecko)%20Version/7.1.0.346%20Mobile%20Safari/534.11+&callback=abc555
The service is running in the plain DeviceMap Java API in Tomcat7 and being proxied thru nginx. Im using OpenDDR v1.16 data (the DeviceMap svn only has 1.15).
Re: Java webservice
Posted by Reza <re...@yahoo.com>.
It doesn't stray far from the original OpenDDR example:
J2EE filter which puts device properties into the request:
https://svn.apache.org/repos/asf/incubator/devicemap/trunk/web/webservice-java/src/main/java/org/apache/devicemapjavaservice/filter/IdentificationFilter.java
(I would like to greatly simplify this piece in the future)
Then a simple controller calls one of these views:
https://svn.apache.org/repos/asf/incubator/devicemap/trunk/web/webservice-java/src/main/webapp/WEB-INF/views/
So in the case of JSON:
https://svn.apache.org/repos/asf/incubator/devicemap/trunk/web/webservice-java/src/main/webapp/WEB-INF/views/showjs.jsp
________________________________
From: Werner Keil <we...@gmail.com>
To: Reza <re...@yahoo.com>; devicemap-dev@incubator.apache.org
Sent: Sunday, May 12, 2013 9:04 PM
Subject: Re: Java webservice
Great stuff, just tested the HTML version from my Android 3 tab, and it was
perfectly recognized.
Tue evening, those who are in Swizterland plan to meet in Zurich, Bertrand,
Christian, myself and I heard, Stefano also should come to the Zurich JCP
meeting.
If anybody else was near enough and wishes to come, please tell Bertrand or
me directly. The various Java options, JSON or JSONP (haven't looked at
code in detail, does it use the JSON JSR or another library?;-) will
certainly be of interest to other JCP (EC) members who said they were also
curious to talk about DeviceMap with us there.
Thanks again Reza, that's great timing,
Werner
Am 13.05.2013 02:23 schrieb "Reza" <re...@yahoo.com>:
> The Java webservice is available.
>
> Plain HTML:
>
> http://devicemap-vm.apache.org/javaservice.html
>
>
> JSON:
>
> http://devicemap-vm.apache.org/javaservice.js
>
>
> JSONP:
>
> http://devicemap-vm.apache.org/javaservice.js?callback=cb1234
>
>
> All of the above calls can take in a user defined UA parameter:
>
>
> http://devicemap-vm.apache.org/javaservice.html?ua=Mozilla/5.0%20(iPhone;%20U;%20CPU%20iPhone%20OS%203_0%20like%20Mac%20OS%20X;%20en-us)%20AppleWebKit/528.18%20(KHTML,%20like%20Gecko)%20Version/4.0%20Mobile/7A341%20Safari/528.16
>
>
>
> http://devicemap-vm.apache.org/javaservice.js?ua=Mozilla/5.0%20(BlackBerry;%20U;%20BlackBerry%209900;%20en)%20AppleWebKit/534.11+%20(KHTML,%20like%20Gecko)%20Version/7.1.0.346%20Mobile%20Safari/534.11+&callback=abc555
>
>
> The service is running in the plain DeviceMap Java API in Tomcat7 and
> being proxied thru nginx. Im using OpenDDR v1.16 data (the DeviceMap svn
> only has 1.15).
Re: Java webservice
Posted by Werner Keil <we...@gmail.com>.
Great stuff, just tested the HTML version from my Android 3 tab, and it was
perfectly recognized.
Tue evening, those who are in Swizterland plan to meet in Zurich, Bertrand,
Christian, myself and I heard, Stefano also should come to the Zurich JCP
meeting.
If anybody else was near enough and wishes to come, please tell Bertrand or
me directly. The various Java options, JSON or JSONP (haven't looked at
code in detail, does it use the JSON JSR or another library?;-) will
certainly be of interest to other JCP (EC) members who said they were also
curious to talk about DeviceMap with us there.
Thanks again Reza, that's great timing,
Werner
Am 13.05.2013 02:23 schrieb "Reza" <re...@yahoo.com>:
> The Java webservice is available.
>
> Plain HTML:
>
> http://devicemap-vm.apache.org/javaservice.html
>
>
> JSON:
>
> http://devicemap-vm.apache.org/javaservice.js
>
>
> JSONP:
>
> http://devicemap-vm.apache.org/javaservice.js?callback=cb1234
>
>
> All of the above calls can take in a user defined UA parameter:
>
>
> http://devicemap-vm.apache.org/javaservice.html?ua=Mozilla/5.0%20(iPhone;%20U;%20CPU%20iPhone%20OS%203_0%20like%20Mac%20OS%20X;%20en-us)%20AppleWebKit/528.18%20(KHTML,%20like%20Gecko)%20Version/4.0%20Mobile/7A341%20Safari/528.16
>
>
>
> http://devicemap-vm.apache.org/javaservice.js?ua=Mozilla/5.0%20(BlackBerry;%20U;%20BlackBerry%209900;%20en)%20AppleWebKit/534.11+%20(KHTML,%20like%20Gecko)%20Version/7.1.0.346%20Mobile%20Safari/534.11+&callback=abc555
>
>
> The service is running in the plain DeviceMap Java API in Tomcat7 and
> being proxied thru nginx. Im using OpenDDR v1.16 data (the DeviceMap svn
> only has 1.15).
Re: Java webservice
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Mon, May 13, 2013 at 2:23 AM, Reza <re...@yahoo.com> wrote:
> The Java webservice is available...
Very cool! I have added the basic info to the news section of
http://incubator.apache.org/devicemap/
-Bertrand