721a58bff5ee0cfdc173496d5163a517a1cc81e2
[JavaForFun] /
1 package de.spring.webservices.rest.main;
2
3 import org.springframework.context.ApplicationContext;
4 import org.springframework.context.support.ClassPathXmlApplicationContext;
5
6 import de.spring.webservices.rest.business.BusinessService;
7
8
9 /**
10  * This class is used just like a nice example about how to write and run client
11  * code which will send data to and from the Web Services.
12  * 
13  */
14 public class MainTest { 
15     public ApplicationContext context;
16
17     /**
18      * @param args
19      */
20     public static void main(final String[] args) {
21         final MainTest test = new MainTest();
22
23         test.context = new ClassPathXmlApplicationContext(
24                 "classpath:spring-configuration/rest-config.xml");
25
26         final BusinessService example =
27                         (BusinessService) test.context.getBean("businessService");
28         
29         example.doSomethingWithCars();
30         
31         example.doSomethingWithCar(66L);
32         
33         example.createsNewCar();
34     }
35 }