1 25 26 package org.objectweb.jonas.webapp.jonasadmin.service.webservice; 27 28 import java.io.IOException ; 29 import java.util.ArrayList ; 30 import java.util.Collection ; 31 32 import javax.servlet.ServletException ; 33 import javax.servlet.http.HttpServletRequest ; 34 import javax.servlet.http.HttpServletResponse ; 35 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 44 47 48 public class ViewPortComponentsAction extends JonasBaseAction { 49 50 public ActionForward executeAction(ActionMapping p_Mapping, ActionForm p_Form 51 , HttpServletRequest p_Request, HttpServletResponse p_Response) 52 throws IOException , ServletException { 53 54 String wsDescId = p_Request.getParameter("select"); 56 57 try { 58 GenericDomainCapableProvider jonasProvider = new JonasProvider(); 59 jonasProvider.initialize(m_WhereAreYou.getCurrentJonasServerName(), null); 60 WebServiceDescription wsd = jonasProvider.getWebServiceDescription(wsDescId); 61 int wsdPortComponentCount = wsd.getPortComponentCount(); 62 Collection portComponents = new ArrayList (); 63 for(int i = 0; i < wsdPortComponentCount; i++){ 64 portComponents.add(wsd.getPortComponent(i)); 65 } 66 p_Request.setAttribute("listPortComponents", portComponents); 67 p_Request.setAttribute("webServiceDescription", wsd); 68 } catch (Throwable t) { 69 addGlobalError(t); 70 saveErrors(p_Request, m_Errors); 71 return (p_Mapping.findForward("Global Error")); 72 } 73 74 75 80 81 return (p_Mapping.findForward("PortComponents")); 82 } 83 84 } 85 | Popular Tags |