Search in sources :

Example 1 with EndpointBuilder

use of com.roskart.dropwizard.jaxws.EndpointBuilder in project irontest by zheng-wang.

the class IronTestApplication method createSampleResources.

private void createSampleResources(IronTestConfiguration configuration, Environment environment) {
    final DBIFactory factory = new DBIFactory();
    final DBI jdbi = factory.build(environment, configuration.getSampleDatabase(), "sampleDatabase");
    // create DAO objects
    final ArticleDAO articleDAO = jdbi.onDemand(ArticleDAO.class);
    // create database tables
    articleDAO.createTableIfNotExists();
    // register APIs
    environment.jersey().register(new ArticleResource(articleDAO));
    // register SOAP web services
    jaxWsBundle.publishEndpoint(new EndpointBuilder("/article", new ArticleSOAP(articleDAO)));
}
Also used : DBI(org.skife.jdbi.v2.DBI) EndpointBuilder(com.roskart.dropwizard.jaxws.EndpointBuilder) ArticleSOAP(io.irontest.ws.ArticleSOAP) DBIFactory(io.dropwizard.jdbi.DBIFactory)

Aggregations

EndpointBuilder (com.roskart.dropwizard.jaxws.EndpointBuilder)1 DBIFactory (io.dropwizard.jdbi.DBIFactory)1 ArticleSOAP (io.irontest.ws.ArticleSOAP)1 DBI (org.skife.jdbi.v2.DBI)1