Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 18317 invoked from network); 12 Dec 2008 16:58:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2008 16:58:21 -0000 Received: (qmail 77611 invoked by uid 500); 12 Dec 2008 16:58:24 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 77575 invoked by uid 500); 12 Dec 2008 16:58:24 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 77554 invoked by uid 99); 12 Dec 2008 16:58:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2008 08:58:22 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Jan_Freitag@gmx.de designates 213.165.64.20 as permitted sender) Received: from [213.165.64.20] (HELO mail.gmx.net) (213.165.64.20) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 12 Dec 2008 16:58:00 +0000 Received: (qmail invoked by alias); 12 Dec 2008 16:57:36 -0000 Received: from a89-182-132-107.net-htp.de (EHLO [192.168.178.22]) [89.182.132.107] by mail.gmx.net (mp061) with SMTP; 12 Dec 2008 17:57:36 +0100 X-Authenticated: #7289895 X-Provags-ID: V01U2FsdGVkX1+5cq4635+5kuYcS0aDHZMEZKJQWUxJp0XZmT4TTh rbkqPtxLN4BApN Message-Id: <75CC6BB9-F0A1-4BCC-942C-E7FFC704A285@gmx.de> From: Jan Freitag To: axis-user@ws.apache.org In-Reply-To: Content-Type: multipart/alternative; boundary=Apple-Mail-2--461731628 Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: How to Use JSON Objects in a Web Service Date: Fri, 12 Dec 2008 17:57:35 +0100 References: <0810AA4F-8783-4D61-989E-C9DBD97EA65B@gmx.de> X-Mailer: Apple Mail (2.929.2) X-Y-GMX-Trusted: 0 X-FuHaFi: 0.47,0.47 X-Virus-Checked: Checked by ClamAV on apache.org --Apple-Mail-2--461731628 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Hi, I want to write the web service with plain Axis2, but I'm open for other solutions. Here is an example request and response from the geolocation api: Gears Request { "version": "1.1.0", "host": "maps.google.com", "access_token": "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe", "home_mobile_country_code": 310, "home_mobile_network_code": 410, "radio_type": "gsm", "carrier": "Vodafone", "request_address": true, "address_language": "en_GB", "location": { "latitude": 51.0, "longitude": -0.1 }, "cell_towers": [ { "cell_id": 42, "location_area_code": 415, "mobile_country_code": 310, "mobile_network_code": 410, "age": 0, "signal_strength": -60, "timing_advance": 5555 }, { "cell_id": 88, "location_area_code": 415, "mobile_country_code": 310, "mobile_network_code": 580, "age": 0, "signal_strength": -70, "timing_advance": 7777 } ], "wifi_towers": [ { "mac_address": "01-23-45-67-89-ab", "signal_strength": 8, "age": 0 }, { "mac_address": "01-23-45-67-89-ac", "signal_strength": 4, "age": 0 } ] } Server Response { "location": { "latitude": 51.0, "longitude": -0.1, "altitude": 30.1, "accuracy": 1200.4, "altitude_accuracy": 10.6, "address": { "street_number": "100", "street": "Amphibian Walkway", "postal_code": "94043", "city": "Mountain View", "county": "Mountain View County", "region": "California", "country": "United States of America", "country_code": "US" } }, "access_token": "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe" } Greets, JF Am 12.12.2008 um 17:44 schrieb keith chapman: > I'm not familiar with the Geolocation API. Could you post a sample > request and response message (or JSON objects) for this scenario. > > No you do not need to start from WSDL. you could use Java code if > you wanna use plain Axis2 or you could alternatively use the WSO2 > Mashup Server [1] and write your service using JavaScript. > > Thanks, > Keith. > > [1] http://wso2.org/projects/mashup > > On Fri, Dec 12, 2008 at 10:08 PM, Jan Freitag > wrote: > Hi, > > thank you for the answer. I've seen your blog before, but I don't > know how to start. Should I start to implement my web service (with > java) or should i write the wsdl file? I don't know where i can > configure the rquest format for the JSOn object. The Geolocation Api > tells me how the JSOn Request Objects look like, but I'm to new to > Web Services and Axis and JSON to find where I can start. > > Perhaps you have som tips how I can start to implement the web > Service? > > Do you know the Geolocation API ? > > Greets > > JF > > Am 12.12.2008 um 13:44 schrieb keith chapman: > >> These links might help you. [1] and [2]. >> >> Thanks, >> Keith. >> >> [1] http://www.keith-chapman.org/2008/09/enabling-json-in-apache-axis2.html >> [2] http://www.keith-chapman.org/2008/09/invoking-mashups-using-json.html >> >> On Fri, Dec 12, 2008 at 5:27 PM, Jan Freitag >> wrote: >> Hi, >> >> I'm trying to implement a Web Service that gets as Request JSON >> Objects ( I try to write my own Location Proivder Service for the >> Google Gears Geolocation API). I want to write these JSOn Objects >> on a >> HTML page to display them and I want to create a response to the JSOn >> Request that is also a JSON Response. >> >> When you know how I can use JSON Objects out of the Request and >> respond also as JSOn let me know. I looked at the Yahoo example but >> it >> did not helped me enough. >> >> Greets. >> >> JF >> >> >> >> -- >> Keith Chapman >> Senior Software Engineer >> WSO2 Inc. >> Oxygenating the Web Service Platform. >> http://wso2.org/ >> >> blog: http://www.keith-chapman.org > > > > > -- > Keith Chapman > Senior Software Engineer > WSO2 Inc. > Oxygenating the Web Service Platform. > http://wso2.org/ > > blog: http://www.keith-chapman.org --Apple-Mail-2--461731628 Content-Type: text/html; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Hi,

