You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by de...@apache.org on 2005/05/31 05:08:43 UTC
svn commit: r179182 - in /webservices/axis/trunk/java/modules/core:
conf/web.xml html/LeftFrame.jsp html/engagingglobally.jsp
src/org/apache/axis/Constants.java
src/org/apache/axis/clientapi/MessageSender.java
src/org/apache/axis/engine/AxisConfigurationImpl.java
src/org/apache/axis/transport/http/AxisServlet.java
Author: deepal
Date: Mon May 30 20:08:42 2005
New Revision: 179182
URL: http://svn.apache.org/viewcvs?rev=179182&view=rev
Log: (empty)
Modified:
webservices/axis/trunk/java/modules/core/conf/web.xml
webservices/axis/trunk/java/modules/core/html/LeftFrame.jsp
webservices/axis/trunk/java/modules/core/html/engagingglobally.jsp
webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
Modified: webservices/axis/trunk/java/modules/core/conf/web.xml
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/conf/web.xml?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/conf/web.xml (original)
+++ webservices/axis/trunk/java/modules/core/conf/web.xml Mon May 30 20:08:42 2005
@@ -48,6 +48,10 @@
</servlet-mapping>
<servlet-mapping>
<servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/engagingglobally</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
Modified: webservices/axis/trunk/java/modules/core/html/LeftFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/LeftFrame.jsp?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/LeftFrame.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/LeftFrame.jsp Mon May 30 20:08:42 2005
@@ -33,7 +33,7 @@
<p><a href="globalModules" target="mainFrame">List Globally Engaged Modules</a></p>
<p>Enage Module</p>
<blockquote>
- <p><a href="engagingglobally.jsp" target="mainFrame">Gloabally</a></p>
+ <p><a href="engagingglobally" target="mainFrame">Gloabally</a></p>
<p><a href="engagingtoaservice.jsp" target="mainFrame">To A service</a></p>
<p><a href="enaggingtoanopeartion.jsp" target="mainFrame">To an Operation</a></p>
<p> </p>
Modified: webservices/axis/trunk/java/modules/core/html/engagingglobally.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/html/engagingglobally.jsp?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/html/engagingglobally.jsp (original)
+++ webservices/axis/trunk/java/modules/core/html/engagingglobally.jsp Mon May 30 20:08:42 2005
@@ -1,18 +1,89 @@
-<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
+<%@ page import="java.util.Collection,
+ org.apache.axis.Constants,
+ java.util.Iterator,
+ javax.xml.namespace.QName,
+ org.apache.axis.description.ModuleDescription,
+ java.util.HashMap,
+ java.util.Enumeration"%><html>
<head>
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<title>Untitled Document</title>
+<title>Engaging Module Globally</title>
<style type="text/css">
<!--
body {
- background-color: #FFCCCC;
+background-color: #FFCCCC;
}
-->
</style></head>
<body>
-Engaging module globally
-</body>
-</html>
+<%
+ String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
+%>
+
+
+
+<form method="get" name="engaginModule" action="engagingglobally">
+<table border="0" width="100%" cellspacing="1" cellpadding="1">
+<tr>
+<td>
+
+
+</td>
+</tr>
+<tr>
+<td>Select a Module :</td>
+</tr><tr>
+<td>
+<select name="modules">
+ <%
+ HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
+ Collection moduleCol = moduels.values();
+ for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
+ ModuleDescription description = (ModuleDescription) iterator.next();
+ String modulename = description.getName().getLocalPart();
+ %> <option align="left" value="<%=modulename%>"><%=modulename%></option>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="submit" type="submit" value=" Engage " >
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <td>
+ <textarea cols="50" <%
+ if(status == null){
+ %>
+ style="display:none"
+ <%
+ } %>
+ ><%=status%></textarea>
+ </td>
+ </tr>
+ </table>
+ </form>
+ </body>
+ </html>
+
+
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/Constants.java Mon May 30 20:08:42 2005
@@ -102,6 +102,8 @@
public static final String LIST_PHASES = "listPhases";
+ public static final String ENGAGE_GLOBAL_MODULE = "engagingglobally";
+
/**
* Field SERVICE_MAP
*/
@@ -112,6 +114,8 @@
public static final String MODULE_MAP = "modulemap";
public static final String PHASE_LIST = "phaseList";
+
+ public static final String ENGAGE_STATUS = "engagestatus";
/**
* Errorness servcie
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/clientapi/MessageSender.java Mon May 30 20:08:42 2005
@@ -34,7 +34,7 @@
public MessageSender(ServiceContext service) {
super(service);
}
- public void send(String opName, OMElement toSend, Callback callback) throws AxisFault {
+ public void send(String opName, OMElement toSend) throws AxisFault {
OperationDescription axisOp = new OperationDescription(new QName(opName));
serviceContext.getServiceConfig().addOperation(axisOp);
super.send(axisOp,prepareTheSystem(toSend));
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/engine/AxisConfigurationImpl.java Mon May 30 20:08:42 2005
@@ -325,6 +325,13 @@
module = new DeploymentEngine().buildModule(file);
}
if (module != null) {
+ for (Iterator iterator = engagedModules.iterator(); iterator.hasNext();) {
+ QName qName = (QName) iterator.next();
+ if(moduleref.equals(qName)){
+ throw new AxisFault(moduleref.getLocalPart()+ " module alredy engaged globally" +
+ " operation terminated !!!");
+ }
+ }
new PhaseResolver(this).engageModuleGlobally(module);
} else {
throw new AxisFault(this + " Refer to invalid module "
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java?rev=179182&r1=179181&r2=179182&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java Mon May 30 20:08:42 2005
@@ -84,6 +84,9 @@
private static final String LIST_PHASES_JSP_NAME =
"viewphases.jsp";
+ private static final String ENGAGING_MODULE_GLOBALLY_JSP_NAME =
+ "engagingglobally.jsp";
+
/**
* Field LIST_SINGLE_SERVICE_JSP_NAME
*/
@@ -147,6 +150,10 @@
&& filePart.endsWith(Constants.LIST_PHASES)){
listPhases(httpServletRequest, httpServletResponse);
return;
+ }else if ((filePart != null)
+ && filePart.endsWith(Constants.ENGAGE_GLOBAL_MODULE)){
+ engageModulesGlobally(httpServletRequest, httpServletResponse);
+ return;
}
if (allowListServices
@@ -279,6 +286,24 @@
HashMap modules =((AxisConfigurationImpl) engineContext.getAxisConfiguration()).getModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
res.sendRedirect(LIST_AVAILABLE_MODULES_JSP_NAME);
+ }
+
+ private void engageModulesGlobally(HttpServletRequest req, HttpServletResponse res)
+ throws IOException {
+ HashMap modules =((AxisConfigurationImpl) engineContext.getAxisConfiguration()).getModules();
+ req.getSession().setAttribute(Constants.MODULE_MAP, modules);
+ String moduleName =(String)req.getParameter("modules");
+ req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
+ if(moduleName !=null){
+ try {
+ engineContext.getAxisConfiguration().engageModule(new QName(moduleName));
+ req.getSession().setAttribute(Constants.ENGAGE_STATUS, moduleName + " module engaged globally Successfully");
+ } catch (AxisFault axisFault) {
+ req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
+ }
+ }
+ req.getSession().setAttribute("modules",null);
+ res.sendRedirect(ENGAGING_MODULE_GLOBALLY_JSP_NAME);
}
private void listGloballyModules(HttpServletRequest req, HttpServletResponse res)