KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > jbi > serviceengine > bridge > JAXRPCRuntimeEndpointHelper


1 /*
2  * JAXWSRuntimeEndpointHelper.java
3  *
4  * Created on February 2, 2006, 3:08 PM
5  *
6  * To change this template, choose Tools | Options and locate the template under
7  * the Source Creation and Management node. Right-click the template and choose
8  * Open. You can then make changes to the template in the Source Editor.
9  */

10
11 package com.sun.enterprise.jbi.serviceengine.bridge;
12
13 import com.sun.enterprise.jbi.serviceengine.ServiceEngineException;
14 import com.sun.enterprise.jbi.serviceengine.core.ServiceEngineEndpoint;
15 import com.sun.enterprise.webservice.EjbRuntimeEndpointInfo;
16 import com.sun.enterprise.webservice.WebServiceEjbEndpointRegistry;
17
18
19 /**
20  *
21  * @author mu125243
22  */

23 public class JAXRPCRuntimeEndpointHelper {
24     
25     /** Creates a new instance of JAXWSRuntimeEndpointHelper */
26     public JAXRPCRuntimeEndpointHelper() {
27     }
28     
29     public static Object JavaDoc populateRuntimeInfo(ServiceEngineEndpoint endpt)
30     throws ServiceEngineException {
31         Object JavaDoc runtimeInfo = null;
32         if(endpt.isImplementedByEJB()) {
33             runtimeInfo = populateEjbRuntimeInfo(endpt);
34         } /*else {
35             runtimeInfo = populateWebRuntimeInfo(endpt);
36         }*/

37     
38         return runtimeInfo;
39     }
40     
41     private static Object JavaDoc populateEjbRuntimeInfo(
42             ServiceEngineEndpoint endpt) throws ServiceEngineException {
43         try {
44             WebServiceEjbEndpointRegistry registry =
45                     WebServiceEjbEndpointRegistry.getRegistry();
46             
47             EjbRuntimeEndpointInfo ejbRtEndptInfo =
48                     registry.getEjbWebServiceEndpoint(endpt.getURI(), "POST", null);
49             
50             
51             return ejbRtEndptInfo;
52         } catch(Exception JavaDoc e) {
53             throw new ServiceEngineException(e.getMessage());
54         }
55     }
56 }
57
Popular Tags