API package "channel" or call "CreateChannel ()" was not found

I have a simple web application hosted on tomcat-7 with one servlet. The purpose of the servlet is to create a google channel and then request a token on the public channel for the user. I have the following configuration ...

WEB-INF
  -- lib
    -- appengine-api-1.0-sdk-1.4.3.jar
  -- classes
    -- Gc.class

      

The source for Gc.java is ...

import com.google.appengine.api.channel.*;
public class Gc extends HttpServlet {
  protected void doGetPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    response.getWriter().write("Creating channel...<br>");
    ChannelService channelService = ChannelServiceFactory.getChannelService();
    response.getWriter().write("Channel created!<br>");
    response.getWriter().write("Getting token for user 'user1'...<br>");
    String token = channelService.createChannel("user1");
    response.getWriter().write("toekn => "+token);
  }
}

      

But it gives me the following error ...

type Exception report

*message* **The API package 'channel' or call 'CreateChannel()' was not found.**

*description* **The server encountered an internal error (The API package 'channel' or call 'CreateChannel()' was not found.) that prevented it from fulfilling this request.**

exception

com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'channel' or call 'CreateChannel()' was not found.
    com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:98)
    com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:50)
    com.google.appengine.api.channel.ChannelServiceImpl.createChannel(ChannelServiceImpl.java:40)
    webRtc.Gc.doGetOrPost(Gc.java:46)
    webRtc.Gc.doGet(Gc.java:31)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

      

** Are some libraries missing? If so, where and where can I find them. ** Any help is really appreciated.

+2


source to share


1 answer


I understood! The goal of my app is to create google feeds and send messages through those feeds.

I was under the impression that the google feed API is an independent library and has been put in place of the corresponding .jar in the lib of my tomcat application.



But I was wrong. The Google Feed API Libraries only run on the Google AppEngine Server. Thus, any application must use these Google APIs must be hosted on the Google AppEngine Server.

I am open to hear from experts if I am wrong.

+1


source







All Articles