Search in sources :

Example 1 with LookupRequest

use of fish.payara.ejb.http.protocol.LookupRequest in project Payara by payara.

the class EjbOverHttpResourceTest method lookupExpectSuccess.

private static LookupResponse lookupExpectSuccess(String mediaType, String jndiName) {
    Entity<LookupRequest> entity = lookupBody(mediaType, jndiName);
    try (Response response = target.path("jndi/lookup").request(mediaType).buildPost(entity).invoke()) {
        assertNoError(response, Status.CREATED);
        assertThat(response.getLocation().getPath(), endsWith("/jndi/invoke"));
        return response.readEntity(LookupResponse.class);
    }
}
Also used : Response(javax.ws.rs.core.Response) ErrorResponse(fish.payara.ejb.http.protocol.ErrorResponse) LookupResponse(fish.payara.ejb.http.protocol.LookupResponse) InvokeMethodResponse(fish.payara.ejb.http.protocol.InvokeMethodResponse) LookupRequest(fish.payara.ejb.http.protocol.LookupRequest)

Aggregations

ErrorResponse (fish.payara.ejb.http.protocol.ErrorResponse)1 InvokeMethodResponse (fish.payara.ejb.http.protocol.InvokeMethodResponse)1 LookupRequest (fish.payara.ejb.http.protocol.LookupRequest)1 LookupResponse (fish.payara.ejb.http.protocol.LookupResponse)1 Response (javax.ws.rs.core.Response)1