I am trying to call a webservice method via a proxy but I have got an error
message that says: "Subresource for target class has no jax-rs
annotations.: org.jboss.resteasy.core.ServerResponse"

Here is my server class

@Path("/authorizationCheck")
public class AuthorizationRestService implements AuthorizationService  {

  @Override
    @Path("/webserviceTest")
    public Response webserviceTest(){
    TestDTO  x = new TestDTO();
    x.setFieldOne("ffff");
    x.setFieldTwo("gggg");
    Response res = Response.ok(x).build();
    return res;


    }
}

with a an interface like this

@Path("/authorizationCheck")
public interface AuthorizationService {

    @POST
    @Path("/webserviceTest")
    public Response webserviceTest();
}

and my return object wrapped in response

@XmlRootElement
@XmlAccessorType(XmlAccessType.FIELD)
public class TestDTO {

    private String fieldOne;

    private String fieldTwo;

    public String getFieldOne() {
        return fieldOne;
    }

    public void setFieldOne(String fieldOne) {
        this.fieldOne = fieldOne;
    }

    public String getFieldTwo() {
        return fieldTwo;
    }

    public void setFieldTwo(String fieldTwo) {
        this.fieldTwo = fieldTwo;
    }



}

and finally my client class

@Stateful
@Scope(ScopeType.CONVERSATION)
@Name("authorizationCheckService")
public class AuthorizationCheckService {

    public void testWebservice(){
        RegisterBuiltin.register(ResteasyProviderFactory.getInstance());
        AuthorizationService  proxy =
                ProxyFactory.create(AuthorizationService.class,
                        ApplicationConfig.WORKFLOWSERVER_URL +
"services/authorizationCheck/webserviceTest");
        Response response =   proxy.webserviceTest();
        return;



    }
}

what I am doing wrong here , any help will be appreciated.
Regards
//Yashar
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users

Reply via email to