public void useNewRESTService ( String address ) throws Exception { List < Object > providers = createJAXRSProviders ( ) ; org . customer . service . CustomerService customerService = JAXRSClientFactory . createFromModel ( address , org . customer . service . CustomerService . class , "classpath:/model/CustomerService-jaxrs.xml" , providers , null ) ; System . out . println ( "Using new RESTful CustomerService with new client" ) ; customer . v2 . Customer customer = createNewCustomer ( "Smith New REST" ) ; customerService . updateCustomer ( customer ) ; customer = customerService . getCustomerByName ( "Smith New REST" ) ; printNewCustomerDetails ( customer ) ; }
New REST client uses new REST service