Developping a new BrAPI service

You can see BrAPI documentation in https://brapi.org

Return new call informations in the Calls service

The service Calls returns information from every Phis web services which are BrAPI compliant. So when you create a new BrAPI service, in order to retrieve your call information in the calls service, you need to follow these instructions:

register(new AbstractBinder() {
    @Override
    protected void configure() {
        // create the session from the last sessionId received
        bindFactory(SessionFactory.class).to(Session.class);
        // Session injection thanks to the type defined in SessionInjectResolver
        bind(SessionInjectResolver.class)
                .to(new TypeLiteral<InjectionResolver<SessionInject>>() {
                })
                .in(Singleton.class);
        //Brapi services injection
        bind(CallsResourceService.class).to(BrapiCall.class);
        bind(NewBrapiResourceService.class).to(BrapiCall.class);
    }
});