mercredi 28 mars 2018

javax.ws.rs.NotFoundException: HTTP 404 Not Found angular 1.5

i have this client angular 1.5 code

    var getGroupForUser = function () {
        var deferred = $q.defer();
        $http.get(env.domain+'/Voices/authorize').then(
            function successCallback(response) {


                // self.isAdOps = response.data.;

                deferred.resolve(response.data);

            }, function errorCallback(response) {
                console.log(response.data.errorMsg);
                self.isAdOps = true;
                deferred.reject("data: "+response.data+" code:"+response.status+" "+response.statusText+", please look at the web console");
            });
        return deferred.promise;
    };

and this jersey java code on the server:

@Path("/Voices")
public class VoicesOperation {

    @Path("/search")
    @GET
    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
    public List<VoiceUi> search(@QueryParam("q") String searchTerm) throws Exception {...
}


    @Path("/authorize")
    @GET
    @Produces(MediaType.APPLICATION_JSON + ";charset=utf-8")
    public String authorize() {

        logger.info("in voicesOperation - authorization");
        logger.error("checking error log ==== in voicesOperation - authorization");

However i get in the server an error:

javax.ws.rs.NotFoundException: HTTP 404 Not Found

what am i missing?




Aucun commentaire:

Enregistrer un commentaire