1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.webservice; 27 28 import java.io.IOException ; 29 import java.util.HashMap ; 30 31 import javax.servlet.ServletException ; 32 import javax.servlet.http.HttpServletRequest ; 33 import javax.servlet.http.HttpServletResponse ; 34 35 import org.allesta.wsabi.j2ee.PortComponent; 36 import org.allesta.wsabi.j2ee.WebServiceDescription; 37 import org.allesta.wsabi.j2ee.provider.GenericDomainCapableProvider; 38 import org.allesta.wsabi.j2ee.provider.jonas.JonasProvider; 39 import org.apache.struts.action.ActionForm; 40 import org.apache.struts.action.ActionForward; 41 import org.apache.struts.action.ActionMapping; 42 import org.objectweb.jonas.webapp.jonasadmin.JonasBaseAction; 43 import org.objectweb.jonas.webapp.jonasadmin.WhereAreYou; 44 45 48 49 public class PortComponentsDetailsAction extends JonasBaseAction { 50 51 53 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 54 , HttpServletRequest p_Request, HttpServletResponse p_Response) 55 throws IOException , ServletException { 56 String wsdId = p_Request.getParameter("wsdselect"); 58 String pcId = p_Request.getParameter("pcselect"); 60 61 try{ 62 GenericDomainCapableProvider jonasProvider = new JonasProvider(); 63 jonasProvider.initialize(m_WhereAreYou.getCurrentJonasServerName(), null); 64 WebServiceDescription wsd = jonasProvider.getWebServiceDescription(wsdId); 65 PortComponent pc = null; 66 for(int i=0; i < wsd.getPortComponentCount(); i++){ 67 if(wsd.getPortComponent(i).getId().equals(pcId)){ 68 pc = wsd.getPortComponent(i); 69 break; 70 } 71 } 72 73 p_Request.setAttribute("selectedWebServiceDescription", wsd); 75 p_Request.setAttribute("selectedPortComponent", pc); 76 p_Request.setAttribute("implBean", pc.getServiceImplBean()); 77 HashMap map = new HashMap (); 78 map.put("wsdselect", wsd.getId()); 79 map.put("pcselect", pc.getId()); 80 p_Request.setAttribute("paramMap", map); 81 82 m_WhereAreYou.selectNameNode(getTreeBranchName(DEPTH_SERVER) + WhereAreYou.NODE_SEPARATOR 84 + "services" + WhereAreYou.NODE_SEPARATOR + "WebService" + WhereAreYou.NODE_SEPARATOR + wsd.getId() + WhereAreYou.NODE_SEPARATOR + pc.getId(), true); 85 } 86 catch (Throwable t) { 87 addGlobalError(t); 88 saveErrors(p_Request, m_Errors); 89 return (p_Mapping.findForward("Global Error")); 90 } 91 93 return (p_Mapping.findForward("PortComponents Details")); 94 } 95 96 97 98 } 99 | Popular Tags |