I want = to write the web service with plain Axis2, but I'm open for other = solutions. Here is an example request and response from the geolocation = api:

Gears = Request


{
  "v= ersion": "1.1.0",
  "host": = "maps.google.com",
  "access_token": = "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe",
  "home_mobile_c= ountry_code": 310,
  "home_mobile_network_code": = 410,
  "radio_type": = "gsm",
  "carrier": = "Vodafone",
  "request_address": = true,
  "address_language": = "en_GB",
  "location": {
   =  "latitude": 51.0,
    "longitude": = -0.1
  },
  "cell_towers": = [
    {
     =  "cell_id": 42,
     =  "location_area_code": 415,
     =  "mobile_country_code": 310,
     =  "mobile_network_code": 410,
     =  "age": 0,
      "signal_strength": = -60,
      "timing_advance": = 5555
    },
   =  {
      "cell_id": = 88,
      "location_area_code": = 415,
      "mobile_country_code": = 310,
      "mobile_network_code": = 580,
      "age": = 0,
      "signal_strength": = -70,
      "timing_advance": = 7777
   =  }
  ],
  "wifi_towers": = [
    {
     =  "mac_address": "01-23-45-67-89-ab",
     =  "signal_strength": 8,
      "age": = 0
    },
   =  {
      "mac_address": = "01-23-45-67-89-ac",
     =  "signal_strength": 4,
      "age": = 0
   =  }
  ]
}

Serve= r = Response


{
  "= location": {
    "latitude": = 51.0,
    "longitude": = -0.1,
    "altitude": = 30.1,
    "accuracy": = 1200.4,
    "altitude_accuracy": = 10.6,
    "address": {
   =    "street_number": "100",
     =  "street": "Amphibian Walkway",
     =  "postal_code": "94043",
     =  "city": "Mountain View",
     =  "county": "Mountain View County",
     =  "region": "California",
     =  "country": "United States of America",
   =    "country_code": "US"
   =  }
  },
  "access_token": = "2:k7j3G6LaL6u_lafw:4iXOeOpTh1glSXe"
}

= Greets,

JF

Am = 12.12.2008 um 17:44 schrieb keith chapman:

I'm not = familiar with the Geolocation API. Could you post a sample request and = response message (or JSON objects) for this scenario.

No you do = not need to start from WSDL. you could use Java code if you wanna use = plain Axis2 or you could alternatively use the WSO2 Mashup Server [1] = and write your service using JavaScript.
=
Thanks,
Keith.

[1] http://wso2.org/projects/mashup

On Fri, Dec 12, 2008 at 10:08 PM, = Jan Freitag <Jan_Freitag@gmx.de> = wrote:
Hi,

thank you for the answer. = I've seen your blog before, but I don't know how to start. Should I = start to implement my web service (with java) or should i write the wsdl = file? I don't know where i can configure the rquest format for the JSOn = object. The Geolocation Api tells me how the JSOn Request Objects look = like, but I'm to new to Web Services and Axis and JSON to find where I = can start.

Perhaps you have som tips how I can = start to implement the  web Service?

Do = you know the Geolocation API = ?

Greets

JF
=
Am 12.12.2008 um 13:44 schrieb keith = chapman:

These links might help you. [1] and = [2].

Thanks,
Keith.

[1] http://www.keith-chapman.org/2008/09/enabling-json-in-ap= ache-axis2.html
[2] http://www.keith-chapman.org/2008/09/invoking-mashups-us= ing-json.html

On Fri, Dec 12, 2008 = at 5:27 PM, Jan Freitag <jan_freitag@gmx.de> wrote:
Hi,

I'm = trying to implement a Web Service that gets as Request JSON
Objects = ( I try to write my own Location Proivder Service for the
Google = Gears Geolocation API). I want to write these JSOn Objects on a
HTML = page to display them and I want to create a response to the JSOn
= Request that is also a JSON Response.

When you know how I can = use JSON Objects out of the Request and
respond also as JSOn let me = know. I looked at the Yahoo example but it
did not helped me = enough.

Greets.

JF
=



--
Keith = Chapman
Senior Software Engineer
WSO2 Inc.
Oxygenating the Web = Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org
=




--
Keith Chapman
Senior Software = Engineer
WSO2 Inc.
Oxygenating the Web Service Platform.
http://wso2.org/

blog: http://www.keith-chapman.org
=

= --Apple-Mail-2--461731628--