Liferay API update Data with JSON -


i working on api portal, provide users ability update there data via api directly there internal systems. liferay 6.2 bundle tomcat. (for api call testing use soapui)

the methods work fine, (i have getall, , getbyid). getbyid returns json object this:

{      "id": "organizationid",      "type": "organizationtype",       "name": "organizationname",      "uri": "organizationnameuri"      "date of inclusion": "inclutiondate",       "last activities": "lastmodifieddate",      "address": {          "name of host institution": "nameofhostinstitute",          "street1": "street1",          "street2" : "street2",          "zip": "zip",          "city": "city",          "country": "country",      },      "url": [{"organizationurl"}],      "main contact": {          "first name": "firstname",          "last name" : "lastname",          "phone": "phone",          "email": "maincontactemail"      },      "type of host institution" : "typeofhostinstitute",       "diseases":  [         {          "name": "diseasename1",          "number": "samplecount",          "gene": "gene",           "orphacode": "orpha"          "icd10": "icd",          "omim": "omim";          "synonym": "synonym"          },         {          "name": "diseasename2",          "number": "samplecount",          "gene": "gene",           "orphacode": "orpha"          "icd10": "icd",          "omim": "omim";          "synonym": "synonym"          }      ] } 

i have api updating diseases information organization. have created url service in url parameters, have in url id parameter send , rest of information in json object. like: /api/jsonws/....-portlet...../updateregbb/organization-id/16016/ , data:

{      "id": "organizationid",      "diseases":  [         {          "name": "diseasename1",          "number": "samplecount",          "gene": "gene",           "orphacode": "orpha"          "icd10": "icd",          "omim": "omim";          "synonym": "synonym"          },         {          "name": "diseasename2",          "number": "samplecount",          "gene": "gene",           "orphacode": "orpha"          "icd10": "icd",          "omim": "omim";          "synonym": "synonym"          }      ] } 

but not find solution how can read json data:

@jsonwebservice(value = "updateregbb", method = "post") public void updateregbb2(long organizationid, map jsondata) {    @jsonwebservice(value = "updateregbb", method = "post") public void updateregbb(long organizationid, jsonobject json) { 

how can data function?

thanks help, best robert


Comments