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/06/29 06:29:56 UTC
svn commit: r202316 - in /webservices/axis/trunk/java/modules:
core/src/org/apache/axis/deployment/
core/src/org/apache/axis/deployment/repository/util/
core/src/org/apache/axis/description/
core/src/org/apache/axis/transport/http/ core/webapp/ samples...
Author: deepal
Date: Tue Jun 28 21:29:54 2005
New Revision: 202316
URL: http://svn.apache.org/viewcvs?rev=202316&view=rev
Log:
halfly completed viewing wsdl throuh ?wsdl
Modified:
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/util/ArchiveReader.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/AxisServlet.java
webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/ListingAgent.java
webservices/axis/trunk/java/modules/core/webapp/listService.jsp
webservices/axis/trunk/java/modules/core/webapp/listServices.jsp
webservices/axis/trunk/java/modules/core/webapp/listSingleService.jsp
webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/DeploymentEngine.java Tue Jun 28 21:29:54 2005
@@ -30,6 +30,7 @@
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamException;
+import javax.wsdl.factory.WSDLFactory;
import org.apache.axis.context.ConfigurationContextFactory;
import org.apache.axis.deployment.listener.RepositoryListenerImpl;
@@ -544,7 +545,7 @@
switch (type) {
case SERVICE:
try {
- //ServiceDescription service = archiveReader.createService(currentArchiveFile.getAbsolutePath());
+ // ServiceDescription service = archiveReader.createService(currentArchiveFile.getAbsolutePath());
ServiceDescription service = archiveReader.createService(currentArchiveFile);
archiveReader.readServiceArchive(currentArchiveFile.getAbsolutePath(), this, service);
addnewService(service);
@@ -552,12 +553,10 @@
} catch (DeploymentException de) {
log.info("Invalid service" + currentArchiveFile.getName());
log.info("DeploymentException " + de);
- de.printStackTrace();
serviceStatus = "Error:\n" + de.getMessage();
} catch (AxisFault axisFault) {
log.info("Invalid service" + currentArchiveFile.getName());
log.info("AxisFault " + axisFault);
- axisFault.printStackTrace();
serviceStatus = "Error:\n" + axisFault.getMessage();
} catch (Exception e) {
log.info("Invalid service" + currentArchiveFile.getName());
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/util/ArchiveReader.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/util/ArchiveReader.java?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/util/ArchiveReader.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/deployment/repository/util/ArchiveReader.java Tue Jun 28 21:29:54 2005
@@ -23,8 +23,8 @@
import org.apache.axis.description.AxisDescWSDLComponentFactory;
import org.apache.axis.description.ModuleDescription;
import org.apache.axis.description.ServiceDescription;
-import org.apache.axis.wsdl.WSDLVersionWrapper;
import org.apache.axis.wsdl.builder.WOMBuilderFactory;
+import org.apache.axis.wsdl.WSDLVersionWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.wsdl.WSDLDescription;
@@ -44,14 +44,20 @@
// ZipInputStream zin;
// boolean foundwsdl = false;
// ServiceDescription service = null;
+// Definition difinition = null;
// try {
// zin = new ZipInputStream(new FileInputStream(strArchive));
// ZipEntry entry;
// while ((entry = zin.getNextEntry()) != null) {
// if (entry.getName().equals(SERVICEWSDL)) {
-// WSDLDescription womDescription = WOMBuilderFactory.getBuilder(
+// WSDLVersionWrapper wsdlVersionWrapper = WOMBuilderFactory.getBuilder(
// WOMBuilderFactory.WSDL11).build(zin, new AxisDescWSDLComponentFactory());
-// service = (ServiceDescription )womDescription ;
+// WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
+// Iterator iterator = womDescription.getServices().keySet().iterator();
+// if(iterator.hasNext()){
+// service = (ServiceDescription)iterator.next();
+// }
+// difinition = wsdlVersionWrapper.getDefinition();
// foundwsdl = true;
// break;
// }
@@ -61,6 +67,7 @@
// service = new ServiceDescription();
// log.info("WSDL file not found for the service : " + filename);
// }
+// service.setWSDLDefinition(difinition);
// } catch (Exception e) {
// throw new DeploymentException(e);
// }
@@ -73,9 +80,8 @@
boolean foundservice = false;
try {
if(in!= null){
- WSDLVersionWrapper wsdlVersionWrapper = WOMBuilderFactory.getBuilder(
- WOMBuilderFactory.WSDL11).build(in, new AxisDescWSDLComponentFactory());
- WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
+ WSDLVersionWrapper wsdlVersionWrapper = WOMBuilderFactory.getBuilder(WOMBuilderFactory.WSDL11).build(in, new AxisDescWSDLComponentFactory());
+ WSDLDescription womDescription = wsdlVersionWrapper.getDescription();
Iterator iterator = womDescription.getServices().keySet().iterator();
if(iterator.hasNext()){
foundservice = true;
@@ -84,6 +90,7 @@
if(!foundservice){
service = new ServiceDescription();
}
+ service.setWSDLDefinition(wsdlVersionWrapper.getDefinition());
in.close();
} else {
service = new ServiceDescription();
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/description/ServiceDescription.java Tue Jun 28 21:29:54 2005
@@ -19,8 +19,15 @@
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.io.IOException;
+import java.io.StringWriter;
import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
import javax.xml.namespace.QName;
import org.apache.axis.context.MessageContext;
@@ -41,6 +48,10 @@
public class ServiceDescription
extends WSDLServiceImpl
implements WSDLService, ParameterInclude, FlowInclude, DescriptionConstants {
+
+ private Definition difDefinition = null; //to store the wsdl definition , which is build at the deployment time
+
+
/**
* TODO this should be in the WSDLInterface, yet we want it to have in the
* the Services, so we put this here for M1 until we foud better way to do
@@ -519,6 +530,25 @@
*/
public void setServiceDescription(String serviceDescription) {
this.serviceDescription = serviceDescription;
+ }
+
+ public Definition getWSDLDefinition() {
+ return difDefinition;
+ }
+
+ public void setWSDLDefinition(Definition difDefinition) {
+ this.difDefinition = difDefinition;
+ }
+
+ public void printWSDL(Writer out)throws AxisFault{
+ try {
+ WSDLFactory.newInstance().newWSDLWriter().writeWSDL(this.getWSDLDefinition(),out);
+ out.flush();
+ } catch (WSDLException e) {
+ throw new AxisFault(e);
+ } catch (IOException e) {
+ throw new AxisFault(e);
+ }
}
}
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=202316&r1=202315&r2=202316&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 Tue Jun 28 21:29:54 2005
@@ -153,6 +153,7 @@
protected void doPost(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
try {
+ System.out.println("came here");
Object sessionContext =
req.getSession().getAttribute(Constants.SESSION_CONTEXT_PROPERTY);
if (sessionContext == null) {
Modified: webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/ListingAgent.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/ListingAgent.java?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/ListingAgent.java (original)
+++ webservices/axis/trunk/java/modules/core/src/org/apache/axis/transport/http/ListingAgent.java Tue Jun 28 21:29:54 2005
@@ -1,20 +1,20 @@
/*
- * 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.
- *
- * Runtime state of the engine
- */
+* 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.
+*
+* Runtime state of the engine
+*/
package org.apache.axis.transport.http;
import java.io.IOException;
@@ -30,6 +30,7 @@
import org.apache.axis.context.ConfigurationContext;
import org.apache.axis.deployment.util.DeploymentData;
import org.apache.axis.description.OperationDescription;
+import org.apache.axis.description.ServiceDescription;
import org.apache.axis.engine.AxisConfigurationImpl;
import org.apache.axis.engine.AxisFault;
@@ -71,8 +72,8 @@
private ConfigurationContext configContext;
/**
- * Field allowListServices
- */
+ * Field allowListServices
+ */
private final boolean allowListServices = true;
/**
@@ -81,9 +82,9 @@
private final boolean allowListSingleService = true;
public void handle(
- HttpServletRequest httpServletRequest,
- HttpServletResponse httpServletResponse)
- throws IOException {
+ HttpServletRequest httpServletRequest,
+ HttpServletResponse httpServletResponse)
+ throws IOException {
String filePart = httpServletRequest.getRequestURL().toString();
if ((filePart != null) && filePart.endsWith(Constants.ADMIN_LISTSERVICES)) {
listAdminServices(httpServletRequest, httpServletResponse);
@@ -92,7 +93,7 @@
listModules(httpServletRequest, httpServletResponse);
return;
} else if (
- (filePart != null) && filePart.endsWith(Constants.LIST_GLOABLLY_ENGAGED_MODULES)) {
+ (filePart != null) && filePart.endsWith(Constants.LIST_GLOABLLY_ENGAGED_MODULES)) {
listGloballyModules(httpServletRequest, httpServletResponse);
return;
} else if ((filePart != null) && filePart.endsWith(Constants.LIST_PHASES)) {
@@ -117,11 +118,11 @@
viewServiceHandlers(httpServletRequest, httpServletResponse);
return;
} else if (
- (filePart != null) && filePart.endsWith(Constants.LIST_SERVICE_FOR_MODULE_ENGAMNET)) {
+ (filePart != null) && filePart.endsWith(Constants.LIST_SERVICE_FOR_MODULE_ENGAMNET)) {
lsitServiceformodules(httpServletRequest, httpServletResponse);
return;
} else if (
- (filePart != null) && filePart.endsWith(Constants.LIST_OPERATIONS_FOR_THE_SERVICE)) {
+ (filePart != null) && filePart.endsWith(Constants.LIST_OPERATIONS_FOR_THE_SERVICE)) {
engageModulesToOpeartion(httpServletRequest, httpServletResponse);
return;
}
@@ -148,8 +149,8 @@
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
req.getSession().setAttribute(
- Constants.ERROR_SERVICE_MAP,
- configContext.getAxisConfiguration().getFaulytServices());
+ Constants.ERROR_SERVICE_MAP,
+ configContext.getAxisConfiguration().getFaulytServices());
res.sendRedirect(LIST_MULTIPLE_SERVICE_JSP_NAME);
}
@@ -160,17 +161,17 @@
* @throws IOException
*/
private void listAdminServices(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
req.getSession().setAttribute(
- Constants.ERROR_SERVICE_MAP,
- configContext.getAxisConfiguration().getFaulytServices());
+ Constants.ERROR_SERVICE_MAP,
+ configContext.getAxisConfiguration().getFaulytServices());
res.sendRedirect(LIST_SRVICES_JSP_NAME);
}
private void selectService(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
req.getSession().setAttribute(Constants.MODULE_ENGAMENT, null);
@@ -180,23 +181,23 @@
String username = req.getParameter("userName");
String password = req.getParameter("password");
if (username == null
- || password == null
- || username.trim().equals("")
- || password.trim().equals("")) {
+ || password == null
+ || username.trim().equals("")
+ || password.trim().equals("")) {
throw new AxisFault("invalid user name");
}
String adminUserName =
- (String) ((AxisConfigurationImpl) configContext.getAxisConfiguration())
+ (String) ((AxisConfigurationImpl) configContext.getAxisConfiguration())
.getParameter(Constants.USER_NAME)
.getValue();
String adminPassword =
- (String) ((AxisConfigurationImpl) configContext.getAxisConfiguration())
+ (String) ((AxisConfigurationImpl) configContext.getAxisConfiguration())
.getParameter(Constants.PASSWORD)
.getValue();
if (username != null
- && password != null
- && username.equals(adminUserName)
- && password.equals(adminPassword)) {
+ && password != null
+ && username.equals(adminUserName)
+ && password.equals(adminPassword)) {
req.getSession().setAttribute(Constants.LOGGED, "Yes");
res.sendRedirect(ADMIN_JSP_NAME);
} else {
@@ -206,18 +207,18 @@
private void listModules(HttpServletRequest req, HttpServletResponse res) throws IOException {
HashMap modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
req.getSession().setAttribute(
- Constants.ERROR_MODULE_MAP,
- configContext.getAxisConfiguration().getFaulytModules());
+ Constants.ERROR_MODULE_MAP,
+ configContext.getAxisConfiguration().getFaulytModules());
res.sendRedirect(LIST_AVAILABLE_MODULES_JSP_NAME);
}
private void engageModulesGlobally(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
String moduleName = (String) req.getParameter("modules");
req.getSession().setAttribute(Constants.ENGAGE_STATUS, null);
@@ -225,8 +226,8 @@
try {
configContext.getAxisConfiguration().engageModule(new QName(moduleName));
req.getSession().setAttribute(
- Constants.ENGAGE_STATUS,
- moduleName + " module engaged globally Successfully");
+ Constants.ENGAGE_STATUS,
+ moduleName + " module engaged globally Successfully");
} catch (AxisFault axisFault) {
req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
}
@@ -236,9 +237,9 @@
}
private void engageModulesToOpeartion(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
String moduleName = (String) req.getParameter("modules");
@@ -252,8 +253,8 @@
serviceName = (String) req.getSession().getAttribute("service");
}
req.getSession().setAttribute(
- Constants.OPEARTION_MAP,
- configContext
+ Constants.OPEARTION_MAP,
+ configContext
.getAxisConfiguration()
.getService(new QName(serviceName))
.getOperations());
@@ -262,14 +263,14 @@
if (serviceName != null && moduleName != null && operationName != null) {
try {
OperationDescription od =
- configContext.getAxisConfiguration().getService(
- new QName(serviceName)).getOperation(
- new QName(operationName));
+ configContext.getAxisConfiguration().getService(
+ new QName(serviceName)).getOperation(
+ new QName(operationName));
od.engageModule(
- configContext.getAxisConfiguration().getModule(new QName(moduleName)));
+ configContext.getAxisConfiguration().getModule(new QName(moduleName)));
req.getSession().setAttribute(
- Constants.ENGAGE_STATUS,
- moduleName + " module engaged to the operation Successfully");
+ Constants.ENGAGE_STATUS,
+ moduleName + " module engaged to the operation Successfully");
} catch (AxisFault axisFault) {
req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
}
@@ -278,9 +279,9 @@
res.sendRedirect(ENGAGE_TO_OPERATION_JSP_NAME);
}
private void engageModulesToService(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
@@ -293,11 +294,11 @@
try {
configContext.getAxisConfiguration().getService(
- new QName(serviceName)).engageModule(
- configContext.getAxisConfiguration().getModule(new QName(moduleName)));
+ new QName(serviceName)).engageModule(
+ configContext.getAxisConfiguration().getModule(new QName(moduleName)));
req.getSession().setAttribute(
- Constants.ENGAGE_STATUS,
- moduleName + " module engaged to the service Successfully");
+ Constants.ENGAGE_STATUS,
+ moduleName + " module engaged to the service Successfully");
} catch (AxisFault axisFault) {
req.getSession().setAttribute(Constants.ENGAGE_STATUS, axisFault.getMessage());
}
@@ -307,15 +308,15 @@
}
private void listGloballyModules(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
Collection modules =
- ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getEngadgedModules();
+ ((AxisConfigurationImpl) configContext.getAxisConfiguration()).getEngadgedModules();
req.getSession().setAttribute(Constants.MODULE_MAP, modules);
res.sendRedirect(LIST_GLOABLLY_ENGAGED_MODULES_JSP_NAME);
}
private void lsitServiceformodules(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
HashMap services = configContext.getAxisConfiguration().getServices();
req.getSession().setAttribute(Constants.SERVICE_MAP, services);
req.getSession().setAttribute(Constants.MODULE_ENGAMENT, "Yes");
@@ -323,20 +324,20 @@
}
private void viewGlobalHandlers(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
req.getSession().setAttribute(
- Constants.GLOBAL_HANDLERS,
- configContext.getAxisConfiguration());
+ Constants.GLOBAL_HANDLERS,
+ configContext.getAxisConfiguration());
res.sendRedirect(VIEW_GLOBAL_HANDLERS_JSP_NAME);
}
private void viewServiceHandlers(HttpServletRequest req, HttpServletResponse res)
- throws IOException {
+ throws IOException {
String service = (String) req.getParameter("service");
if (service != null) {
req.getSession().setAttribute(
- Constants.SERVICE_HANDLERS,
- configContext.getAxisConfiguration().getService(new QName(service)));
+ Constants.SERVICE_HANDLERS,
+ configContext.getAxisConfiguration().getService(new QName(service)));
}
res.sendRedirect(VIEW_SERVICE_HANDLERS_JSP_NAME);
}
@@ -367,7 +368,7 @@
* @throws IOException
*/
private void listService(HttpServletRequest req, HttpServletResponse res, String filePart)
- throws IOException {
+ throws IOException {
String serviceName = filePart.substring(filePart.lastIndexOf("/") + 1, filePart.length());
HashMap services = configContext.getAxisConfiguration().getServices();
if ((services != null) && !services.isEmpty()) {
@@ -380,5 +381,5 @@
URI = URI.substring(0, URI.indexOf("services"));
res.sendRedirect(URI + LIST_SINGLE_SERVICE_JSP_NAME);
}
-
+
}
Modified: webservices/axis/trunk/java/modules/core/webapp/listService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/listService.jsp?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/listService.jsp (original)
+++ webservices/axis/trunk/java/modules/core/webapp/listService.jsp Tue Jun 28 21:29:54 2005
@@ -56,7 +56,7 @@
operations = axisService.getOperations();
operationsList = operations.values();
serviceName = axisService.getName().getLocalPart();
- %><hr><h2><font color="blue"><%=serviceName%></font></h2>
+ %><hr><h2><font color="blue"><a href="listSingleService.jsp?wsdl=<%=serviceName%>"><%=serviceName%></a></font></h2>
<h4>Service Description : <font color="black"><%=axisService.getServiceDescription()%></h4>
<%
Collection engagdeModules = axisService.getEngagedModules();
@@ -120,7 +120,7 @@
<%
}
}
- request.getSession().removeAttribute(Constants.SERVICE_MAP);
+ // request.getSession().removeAttribute(Constants.SERVICE_MAP);
status = true;
}if(!status){
%> There seems to be no services listed! Try hitting refresh <%
Modified: webservices/axis/trunk/java/modules/core/webapp/listServices.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/listServices.jsp?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/listServices.jsp (original)
+++ webservices/axis/trunk/java/modules/core/webapp/listServices.jsp Tue Jun 28 21:29:54 2005
@@ -82,7 +82,7 @@
<%
}
}
- request.getSession().removeAttribute(Constants.SERVICE_MAP);
+ // request.getSession().removeAttribute(Constants.SERVICE_MAP);
status = true;
}if(!status){
%> There seems to be no services listed! Try hitting refresh <%
Modified: webservices/axis/trunk/java/modules/core/webapp/listSingleService.jsp
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/core/webapp/listSingleService.jsp?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/core/webapp/listSingleService.jsp (original)
+++ webservices/axis/trunk/java/modules/core/webapp/listSingleService.jsp Tue Jun 28 21:29:54 2005
@@ -4,7 +4,10 @@
org.apache.axis.Constants,
java.util.Hashtable,
org.apache.axis.description.ServiceDescription,
- org.apache.axis.description.OperationDescription"%>
+ org.apache.axis.description.OperationDescription,
+ javax.xml.namespace.QName,
+ java.io.StringWriter,
+ java.io.PrintWriter"%>
<%--
Created by IntelliJ IDEA.
User: Ajith
@@ -25,47 +28,30 @@
ServiceDescription service = (ServiceDescription)request.getSession().getAttribute(Constants.SINGLE_SERVICE);
//System.out.println("service = " + service);
String isFault = (String)request.getSession().getAttribute(Constants.IS_FAULTY);
- System.out.println("isFault = " + isFault);
+ String wsdl = request.getParameter("wsdl");
+ boolean isWsdl = false;
+ if(wsdl!=null){
+ HashMap map = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+ ServiceDescription wsdlservice = (ServiceDescription)map.get(new QName(wsdl));
+ StringWriter writter = new StringWriter();
+ String value = writter.toString();
+ wsdlservice.printWSDL(writter);
+ response.sendRedirect(value);
+ //TODO fix me
+ isWsdl = true;
+ }
+// if(wsdl !=null){
+// HashMap services =(HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+// ServiceDescription service_wsdl =(ServiceDescription)services.get(new QName(wsdl));
+// service_wsdl.printWSDL(response.getWriter());
+// return;
+// }
if(Constants.IS_FAULTY.equals(isFault)){
Hashtable errornessservices =(Hashtable)request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
String servicName = (String)request.getParameter("serviceName");
%> <h3>This Web service has deployment faults</h3><%
%><font color="red" ><%=(String)errornessservices.get(servicName) %></font><%
- }else if (service!=null){
- %> <h2>This location contains a web service</h2><%
- HashMap operations;
- Collection operationsList;
-
-
- operations = service.getOperations();
- operationsList = operations.values();
-
-
- %>
- <hr><h3><font color="blue"><%=service.getName().getLocalPart()%></font></h3>
- <%
-
- if (operationsList.size() > 0) {
- %>
- <i>Available operations</i>
- <%
- } else {
- %>
- <i> There are no opeartions specified!!</i>
- <%
- }
- %><ul><%
- for (Iterator iterator1 = operationsList.iterator(); iterator1.hasNext();) {
- OperationDescription axisOperation = (OperationDescription) iterator1.next();
- %><li>
-<%=axisOperation.getName().getLocalPart()%></li>
-<%
- }
- %>
- </ul>
- <%
- request.getSession().removeAttribute(Constants.SINGLE_SERVICE);
}else{
%> Oh! this place seems to be empty!!! <%
}
Modified: webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl?rev=202316&r1=202315&r2=202316&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl (original)
+++ webservices/axis/trunk/java/modules/samples/test-resources/service.wsdl Tue Jun 28 21:29:54 2005
@@ -46,5 +46,4 @@
</wsdl:operation>
</wsdl:binding>
-
</wsdl:definitions>