Community
Participate
Working Groups
Build Identifier: v201111232325 REST service call with JSON responding type got error. By the GeoName service call application Reproducible: Always Steps to Reproduce: 1. Download the attached project and import to your workspace 2. Create a Web Client Project to import required RUI/Dojo runtime projects 3. Open EGLSource/Client/GeoNameHandler.egl by VE 4. Switch to preview, call service by XML. It works well 5. Call by JSON can not get response
Created attachment 207459 [details] GeoName Third Party
set to p1, major
The attached application is incorrectly written. It was using the same GeoNames record for both XML & JSON format. That record is defined for XML results only, and it leads to error when parse a JSON response to that XML record. I modified the application, it worked correctly with JSON now. I'll close this bug as invalid.
Created attachment 207469 [details] add code to call with json
This has already been updated in CVS - kan-cvs-save.ottawa.ibm.com//cvsroot/rbd/org.eclipse.edt.tests.services/thirdparty.rest/GeoNames You don't need to sets of records you just need to add the JSONName annotation to the 1 field.
Joe, is this new in EDT? And is it documented somewhere? (In reply to comment #5) > This has already been updated in CVS - > kan-cvs-save.ottawa.ibm.com//cvsroot/rbd/org.eclipse.edt.tests.services/thirdparty.rest/GeoNames > You don't need to sets of records you just need to add the JSONName annotation > to the 1 field.
(In reply to comment #6) > Joe, is this new in EDT? And is it documented somewhere? > > (In reply to comment #5) > > This has already been updated in CVS - > > kan-cvs-save.ottawa.ibm.com//cvsroot/rbd/org.eclipse.edt.tests.services/thirdparty.rest/GeoNames > > You don't need to sets of records you just need to add the JSONName annotation > > to the 1 field. RBD also has JSONName. I added Saul on the CC to answer the doc question.
> RBD also has JSONName. I added Saul on the CC to answer the doc question. In the EDT help is the EGL Language Reference, and the last section (Supplemental Details) has the following topics: o "Correspondence between a JSON string and an EGL variable," which references the JSONName annotation. o Also see "Correspondence between an XML string and an EGL variable" The Language Reference section on packages includes entries for the eglx.json and eglx.xml packages. You can always search for a topic that matches a string of interest, such as "JSON."