Google endpoints API not showing in api explorer

I am very new to the Google engine and endpoints and wrote the basic functions of endpoints and deployments in the cloud. I successfully deployed the HelloWorld endpoint and tested it through the API: http: // localhost: 8080 / _ah / api / explorer

But now that I have created a new endpoint API and followed the same steps (i.e., deployed using the new APP kernel application name in appengine-web.xml, run it as appengine: update), api explorer still shows my endpoint HelloWorld instead of my new API "yourfirstendpoint".

I searched and tried to find the answer to no avail - and I'm sorry if this is a very simple and stupid question on my part (I'm sure it is), but I would be very happy if someone could point me in the right direction what i have to do.

My API

    package com.example.zinglife;

    import com.google.api.server.spi.config.Api;
    import com.google.api.server.spi.config.ApiMethod;
    import com.google.api.server.spi.config.ApiMethod.HttpMethod;
    import com.google.api.server.spi.response.NotFoundException;
    import com.google.appengine.api.datastore.Key;
    import com.google.appengine.api.datastore.KeyFactory;


    /**
    * 
    * Defines endpoint functions APIs.
    */
    @Api(name = "yourfirstapi", version = "v1",
    scopes = {Constants.EMAIL_SCOPE },
           clientIds = {Constants.API_EXPLORER_CLIENT_ID},
           description = "API for hello world endpoints.")

    public class YourFirstAPI
    {

    
    @ApiMethod(name = "storeUserModel")

       private User storeUserModel(User user) throws  NotFoundException
     {
       	 
          String email = user.getEmail();
           Key key = KeyFactory.createKey("User",email);
    	
        	User userEntity = null;
        	try 
        {
        		
    	if (userEntity==null)
    		{	
    		  userEntity = new User();
    	      userEntity.setName(user.getName());
    	      userEntity.setEmail(user.getEmail());
    	      userEntity.setCountry(user.getCountry());
    	    //
    	     
    		}
    	
    			

    		return userEntity;
    	
    	
        }//*endtry
        	finally
        	{
        		
        	}
        	
        
       
       
     
     } 
      

    }
Run codeHide result

App Engine Admin Log After Code Run: Enter Image Description Here

Please let me know if any other information is needed :)

+4
source share
1 answer

Make sure you add the new service as one of the "services" parameter values ​​in the EndPointsServlet.

<servlet>
    <!-- This is version 2.0 of the endpoints framework. -->
    <servlet-name>EndpointsServlet</servlet-name>
    <servlet-class>com.google.api.server.spi.EndpointsServlet</servlet-class>
    <init-param>
        <param-name>services</param-name>

        <!-- Comma separated classes that provide endpoints -->
        <param-value>
            com.mycompany.myproduct.endpoint.SomeServiceV1,
            com.mycompany.myproduct.endpoint.SomeServiceV2,
            com.mycompany.myproduct.endpoint.SomeOtherServiceV1,
            com.mycompany.myproduct.endpoint.SomeOtherServiceV2,
            com.mycompany.myproduct.endpoint.SomeOtherServiceV3
        </param-value>
    </init-param>
</servlet>
0
source

All Articles