1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.rice.ksb.messaging.servlet; |
17 |
|
|
18 |
|
import javax.servlet.http.HttpServletRequest; |
19 |
|
import javax.servlet.http.HttpServletResponse; |
20 |
|
|
21 |
|
import org.apache.cxf.BusFactory; |
22 |
|
import org.apache.cxf.transport.servlet.ServletController; |
23 |
|
import org.kuali.rice.ksb.messaging.ServiceInfo; |
24 |
|
import org.kuali.rice.ksb.service.KSBServiceLocator; |
25 |
|
import org.springframework.web.servlet.ModelAndView; |
26 |
|
import org.springframework.web.servlet.mvc.Controller; |
27 |
|
|
28 |
|
|
29 |
|
@link@link |
30 |
|
|
31 |
|
|
32 |
|
@author |
33 |
|
|
34 |
|
|
|
|
| 0% |
Uncovered Elements: 10 (10) |
Complexity: 3 |
Complexity Density: 0.43 |
|
35 |
|
public class CXFServletControllerAdapter |
36 |
|
implements Controller{ |
37 |
|
|
38 |
|
private ServiceInfo serviceInfo; |
39 |
|
private ServletController controller; |
40 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
41 |
0
|
public CXFServletControllerAdapter(ServiceInfo serviceInfo){... |
42 |
0
|
this.serviceInfo = serviceInfo; |
43 |
|
} |
44 |
|
|
45 |
|
|
46 |
|
|
47 |
|
|
48 |
|
@see |
49 |
|
|
|
|
| 0% |
Uncovered Elements: 5 (5) |
Complexity: 1 |
Complexity Density: 0.2 |
|
50 |
0
|
public ModelAndView handleRequest(HttpServletRequest request,... |
51 |
|
HttpServletResponse response) throws Exception { |
52 |
|
|
53 |
0
|
try { |
54 |
0
|
BusFactory.setThreadDefaultBus(KSBServiceLocator.getCXFBus()); |
55 |
0
|
controller.invoke(request, response); |
56 |
|
} finally { |
57 |
0
|
BusFactory.setThreadDefaultBus(null); |
58 |
|
} |
59 |
|
|
60 |
0
|
return null; |
61 |
|
} |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public void setController(ServletController controller){... |
64 |
0
|
this.controller = controller; |
65 |
|
} |
66 |
|
} |