• Welcome to KonaKart Community Forum. Please login or sign up.
 

Invalid JSONP passed to server

Started by HappyHippo, July 20, 2016, 12:57:10 pm

Previous topic - Next topic

HappyHippo

Hi!

When i call http://localhost:8780/konakart/konakartjson I get the error  WARN <?:doGet:?>Invalid JSONP passed to server
Could you please tell me how to call kk Json request from any server,website etc? I followed the example provided in documentation but it doesn't work.

Also; In my web.xml i changed the servlet class to my own and override doGet();  inside this method i used the example code provided in java_api_examples folder; but when i call  http://localhost:8080/konakart/konakartjson i have to manully convert the result to json using JSONObject library and use PrintWriter for output.
Is this the correct way to call kk json engine? Do i need to convert objects to json manully?

<servlet>
      <servlet-name>KonaKart_JSON_Servlet</servlet-name>
      <servlet-class>
         my.customized.json.JSONServer
      </servlet-class>
      <init-param>
         <param-name>jsonEnabled</param-name>
         <param-value>true</param-value>
      </init-param>
      <init-param>
         <param-name>includedInterfaces</param-name>
         <param-value></param-value>
      </init-param>
      <init-param>
         <param-name>excludedInterfaces</param-name>
         <param-value></param-value>
      </init-param>
      <load-on-startup>30</load-on-startup>
   </servlet>
        <servlet-mapping>
      <servlet-name>KonaKart_JSON_Servlet</servlet-name>
      <url-pattern>/konakartjson</url-pattern>
   </servlet-mapping>


Please Help!

Thank you.

HappyHippo

Guys; any help will be greatly appreciated.... :)