[wsas-java-dev] svn commit r1868 - in trunk/wsas/java/modules: core/src/org/wso2/wsas/transport/util www/extensions/core/js

svn at wso2.org svn at wso2.org
Tue Apr 17 21:39:58 PDT 2007


Author: azeez
Date: Tue Apr 17 21:39:48 2007
New Revision: 1868

Modified:
   trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/HttpGetRequestProcessor.java
   trunk/wsas/java/modules/www/extensions/core/js/services.js
Log:
1. Changing service operation name
2. Show wsdl2



Modified: trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/HttpGetRequestProcessor.java
==============================================================================
--- trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/HttpGetRequestProcessor.java	(original)
+++ trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/HttpGetRequestProcessor.java	Tue Apr 17 21:39:48 2007
@@ -150,11 +150,12 @@
                                                               serviceContextPath.length());
             if (wsdlType == 0) {
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
                 axisService.printWSDL(baos, ip, servicePath);
                 writeDocument(baos, outputStream, "annotated-wsdl.xsl", contextRoot);
             } else if (wsdlType == 1) {
-                axisService.printWSDL2(outputStream, ip, servicePath);
+                ByteArrayOutputStream baos = new ByteArrayOutputStream();
+                axisService.printWSDL2(baos, ip, servicePath);
+                writeDocument(baos, outputStream, "annotated-wsdl2.xsl", contextRoot);
             } else {
                 response.setContentType("text/html");
                 outputStream.write("<h4>WSDL for service not found</h4>".getBytes());
@@ -346,19 +347,20 @@
                 } else {
                     String ipAddress = "http://" + NetworkUtils.getLocalHostname() + ":" +
                                        ServerManager.httpPort;
+                    String version =
+                            ServerConfiguration.getInstance().getFirstProperty("Version");
                     outputStream.write(("<html><head>" +
                                         "<title>WSO2 Web Services Application Server v" +
-                                        ServerConfiguration.getInstance()
-                                                .getFirstProperty("Version") +
-                                                                             "Management Console" +
-                                                                             " - " +
-                                                                             axisService.getName() +
-                                                                             " Service Schema</title>" +
-                                                                             "</head>" +
-                                                                             "<body>" +
-                                                                             "<b>Schemas for " +
-                                                                             axisService.getName() +
-                                                                             " service</b><br/><br/>").getBytes());
+                                        version +
+                                        "Management Console" +
+                                        " - " +
+                                        axisService.getName() +
+                                        " Service Schema</title>" +
+                                        "</head>" +
+                                        "<body>" +
+                                        "<b>Schemas for " +
+                                        axisService.getName() +
+                                        " service</b><br/><br/>").getBytes());
                     if (schemas.size() != 0) {
                         for (int i = 0; i < schemas.size(); i++) {
                             String st = "<a href=\"" + ipAddress +
@@ -390,10 +392,11 @@
         writeDocument(baos, outputStream, "annotated-xsd.xsl", contextRoot);
     }
 
-    private static void writeDocument(ByteArrayOutputStream byteArryaOutStream, OutputStream out,
-                                      String annotatedXsl, String contextRoot) {
+    private static void writeDocument(ByteArrayOutputStream byteArryaOutStream,
+                                      OutputStream out,
+                                      String annotatedXsl,
+                                      String contextRoot) {
         XMLStreamWriter writer;
-
         try {
             XMLStreamReader reader =
                     XMLInputFactory.newInstance().
@@ -402,8 +405,7 @@
             StAXOMBuilder builder = new StAXOMBuilder(reader);
             OMElement schemaDocument = builder.getDocumentElement();
 
-            writer = XMLOutputFactory.newInstance().
-                    createXMLStreamWriter(out);
+            writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
             if (annotatedXsl != null) {
                 writer.writeProcessingInstruction("xml-stylesheet",
                                                   "  type=\"text/xsl\" href=\"" +
@@ -411,14 +413,11 @@
                                                   "/styles/" +
                                                   annotatedXsl + "\"");
             }
-
             schemaDocument.serialize(writer);
             writer.flush();
-
         } catch (XMLStreamException e) {
             log.error(e);
         }
-
     }
 
     public static void processInfo(ConfigurationContext configurationContext, String requestURI,

Modified: trunk/wsas/java/modules/www/extensions/core/js/services.js
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js/services.js	(original)
+++ trunk/wsas/java/modules/www/extensions/core/js/services.js	Tue Apr 17 21:39:48 2007
@@ -111,13 +111,11 @@
 }
 
 function loadFaultyServices() {
-    var body_xml = '<req:faultyServicesRequest xmlns:req="http://org.apache.axis2/xsd">\n' +
-                   ' </req:faultyServicesRequest>\n';
+    var body_xml = '<req:getNumberOfFaultyServicesRequest xmlns:req="http://org.apache.axis2/xsd">\n' +
+                   ' </req:getNumberOfFaultyServicesRequest>\n';
 
     var callURL = serverURL + "/" + "ServiceAdmin" ;
-    send("faultyServices", body_xml, "", callURL, "", false, loadFaultyServicesCallback);
-
-
+    send("getNumberOfFaultyServices", body_xml, "", callURL, "", false, loadFaultyServicesCallback);
 }
 
 function loadFaultyServicesCallback() {
@@ -1463,7 +1461,7 @@
     //    dynamicClientResponseVisibility(URL + rets[0].firstChild.nodeValue);
     //    window.location = URL + rets[0].firstChild.nodeValue;
     cursorClear();
-    
+
     dynamicClientResponseVisibilityAllBrowsers(data);
 }
 




More information about the Wsas-java-dev mailing list