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/08/01 05:57:41 UTC
svn commit: r226731 - in /webservices/axis/trunk/java/modules/core: conf/
src/org/apache/axis2/ src/org/apache/axis2/deployment/
src/org/apache/axis2/description/ src/org/apache/axis2/engine/
src/org/apache/axis2/transport/http/ webapp/
Author: deepal
Date: Sun Jul 31 20:56:15 2005
New Revision: 226731
URL: http://svn.apache.org/viewcvs?rev=226731&view=rev
Log:
Fixing the JIRA issue (AXIS2-97)
Added:
webservices/axis/trunk/java/modules/core/webapp/RemoveService.jsp
webservices/axis/trunk/java/modules/core/webapp/ServiceParaEdit.jsp
Modified:
webservices/axis/trunk/java/modules/core/conf/web.xml
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
webservices/axis/trunk/java/modules/core/webapp/LeftFrame.jsp
webservices/axis/trunk/java/modules/core/webapp/SelectService.jsp
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=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/conf/web.xml (original)
+++ webservices/axis/trunk/java/modules/core/conf/web.xml Sun Jul 31 20:56:15 2005
@@ -81,4 +81,20 @@
<servlet-name>AxisServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/servicedit</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/removeService</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/editServicepara</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/selectServiceParaEdit</url-pattern>
+ </servlet-mapping>
</web-app>
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/Constants.java Sun Jul 31 20:56:15 2005
@@ -1,18 +1,18 @@
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
package org.apache.axis2;
/**
@@ -96,6 +96,7 @@
public static final String LIST_SERVICE_FOR_MODULE_ENGAMNET = "listoperation";
+
/**
* List service for adminpagse
*/
@@ -114,6 +115,8 @@
public static final String VIEW_GLOBAL_HANDLERS = "viewGlobalHandlers";
public static final String SELECT_SERVICE = "selectService";
+ public static final String EDIR_SERVICE_PARA = "editServicepara";
+ public static final String SELECT_SERVICE_FOR_PARA_EDIT = "selectServiceParaEdit";
public static final String VIEW_SERVICE_HANDLERS = "viewServiceHandlers";
/**
@@ -121,13 +124,15 @@
*/
public static final String SERVICE_MAP = "servicemap";
+ public static final String SERVICE = "service";
+
public static final String OPEARTION_MAP = "operationmap";
/**
* Field Available modules
*/
public static final String MODULE_MAP = "modulemap";
- public static final String MODULE_ENGAMENT = "module_engaging";
+ public static final String SELECT_SERVICE_TYPE = "SELECT_SERVICE_TYPE";
public static final String GLOBAL_HANDLERS = "axisconfig";
public static final String SERVICE_HANDLERS = "serviceHandlers";
@@ -135,6 +140,8 @@
public static final String PHASE_LIST = "phaseList";
public static final String LIST_OPERATIONS_FOR_THE_SERVICE = "listOperations";
+
+ public static final String REMOVE_SERVICE = "removeService";
public static final String ENGAGE_STATUS = "engagestatus";
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/deployment/DeploymentEngine.java Sun Jul 31 20:56:15 2005
@@ -396,7 +396,7 @@
try {
loadServiceProperties(serviceMetaData);
axisConfig.addService(serviceMetaData);
-
+ serviceMetaData.setFileName(currentArchiveFile.getFile().getAbsolutePath());
ArrayList list = currentArchiveFile.getModules();
for (int i = 0; i < list.size(); i++) {
ModuleDescription module = axisConfig.getModule(
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/HandlerDescription.java Sun Jul 31 20:56:15 2005
@@ -1,23 +1,24 @@
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
package org.apache.axis2.description;
import org.apache.axis2.engine.Handler;
import javax.xml.namespace.QName;
+import java.util.ArrayList;
/**
* represent the deployment information about the handler
@@ -111,6 +112,10 @@
*/
public Parameter getParameter(String name) {
return parameterInclude.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return parameterInclude.getParameters();
}
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ModuleDescription.java Sun Jul 31 20:56:15 2005
@@ -19,6 +19,7 @@
import javax.xml.namespace.QName;
import java.util.HashMap;
+import java.util.ArrayList;
/**
* <p>This holds the information about a Module. </p>
@@ -133,6 +134,10 @@
*/
public Parameter getParameter(String name) {
return parameters.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return parameters.getParameters();
}
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/OperationDescription.java Sun Jul 31 20:56:15 2005
@@ -153,6 +153,12 @@
return (Parameter) paramInclude.getParameter(name);
}
+ public ArrayList getParameters() {
+ ParameterIncludeImpl paramInclude = (ParameterIncludeImpl) this
+ .getComponentProperty(PARAMETER_KEY);
+ return paramInclude.getParameters();
+ }
+
/**
* This method is responsible for finding a MEPContext for an incomming
* messages. An incomming message can be of two states.
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterInclude.java Sun Jul 31 20:56:15 2005
@@ -15,6 +15,8 @@
*/
package org.apache.axis2.description;
+import java.util.ArrayList;
+
/**
* Interface ParameterInclude
*/
@@ -36,4 +38,11 @@
* @return
*/
public Parameter getParameter(String name);
+
+ /**
+ * To get all the parameters in a given description
+ * @return
+ */
+ ArrayList getParameters();
+
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ParameterIncludeImpl.java Sun Jul 31 20:56:15 2005
@@ -1,21 +1,24 @@
/*
- * Copyright 2004,2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
+* Copyright 2004,2005 The Apache Software Foundation.
+*
+* Licensed under the Apache License, Version 2.0 (the "License");
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
package org.apache.axis2.description;
import java.util.HashMap;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
/**
* Class ParameterIncludeImpl
@@ -52,5 +55,15 @@
*/
public Parameter getParameter(String name) {
return (Parameter) parmeters.get(name);
+ }
+
+ public ArrayList getParameters() {
+ Collection col = parmeters.values();
+ ArrayList para_list = new ArrayList();
+ for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ Parameter parameter = (Parameter) iterator.next();
+ para_list.add(parameter);
+ }
+ return para_list;
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/ServiceDescription.java Sun Jul 31 20:56:15 2005
@@ -66,6 +66,8 @@
private String serviceDescription = "Not Specified";
+ private String fileName = "";
+
/**
* Constructor ServiceDescription
*/
@@ -334,6 +336,12 @@
return (Parameter) paramInclude.getParameter(name);
}
+ public ArrayList getParameters() {
+ ParameterIncludeImpl paramInclude =
+ (ParameterIncludeImpl) this.getComponentProperty(PARAMETER_KEY);
+ return paramInclude.getParameters();
+ }
+
/*
* (non-Javadoc)
*
@@ -636,6 +644,14 @@
public long getLastupdate(){
return lastupdate;
+ }
+
+ public String getFileName() {
+ return fileName;
+ }
+
+ public void setFileName(String fileName) {
+ this.fileName = fileName;
}
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportInDescription.java Sun Jul 31 20:56:15 2005
@@ -20,6 +20,7 @@
import org.apache.axis2.transport.TransportListener;
import javax.xml.namespace.QName;
+import java.util.ArrayList;
/**
* Represents a incoming transport deployed in AXis2
@@ -79,6 +80,10 @@
*/
public Parameter getParameter(String name) {
return paramInclude.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return paramInclude.getParameters();
}
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/description/TransportOutDescription.java Sun Jul 31 20:56:15 2005
@@ -20,6 +20,7 @@
import org.apache.axis2.transport.TransportSender;
import javax.xml.namespace.QName;
+import java.util.ArrayList;
/**
* Represents a transport deployed in AXis2
@@ -73,6 +74,10 @@
*/
public Parameter getParameter(String name) {
return paramInclude.getParameter(name);
+ }
+
+ public ArrayList getParameters() {
+ return paramInclude.getParameters();
}
/**
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/engine/AxisConfigurationImpl.java Sun Jul 31 20:56:15 2005
@@ -319,6 +319,10 @@
return paramInclude.getParameter(name);
}
+ public ArrayList getParameters() {
+ return paramInclude.getParameters();
+ }
+
/**
* Method addParameter
*
@@ -400,5 +404,5 @@
public void addObservers(AxisObserver axisObserver){
observersList.add(axisObserver);
}
-
+
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/AxisServlet.java Sun Jul 31 20:56:15 2005
@@ -219,4 +219,5 @@
}
return headerMap;
}
+
}
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis2/transport/http/ListingAgent.java Sun Jul 31 20:56:15 2005
@@ -23,6 +23,8 @@
import org.apache.axis2.deployment.util.PhasesInfo;
import org.apache.axis2.description.OperationDescription;
import org.apache.axis2.description.ServiceDescription;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.description.ParameterImpl;
import org.apache.axis2.engine.AxisConfigurationImpl;
import org.apache.axis2.i18n.Messages;
@@ -35,6 +37,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
public class ListingAgent {
@@ -47,6 +50,8 @@
private static final String SELECT_SERVICE_JSP_NAME = "SelectService.jsp";
+ private static final String REMOVE_SERVICE_JSP_NAME = "RemoveService.jsp";
+
private static final String ADMIN_JSP_NAME = "admin.jsp";
private static final String LIST_AVAILABLE_MODULES_JSP_NAME = "listModules.jsp";
@@ -67,6 +72,7 @@
private static final String VIEW_SERVICE_HANDLERS_JSP_NAME = "ViewServiceHandlers.jsp";
private static final String ENGAGE_TO_OPERATION_JSP_NAME = "enaggingtoanopeartion.jsp";
+ private static final String SERVICE_PARA_EDIT_JSP_NAME = "ServiceParaEdit.jsp";
public ListingAgent(ConfigurationContext configContext) {
this.configContext = configContext;
@@ -141,6 +147,18 @@
filePart.endsWith(Constants.LIST_OPERATIONS_FOR_THE_SERVICE)) {
engageModulesToOpeartion(httpServletRequest, httpServletResponse);
return;
+ } else if ((filePart != null) &&
+ filePart.endsWith(Constants.REMOVE_SERVICE)) {
+ removeService(httpServletRequest, httpServletResponse);
+ return;
+ }else if ((filePart != null) &&
+ filePart.endsWith(Constants.SELECT_SERVICE_FOR_PARA_EDIT)) {
+ lsitServiceforParameterChanged(httpServletRequest, httpServletResponse);
+ return;
+ } else if ((filePart != null) &&
+ filePart.endsWith(Constants.EDIR_SERVICE_PARA)) {
+ chageParameters(httpServletRequest, httpServletResponse);
+ return;
}
if (allowListServices && (filePart != null) &&
@@ -190,7 +208,7 @@
throws IOException {
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
- req.getSession().setAttribute(Constants.MODULE_ENGAMENT, null);
+ req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "VIEW");
res.sendRedirect(SELECT_SERVICE_JSP_NAME);
}
@@ -346,10 +364,108 @@
throws IOException {
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
- req.getSession().setAttribute(Constants.MODULE_ENGAMENT, "Yes");
+ req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "MODULE");
+ res.sendRedirect(SELECT_SERVICE_JSP_NAME);
+ }
+
+ private void lsitServiceforParameterChanged(HttpServletRequest req,
+ HttpServletResponse res)
+ throws IOException {
+ HashMap services = configContext.getAxisConfiguration().getServices();
+ req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+ req.getSession().setAttribute(Constants.SELECT_SERVICE_TYPE, "SERVICE_PARAMETER");
res.sendRedirect(SELECT_SERVICE_JSP_NAME);
}
+
+
+ private void chageParameters(HttpServletRequest req,
+ HttpServletResponse res)
+ throws IOException {
+ if(req.getParameter("changePara")!=null){
+ String serviceName = req.getParameter("service");
+ ServiceDescription service = configContext.getAxisConfiguration().
+ getService(new QName(serviceName));
+ if(service !=null){
+ ArrayList service_para = service.getParameters();
+ for (int i = 0; i < service_para.size(); i++) {
+ Parameter parameter = (Parameter) service_para.get(i);
+ String para = req.getParameter(serviceName + "_" + parameter.getName());
+ service.addParameter(new ParameterImpl(parameter.getName(),para));
+ }
+ HashMap operation = service.getOperations();
+ Collection op_col = operation.values();
+ for (Iterator iterator = op_col.iterator(); iterator.hasNext();) {
+ OperationDescription operationDescription =
+ (OperationDescription) iterator.next();
+ String op_name = operationDescription.getName().getLocalPart();
+ ArrayList operation_para = operationDescription.getParameters();
+ for (int i = 0; i < operation_para.size(); i++) {
+ Parameter parameter = (Parameter) operation_para.get(i);
+ String para = req.getParameter(op_name + "_" + parameter.getName());
+ operationDescription.addParameter(
+ new ParameterImpl(parameter.getName(),para));
+ }
+ }
+ }
+ res.setContentType("text/css");
+ PrintWriter out_writer = new PrintWriter(out);
+ out_writer.println("Parameters changed Successfully");
+ out_writer.flush();
+ out_writer.close();
+ req.getSession().removeAttribute(Constants.SERVICE);
+ return;
+
+ } else {
+ String service = (String) req.getParameter("service");
+ if (service != null) {
+ req.getSession().setAttribute(Constants.SERVICE,
+ configContext.getAxisConfiguration().getService(
+ new QName(service)));
+ }
+ }
+ res.sendRedirect(SERVICE_PARA_EDIT_JSP_NAME);
+ }
+
+ private void removeService(HttpServletRequest req,
+ HttpServletResponse res)
+ throws IOException {
+ if (req.getParameter("submit") != null) {
+ String serviceName = req.getParameter("service");
+ String turnoff = req.getParameter("turnoff") ;
+// String remove = req.getParameter("remove");
+ if(serviceName !=null){
+// if (remove !=null){
+// ServiceDescription service = configContext.getAxisConfiguration().
+// getService(new QName(serviceName));
+// if(service != null ){
+// File servicefile = new File(service.getFileName());
+// if(servicefile.exists()){
+// configContext.getAxisConfiguration().removeService(
+// new QName(serviceName));
+// servicefile.delete();
+// }
+//
+// }
+// }
+ if(turnoff !=null){
+ configContext.getAxisConfiguration().removeService(new QName(serviceName));
+ res.setContentType("text/css");
+ PrintWriter out_writer = new PrintWriter(out);
+ out_writer.println("Service removed from the system Successfully");
+ out_writer.flush();
+ out_writer.close();
+ return;
+ }
+ }
+
+ } else {
+ HashMap services = configContext.getAxisConfiguration().getServices();
+ req.getSession().setAttribute(Constants.SERVICE_MAP, services);
+ }
+ res.sendRedirect(REMOVE_SERVICE_JSP_NAME);
+ }
+
private void viewGlobalHandlers(HttpServletRequest req,
HttpServletResponse res)
throws IOException {
@@ -406,20 +522,10 @@
Object serviceObj = services.get(new QName(serviceName));
if (serviceObj != null) {
if (wsdl != null) {
- // StringWriter writer = new StringWriter();
- res.setContentType("text/xml");
+ res.setContentType("text/html");
PrintWriter out_writer = new PrintWriter(out);
((ServiceDescription) serviceObj).printWSDL(out_writer,
filePart);
- // String wsdl_value = writer.toString().trim() ;
- // if(wsdl_value == null || wsdl_value.trim().equals("")){
- // wsdl_value = "WSDL is not available!!!";
- // }
-
- // req.getSession().setAttribute(Constants.WSDL_CONTENT, wsdl_value);
- // PrintWriter out_writer = new PrintWriter(out);
- // System.out.println("wsdl_value = " + wsdl_value);
- // out_writer.write(wsdl_value);
out.flush();
out.close();
wsdl = null;
Modified: webservices/axis/trunk/java/modules/core/webapp/LeftFrame.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/LeftFrame.jsp?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/LeftFrame.jsp (original)
+++ webservices/axis/trunk/java/modules/core/webapp/LeftFrame.jsp Sun Jul 31 20:56:15 2005
@@ -32,12 +32,12 @@
<body>
<table width="100%">
- <tr>
+
+ <tr> <tr>
<td colspan="2" >
<b> System Components</b>
</td>
</tr>
- <tr>
<td>
</td>
@@ -137,6 +137,37 @@
</td>
<td>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" >
+ <b>Edit Service</b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="removeService" target="mainFrame">Turn off service</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="selectServiceParaEdit" target="mainFrame">Edit Service Parameters</a>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+
+ </td>
+ <td>
+
</td>
</tr>
<tr>
Added: webservices/axis/trunk/java/modules/core/webapp/RemoveService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/RemoveService.jsp?rev=226731&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/RemoveService.jsp (added)
+++ webservices/axis/trunk/java/modules/core/webapp/RemoveService.jsp Sun Jul 31 20:56:15 2005
@@ -0,0 +1,92 @@
+<%@ page import="java.util.HashMap,
+ java.util.Collection,
+ java.util.Iterator,
+ org.apache.axis2.description.ServiceDescription,
+ org.apache.axis2.Constants"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<title>Engaging Module to a Service</title>
+<style type="text/css">
+
+</style></head>
+
+<body>
+<form method="get" name="serviceRemove" action="removeService">
+ <table width="100%" border="0">
+<tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+<tr>
+ <td colspan="2" >
+ <b>Turn off service :</b> Will be removed the web service from the running system , and if the system
+ restart then the service will be available again
+ <br>
+<%-- <b>Remove Service :</b> The selected service will be removed from the file system and if the--%>
+<%-- system restart it wont be there next time--%>
+ </td>
+ </tr>
+ <tr>
+ <td> <hr></td>
+ <td>
+ <hr>
+ </td>
+ </tr>
+ <tr>
+ <td width="40%"> Select Service : </td>
+ <td>
+ <select name="service" class="selectBoxes" >
+
+ <%
+ HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+ Collection col = services.values();
+ for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ ServiceDescription serviceDescription = (ServiceDescription) iterator.next();
+ %> <option value="<%=serviceDescription.getName().getLocalPart()%>">
+ <%=serviceDescription.getName().getLocalPart()%></option> <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td width="40%">Turn Off Service </td>
+ <td width="60%"><input type="checkbox" name="turnoff">
+ </td>
+ </tr>
+<%-- <tr>--%>
+<%-- <td>Remove Service Permanently </td>--%>
+<%-- <td><input type="checkbox" name="remove">--%>
+<%-- </td>--%>
+<%-- </tr>--%>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>.</td>
+ <td>
+ <input name="submit" type="submit" value=" Save " >
+ <input name="reset" type="reset" value=" Clear " >
+ </td>
+ </tr>
+
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+
+</table>
+</form>
+</body>
+
+</html>
\ No newline at end of file
Modified: webservices/axis/trunk/java/modules/core/webapp/SelectService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/SelectService.jsp?rev=226731&r1=226730&r2=226731&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/SelectService.jsp (original)
+++ webservices/axis/trunk/java/modules/core/webapp/SelectService.jsp Sun Jul 31 20:56:15 2005
@@ -30,19 +30,23 @@
*/
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+
<html>
<head><title>Simple jsp page</title></head>
<body>
<%
String action ="";
String buttonName="" ;
- String status = (String)request.getSession().getAttribute(Constants.MODULE_ENGAMENT);
- if(status != null && status.equals("Yes")) {
+ String status = (String)request.getSession().getAttribute(Constants.SELECT_SERVICE_TYPE);
+ if(status != null && status.equals("MODULE")) {
action = "listOperations";
buttonName = " View Operations";
- } else {
+ } else if(status != null && status.equals("VIEW")){
buttonName = " View ";
action = "viewServiceHandlers";
+ } else if (status != null && status.equals("SERVICE_PARAMETER")){
+ buttonName = " Edit Parameters ";
+ action = Constants.EDIR_SERVICE_PARA;
}
%>
<form method="get" name="engaginModule" action="<%=action%>">
Added: webservices/axis/trunk/java/modules/core/webapp/ServiceParaEdit.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/ServiceParaEdit.jsp?rev=226731&view=auto
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/ServiceParaEdit.jsp (added)
+++ webservices/axis/trunk/java/modules/core/webapp/ServiceParaEdit.jsp Sun Jul 31 20:56:15 2005
@@ -0,0 +1,99 @@
+<%@ page import="org.apache.axis2.description.ServiceDescription,
+ org.apache.axis2.Constants,
+ java.util.ArrayList,
+ java.util.HashMap,
+ java.util.Collection,
+ java.util.Iterator,
+ org.apache.axis2.description.OperationDescription,
+ org.apache.axis2.engine.Phase,
+ org.apache.axis2.engine.Handler,
+ org.apache.axis2.description.Parameter"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+ <head><title>Service Parameter EDIT </title></head>
+ <body>
+ <form method="get" name="editServicepara" action="editServicepara">
+ <%
+ ServiceDescription service = (ServiceDescription)request.getSession().
+ getAttribute(Constants.SERVICE);
+ if(service != null ){
+ %> <table width="100%">
+
+ <tr>
+ <td colspan="2" ><b>
+ <%
+ String servicName = service.getName().getLocalPart();
+ %>Service Parameters :: <%=servicName%>
+ </b></td>
+ </tr>
+ <tr>
+ <td colspan="2" ><input style="display:none" name="service" value="<%=servicName%>"></td>
+ </tr>
+ <%
+ ArrayList service_para = service.getParameters();
+ for (int i = 0; i < service_para.size(); i++) {
+ Parameter parameter = (Parameter) service_para.get(i);
+ %>
+ <tr>
+ <td><%=parameter.getName()%></td>
+ <td><input type="text" value="<%=parameter.getValue()%>"
+ name="<%=(servicName + "_" + parameter.getName())%>">
+ </td>
+ </tr>
+ <%
+ }
+ HashMap operations = service.getOperations();
+ Collection ops = operations.values();
+ if(ops.size() >0){
+ %>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td colspan="2" > <b>Operation Paramaters :: </b>
+ </td>
+ </tr>
+ <%
+ }
+
+ ArrayList op_paras ;
+ for (Iterator iterator = ops.iterator(); iterator.hasNext();) {
+ OperationDescription description = (OperationDescription) iterator.next();
+ String opeartionName = description.getName().getLocalPart();
+ %>
+ <tr>
+ <td colspan="2" > </td>
+ </tr>
+ <tr>
+ <td colspan="2" ><b>Operation : <%=opeartionName%></b></td>
+ </tr>
+ <%
+ op_paras = description.getParameters();
+ for (int i = 0; i < op_paras.size(); i++) {
+ Parameter parameter = (Parameter) op_paras.get(i);
+ %>
+ <tr>
+ <td><%=parameter.getName()%></td>
+ <td><input type="text" value="<%=parameter.getValue()%>"
+ name="<%=(opeartionName + "_" + parameter.getName())%>">
+ </td>
+ </tr>
+ <%
+ }
+ }
+ %>
+ <tr>
+ <td>.</td>
+ <td>
+ <input name="changePara" type="submit" value=" Change " >
+ </td>
+ </tr>
+ </table>
+ <%
+ }
+
+ %>
+ <form>
+ </body>
+</html>
\ No newline at end of file