Search in sources :

Example 1 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class APIEndpointParserTest method getRequest.

private ContainerRequest getRequest(String url) {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    headers.add("X-FORWARDED-FOR", "37.14.150.83");
    return new ContainerRequest(new WebApplicationImpl(), "POST", URI.create("https://localhost:8443/orcid-api-web/"), URI.create(url), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 2 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getGetRequestWithXmlAcceptHeader.

private ContainerRequest getGetRequestWithXmlAcceptHeader() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.ACCEPT, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "GET", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 3 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getGetRequestWithJsonAcceptHeader.

private ContainerRequest getGetRequestWithJsonAcceptHeader() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.ACCEPT, "application/json");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "GET", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 4 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getRequestWithHttpScheme.

private ContainerRequest getRequestWithHttpScheme() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, "application/xml");
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "POST", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Example 5 with WebApplicationImpl

use of com.sun.jersey.server.impl.application.WebApplicationImpl in project ORCID-Source by ORCID.

the class AnalyticsProcessTest method getGetRequestWithRdfXmlAcceptHeader.

private ContainerRequest getGetRequestWithRdfXmlAcceptHeader() {
    InBoundHeaders headers = new InBoundHeaders();
    headers.add(HttpHeaders.CONTENT_TYPE, OrcidApiConstants.JSON_LD);
    headers.add(HttpHeaders.ACCEPT, OrcidApiConstants.APPLICATION_RDFXML);
    headers.add(HttpHeaders.USER_AGENT, "blah");
    return new ContainerRequest(new WebApplicationImpl(), "GET", URI.create("https://localhost:8443/orcid-api-web/"), URI.create("http://localhost:8443/orcid-api-web/v2.0/1234-4321-1234-4321/works"), headers, null);
}
Also used : InBoundHeaders(com.sun.jersey.core.header.InBoundHeaders) WebApplicationImpl(com.sun.jersey.server.impl.application.WebApplicationImpl) ContainerRequest(com.sun.jersey.spi.container.ContainerRequest)

Aggregations

WebApplicationImpl (com.sun.jersey.server.impl.application.WebApplicationImpl)16 InBoundHeaders (com.sun.jersey.core.header.InBoundHeaders)15 ContainerRequest (com.sun.jersey.spi.container.ContainerRequest)15 ContainerResponse (com.sun.jersey.spi.container.ContainerResponse)1