[wsas-java-dev] svn commit r1206 - in trunk/wsas/java/modules/core: conf/rampart src/org/wso2/wsas/transport/util

svn at wso2.org svn at wso2.org
Fri Mar 9 00:08:06 PST 2007


Author: saminda
Date: Fri Mar  9 00:07:48 2007
New Revision: 1206

Modified:
   trunk/wsas/java/modules/core/conf/rampart/scenario-config.xml
   trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/HttpGetRequestProcessor.java
Log:
modified 


Modified: trunk/wsas/java/modules/core/conf/rampart/scenario-config.xml
==============================================================================
--- trunk/wsas/java/modules/core/conf/rampart/scenario-config.xml	(original)
+++ trunk/wsas/java/modules/core/conf/rampart/scenario-config.xml	Fri Mar  9 00:07:48 2007
@@ -69,7 +69,7 @@
         <Category>ut.related</Category>
         <Modules>
             <Module>rampart</Module>
-            <Module>rahas</Module>
+            <Module>rampart_sts</Module>
         </Modules>
     </Scenario>
     <Scenario id="scenario10">
@@ -78,7 +78,7 @@
         <Category>keystore.related</Category>
         <Modules>
             <Module>rampart</Module>
-            <Module>rahas</Module>
+            <Module>rampart_sts</Module>
         </Modules>
     </Scenario>
     <!--
@@ -96,7 +96,7 @@
            Following modules need to be disengaged when security is disabled
         -->
         <Modules>
-            <Module>rahas</Module>
+            <Module>rampart_sts</Module>
             <Module>rampart</Module>
         </Modules>
     </Scenario>

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	Fri Mar  9 00:07:48 2007
@@ -144,14 +144,6 @@
             response.setContentType("text/xml");
             // Filter out the 'root' from serviceContextPath
             String serviceContextPath = getServiceContextPath(configurationContext);
-            int indexOfServletPath =
-                    request.getContextPath().indexOf(serviceContextPath);
-            String contextRoot;
-            if (indexOfServletPath == -1) {
-                contextRoot = request.getContextPath();
-            } else {
-                contextRoot = requestURI.substring(0, indexOfServletPath);
-            }
 
             int index = serviceContextPath.lastIndexOf("/");
             String servicePath = serviceContextPath.substring(index + 1,
@@ -160,8 +152,7 @@
                 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 
                 axisService.printWSDL(baos, ip, servicePath);
-                writeDocument(baos, outputStream,
-                              contextRoot, "annotated-wsdl.xsl");
+                writeDocument(baos, outputStream,"annotated-wsdl.xsl");
             } else if (wsdlType == 1) {
                 axisService.printWSDL2(outputStream, ip, servicePath);
             } else {
@@ -332,22 +323,13 @@
                 outputStream.flush();
             }
 
-            int indexOfServletPath =
-                    request.getContextPath().indexOf(getServiceContextPath(configCtx));
-            String contextRoot;
-            if (indexOfServletPath == -1) {
-                contextRoot = request.getContextPath();
-            } else {
-                contextRoot = requestURI.substring(0, indexOfServletPath);
-            }
-
             ArrayList schemas = axisService.getSchema();
             if (schemas.size() == 1) {
 
                 response.setContentType("text/xml");
 
                 // Write to the output stream
-                processSchema((XmlSchema) schemas.get(0), outputStream, contextRoot);
+                processSchema((XmlSchema) schemas.get(0), outputStream);
 
             } else {
                 String idParam = request.getParameter("id");
@@ -355,7 +337,7 @@
                     XmlSchema schema = axisService.getSchema(Integer.parseInt(idParam));
                     if (schema != null) {
                         response.setContentType("text/xml");
-                        processSchema(schema, outputStream, contextRoot);
+                        processSchema(schema, outputStream);
                     } else {
                         response.setContentType("text/html");
                         outputStream.write("<h4>Schema not found!</h4>".getBytes());
@@ -400,15 +382,14 @@
     }
 
 
-    private static void processSchema(XmlSchema schema, OutputStream outputStream,
-                                      String contextRoot) {
+    private static void processSchema(XmlSchema schema, OutputStream outputStream) {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         schema.write(baos);
-        writeDocument(baos, outputStream, contextRoot, "annotated-xsd.xsl");
+        writeDocument(baos, outputStream, "annotated-xsd.xsl");
     }
 
-    private static void writeDocument(ByteArrayOutputStream byteArryaOutStream,
-                                      OutputStream out, String contextRoot, String annotatedXsl) {
+    private static void writeDocument(ByteArrayOutputStream byteArryaOutStream, OutputStream out,
+                                      String annotatedXsl) {
         XMLStreamWriter writer;
 
         try {
@@ -423,9 +404,8 @@
                     createXMLStreamWriter(out);
             if (annotatedXsl != null) {
                 writer.writeProcessingInstruction("xml-stylesheet",
-                                                  "type=\"text/xsl\" href=\"" +
-                                                  contextRoot +
-                                                  "/styles/" + annotatedXsl + "\"");
+                                                  "type=\"text/xsl\" href=\"" + "/styles/" +
+                                                  annotatedXsl + "\"");
             }
 
             schemaDocument.serialize(writer);




More information about the Wsas-java-dev mailing list