Search in sources :

Example 46 with Book

use of org.apache.cxf.systest.jaxrs.Book in project cxf by apache.

the class JAXRSSpringSecurityInterfaceTest method doGetBookProxyClient.

private void doGetBookProxyClient(String address, String username, String password, int expectedStatus) throws BookNotFoundFault {
    SecureBookInterface books = JAXRSClientFactory.create(address, SecureBookInterface.class, username, password, null);
    Book b = books.getThatBook();
    assertEquals(123, b.getId());
    Response r = WebClient.client(books).getResponse();
    assertEquals(expectedStatus, r.getStatus());
}
Also used : Response(javax.ws.rs.core.Response) Book(org.apache.cxf.systest.jaxrs.Book)

Aggregations

Book (org.apache.cxf.systest.jaxrs.Book)46 Test (org.junit.Test)31 WebClient (org.apache.cxf.jaxrs.client.WebClient)22 BookStore (org.apache.cxf.systest.jaxrs.BookStore)8 JMSBookStore (org.apache.cxf.systest.jaxrs.JMSBookStore)6 SequentialStrategy (org.apache.cxf.clustering.SequentialStrategy)5 Response (javax.ws.rs.core.Response)4 ArrayList (java.util.ArrayList)3 BytesMessage (javax.jms.BytesMessage)3 JAXBContext (javax.xml.bind.JAXBContext)3 InputStream (java.io.InputStream)2 ExecutionException (java.util.concurrent.ExecutionException)2 MessageProducer (javax.jms.MessageProducer)2 InternalServerErrorException (javax.ws.rs.InternalServerErrorException)2 NotFoundException (javax.ws.rs.NotFoundException)2 ProcessingException (javax.ws.rs.ProcessingException)2 Client (javax.ws.rs.client.Client)2 ClientBuilder (javax.ws.rs.client.ClientBuilder)2 WebTarget (javax.ws.rs.client.WebTarget)2 Form (javax.ws.rs.core.Form)2