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 <[email protected]>
To: Reza <[email protected]>; [email protected] 
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" <[email protected]>:

> 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).

Reply via email to