1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
package org.kuali.rice.ksb.messaging.servlet; |
15 | |
|
16 | |
import javax.servlet.http.HttpServletRequest; |
17 | |
import javax.xml.namespace.QName; |
18 | |
|
19 | |
import org.kuali.rice.ksb.messaging.serviceexporters.ServiceExportManager; |
20 | |
import org.kuali.rice.ksb.service.KSBServiceLocator; |
21 | |
import org.springframework.web.servlet.HandlerMapping; |
22 | |
import org.springframework.web.servlet.handler.AbstractHandlerMapping; |
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | 0 | public class KSBHttpInvokerHandler extends AbstractHandlerMapping { |
30 | |
|
31 | |
protected Object getHandlerInternal(HttpServletRequest request) throws Exception { |
32 | 0 | QName serviceName = getServiceNameFromRequest(request); |
33 | 0 | ServiceExportManager serviceExportManager = KSBServiceLocator.getServiceExportManager(); |
34 | 0 | return serviceExportManager.getService(serviceName); |
35 | |
} |
36 | |
|
37 | |
public QName getServiceNameFromRequest(HttpServletRequest request) { |
38 | 0 | return KSBServiceLocator.getServiceExportManager().getServiceName(request.getRequestURL().toString()); |
39 | |
} |
40 | |
|
41 | |
} |