[wsas-java-dev] svn commit r3841 - in trunk/wsas/java/modules:
core/src/org/wso2/wsas/transport/util www/extensions/core/js
svn at wso2.org
svn at wso2.org
Fri Jun 15 01:06:16 PDT 2007
Author: saminda
Date: Fri Jun 15 01:05:47 2007
New Revision: 3841
Modified:
trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/RequestProcessorUtil.java
trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/Wsdl11Processor.java
trunk/wsas/java/modules/www/extensions/core/js/keystore.js
Log:
Allow annotation query string to annotate WSDL
Modified: trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/RequestProcessorUtil.java
==============================================================================
--- trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/RequestProcessorUtil.java (original)
+++ trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/RequestProcessorUtil.java Fri Jun 15 01:05:47 2007
@@ -32,10 +32,18 @@
public class RequestProcessorUtil {
private static Log log = LogFactory.getLog(RequestProcessorUtil.class);
+ /**
+ *
+ * @param byteArrayOutStream
+ * @param out
+ * @param annotatedXsl
+ * @param contextRoot
+ * @param annotation : If annotation is false PI would not be attached.
+ */
public static void writeDocument(ByteArrayOutputStream byteArrayOutStream,
OutputStream out,
String annotatedXsl,
- String contextRoot) {
+ String contextRoot,boolean annotation) {
XMLStreamWriter writer;
try {
ByteArrayInputStream bais =
@@ -45,7 +53,7 @@
StAXOMBuilder builder = new StAXOMBuilder(reader);
OMElement docElem = builder.getDocumentElement();
writer = XMLOutputFactory.newInstance().createXMLStreamWriter(out);
- if (annotatedXsl != null) {
+ if (annotatedXsl != null && annotation) {
writer.writeProcessingInstruction("xml-stylesheet",
" type=\"text/xsl\" href=\"" +
(contextRoot.equals("/") ? "" : contextRoot) +
Modified: trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/Wsdl11Processor.java
==============================================================================
--- trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/Wsdl11Processor.java (original)
+++ trunk/wsas/java/modules/core/src/org/wso2/wsas/transport/util/Wsdl11Processor.java Fri Jun 15 01:05:47 2007
@@ -32,14 +32,25 @@
public void process(final HttpServletRequest request,
final HttpServletResponse response,
final ConfigurationContext configurationContext) throws Exception {
+ String queryString = request.getQueryString();
+ boolean annotation = false;
+ if (queryString != null && queryString.length() != 0 ) {
+ if (queryString.indexOf("annotation") > -1) {
+ annotation = true;
+ }
+ }
+ final boolean annotation1 = annotation;
WSDLPrinter wsdlPrinter = new WSDLPrinter() {
+
+
public void printWSDL(AxisService axisService) throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
axisService.printWSDL(baos,NetworkUtils.getLocalHostname());
RequestProcessorUtil.writeDocument(baos,
response.getOutputStream(),
"annotated-wsdl.xsl",
- configurationContext.getContextRoot());
+ configurationContext.getContextRoot(),
+ annotation1);
}
};
printWSDL(configurationContext, request, response, wsdlPrinter);
Modified: trunk/wsas/java/modules/www/extensions/core/js/keystore.js
==============================================================================
--- trunk/wsas/java/modules/www/extensions/core/js/keystore.js (original)
+++ trunk/wsas/java/modules/www/extensions/core/js/keystore.js Fri Jun 15 01:05:47 2007
@@ -211,7 +211,7 @@
function deleteKeyStoreCallback() {
- wso2.wsf.Util.showResponseMessage(this.req);
+ wso2.wsf.Util.showResponseMessage(this.req.responseXML);
//loading the firstpage
keystoreSetting();
}
More information about the Wsas-java-dev
mailing list