Author: tejones
Date: 2010-06-08 17:26:55 -0400 (Tue, 08 Jun 2010)
New Revision: 2208
Added:
sqlquerywebservice/.project
sqlquerywebservice/pom.xml
sqlquerywebservice/src/
sqlquerywebservice/src/main/
sqlquerywebservice/src/main/java/
sqlquerywebservice/src/main/java/org/
sqlquerywebservice/src/main/java/org/teiid/
sqlquerywebservice/src/main/java/org/teiid/dqp/
sqlquerywebservice/src/main/java/org/teiid/dqp/client/
sqlquerywebservice/src/main/java/org/teiid/dqp/client/impl/
sqlquerywebservice/src/main/java/org/teiid/dqp/client/impl/ServerRequest.java
sqlquerywebservice/src/main/java/org/teiid/soap/
sqlquerywebservice/src/main/java/org/teiid/soap/SOAPPlugin.java
sqlquerywebservice/src/main/java/org/teiid/soap/security/
sqlquerywebservice/src/main/java/org/teiid/soap/security/Credential.java
sqlquerywebservice/src/main/java/org/teiid/soap/service/
sqlquerywebservice/src/main/java/org/teiid/soap/service/BasicConnectionPoolFactory.java
sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionPoolFactory.java
sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionSource.java
sqlquerywebservice/src/main/java/org/teiid/soap/service/PoolingConnectionSource.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/handler/
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/handler/PWCBHandler.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Cell.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ColumnMetadata.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Connection.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionContextualRequest.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionlessRequest.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/CursorType.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Data.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/LogInParameters.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Property.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestId.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestInfo.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestType.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Results.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ResultsRequest.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Row.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlQueryWebServiceFault.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlWarning.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/TransactionAutoWrapType.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/log/
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/log/LogUtil.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebService.java
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebServiceFault.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/
sqlquerywebservice/src/main/java/org/teiid/soap/util/ErrorMessageKeys.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/SOAPConstants.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/ServletClientConstants.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/WebServiceUtil.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslationException.java
sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslator.java
sqlquerywebservice/src/main/resources/
sqlquerywebservice/src/main/resources/com/
sqlquerywebservice/src/main/resources/com/teiid/
sqlquerywebservice/src/main/resources/com/teiid/soap/
sqlquerywebservice/src/main/resources/com/teiid/soap/i18n.properties
sqlquerywebservice/src/main/webapp/
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorData.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorFilter.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorPage.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTableModel.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTextArea.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$ServiceFilterPanel.class
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet.class
sqlquerywebservice/src/main/webapp/WEB-INF/
sqlquerywebservice/src/main/webapp/WEB-INF/classes/
sqlquerywebservice/src/main/webapp/WEB-INF/classes/commons-logging.properties
sqlquerywebservice/src/main/webapp/WEB-INF/classes/log4j.properties
sqlquerywebservice/src/main/webapp/WEB-INF/conf/
sqlquerywebservice/src/main/webapp/WEB-INF/conf/axis2.xml
sqlquerywebservice/src/main/webapp/WEB-INF/lib/
sqlquerywebservice/src/main/webapp/WEB-INF/lib/soapmonitor-1.3.jar
sqlquerywebservice/src/main/webapp/WEB-INF/modules/
sqlquerywebservice/src/main/webapp/WEB-INF/modules/addressing-1.3.mar
sqlquerywebservice/src/main/webapp/WEB-INF/modules/modules.list
sqlquerywebservice/src/main/webapp/WEB-INF/modules/rahas-1.3.mar
sqlquerywebservice/src/main/webapp/WEB-INF/modules/rampart-1.3.mar
sqlquerywebservice/src/main/webapp/WEB-INF/modules/soapmonitor-1.3.mar
sqlquerywebservice/src/main/webapp/WEB-INF/org/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/handlers/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/handlers/soapmonitor/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorConstants.class
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ConnectionThread.class
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ServerSocketThread.class
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService.class
sqlquerywebservice/src/main/webapp/WEB-INF/services/
sqlquerywebservice/src/main/webapp/WEB-INF/services/SqlQueryWebService.aar
sqlquerywebservice/src/main/webapp/WEB-INF/services/service.aar
sqlquerywebservice/src/main/webapp/WEB-INF/services/services.list
sqlquerywebservice/src/main/webapp/WEB-INF/services/version.aar
sqlquerywebservice/src/main/webapp/WEB-INF/web.xml
sqlquerywebservice/src/main/webapp/WEB-INF/weblogic.xml
sqlquerywebservice/src/main/webapp/axis2-web/
sqlquerywebservice/src/main/webapp/axis2-web/ActivateService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/EngageToServiceGroup.jsp
sqlquerywebservice/src/main/webapp/axis2-web/Error/
sqlquerywebservice/src/main/webapp/axis2-web/Error/AuthError.html
sqlquerywebservice/src/main/webapp/axis2-web/Error/GenError.html
sqlquerywebservice/src/main/webapp/axis2-web/Error/error404.jsp
sqlquerywebservice/src/main/webapp/axis2-web/Error/error500.jsp
sqlquerywebservice/src/main/webapp/axis2-web/HappyAxis.jsp
sqlquerywebservice/src/main/webapp/axis2-web/InActivateService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/LeftFrame.jsp
sqlquerywebservice/src/main/webapp/axis2-web/ListServiceGroup.jsp
sqlquerywebservice/src/main/webapp/axis2-web/Login.jsp
sqlquerywebservice/src/main/webapp/axis2-web/MainFrame.jsp
sqlquerywebservice/src/main/webapp/axis2-web/SelectService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/ServiceParaEdit.jsp
sqlquerywebservice/src/main/webapp/axis2-web/TopFrame.jsp
sqlquerywebservice/src/main/webapp/axis2-web/ViewContexts.jsp
sqlquerywebservice/src/main/webapp/axis2-web/ViewGlobalHandlers.jsp
sqlquerywebservice/src/main/webapp/axis2-web/ViewServiceHandlers.jsp
sqlquerywebservice/src/main/webapp/axis2-web/admin.jsp
sqlquerywebservice/src/main/webapp/axis2-web/css/
sqlquerywebservice/src/main/webapp/axis2-web/css/axis-style.css
sqlquerywebservice/src/main/webapp/axis2-web/disengage.jsp
sqlquerywebservice/src/main/webapp/axis2-web/engagingglobally.jsp
sqlquerywebservice/src/main/webapp/axis2-web/engagingtoanoperation.jsp
sqlquerywebservice/src/main/webapp/axis2-web/engagingtoaservice.jsp
sqlquerywebservice/src/main/webapp/axis2-web/error.jsp
sqlquerywebservice/src/main/webapp/axis2-web/errorModule.jsp
sqlquerywebservice/src/main/webapp/axis2-web/globalModules.jsp
sqlquerywebservice/src/main/webapp/axis2-web/images/
sqlquerywebservice/src/main/webapp/axis2-web/images/asf-logo.gif
sqlquerywebservice/src/main/webapp/axis2-web/images/axis.gif
sqlquerywebservice/src/main/webapp/axis2-web/images/axis.jpg
sqlquerywebservice/src/main/webapp/axis2-web/images/axis_l.jpg
sqlquerywebservice/src/main/webapp/axis2-web/include/
sqlquerywebservice/src/main/webapp/axis2-web/include/adminfooter.inc
sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.inc
sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.jsp
sqlquerywebservice/src/main/webapp/axis2-web/include/footer.inc
sqlquerywebservice/src/main/webapp/axis2-web/include/header.inc
sqlquerywebservice/src/main/webapp/axis2-web/include/httpbase.jsp
sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.inc
sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.jsp
sqlquerywebservice/src/main/webapp/axis2-web/index.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listFaultyService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listGroupService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listModules.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listServices.jsp
sqlquerywebservice/src/main/webapp/axis2-web/listSingleService.jsp
sqlquerywebservice/src/main/webapp/axis2-web/upload.jsp
sqlquerywebservice/src/main/webapp/axis2-web/viewServiceContext.jsp
sqlquerywebservice/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
sqlquerywebservice/src/main/webapp/axis2-web/viewphases.jsp
sqlquerywebservice/src/main/webapp/images/
sqlquerywebservice/src/main/webapp/images/mmlogo.gif
sqlquerywebservice/src/main/webapp/index.jsp
sqlquerywebservice/src/main/webapp/wsdlurlframe.htm
sqlquerywebservice/src/main/webapp/wsdlurlgen.jsp
sqlquerywebservice/src/main/webapp/wsdlurls.jsp
sqlquerywebservice/src/main/wsdl/
sqlquerywebservice/src/main/wsdl/SqlQueryWebService.wsdl
sqlquerywebservice/src/test/
sqlquerywebservice/src/test/java/
sqlquerywebservice/src/test/java/org/
sqlquerywebservice/src/test/java/org/metamatrix/
sqlquerywebservice/src/test/java/org/metamatrix/soap/
sqlquerywebservice/src/test/java/org/metamatrix/soap/handler/
sqlquerywebservice/src/test/java/org/metamatrix/soap/handler/TestActionUpdateHandler.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestBasicConnectionPoolFactory.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestDataServiceWebServiceImpl.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestPoolingConnectionSource.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetVDBResourceServlet.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetWSDLServlet.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/sqlquerywebservice/
sqlquerywebservice/src/test/java/org/metamatrix/soap/sqlquerywebservice/TestSqlQueryWebService.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestEndpointUrlTranslatorStrategyImpl.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWSDLServletUtil.java
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWebServiceUtil.java
sqlquerywebservice/src/test/resources/
sqlquerywebservice/target/
sqlquerywebservice/target/classes/
sqlquerywebservice/target/classes/com/
sqlquerywebservice/target/classes/com/teiid/
sqlquerywebservice/target/classes/com/teiid/soap/
sqlquerywebservice/target/classes/com/teiid/soap/i18n.properties
Log:
Adding SqlQueryWebService code
Added: sqlquerywebservice/.project
===================================================================
--- sqlquerywebservice/.project (rev 0)
+++ sqlquerywebservice/.project 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>soap</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ </buildSpec>
+ <natures>
+ </natures>
+</projectDescription>
Added: sqlquerywebservice/pom.xml
===================================================================
--- sqlquerywebservice/pom.xml (rev 0)
+++ sqlquerywebservice/pom.xml 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,265 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>teiid</artifactId>
+ <groupId>org.jboss.teiid</groupId>
+ <version>7.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>teiid-soap</artifactId>
+ <packaging>war</packaging>
+ <name>SOAP</name>
+ <description>SOAP interface for web services.</description>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-common-core</artifactId>
+ <type>test-jar</type>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.teiid</groupId>
+ <artifactId>teiid-client-jdbc</artifactId>
+ <version>${project.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>beanshell</groupId>
+ <artifactId>bsh</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>saxon</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>saxon-dom</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>antlr</groupId>
+ <artifactId>stringtemplate</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.xml.soap</groupId>
+ <artifactId>saaj-api</artifactId>
+ <version>1.3</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- axis 2 (1.3) dependencies -->
+
+ <dependency>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-kernel</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.woden</groupId>
+ <artifactId>woden</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rampart</groupId>
+ <artifactId>rampart-core</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.woden</groupId>
+ <artifactId>woden</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xalan</groupId>
+ <artifactId>xalan</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mtompolicy</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-xmlbeans</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcprov-jdk15</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.sandesha2</groupId>
+ <artifactId>sandesha2-core</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mtompolicy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.sandesha2</groupId>
+ <artifactId>sandesha2-policy</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mtompolicy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.sandesha2</groupId>
+ <artifactId>sandesha2-client-constants</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mtompolicy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.sandesha2</groupId>
+ <artifactId>sandesha2-rampart-integration</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mtompolicy</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging-adapters</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-java2wsdl</artifactId>
+ <version>1.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.apache.ant</groupId>
+ <artifactId>ant</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>jaxen</groupId>
+ <artifactId>jaxen</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
+ </dependencies>
+
+</project>
\ No newline at end of file
Added: sqlquerywebservice/src/main/java/org/teiid/dqp/client/impl/ServerRequest.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/dqp/client/impl/ServerRequest.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/dqp/client/impl/ServerRequest.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,241 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.dqp.client.impl;
+
+import java.io.Serializable;
+import java.sql.ResultSet;
+
+
+/**
+ * @since 4.2
+ */
+public class ServerRequest {
+
+ public static final int REQUEST_TYPE_STATEMENT = 0;
+ public static final int REQUEST_TYPE_PREPARED_STATEMENT = 1;
+ public static final int REQUEST_TYPE_CALLABLE_STATEMENT = 2;
+
+ public static final int AUTOWRAP_OFF = 0;
+ public static final int AUTOWRAP_ON = 1;
+ public static final int AUTOWRAP_OPTIMISTIC = 2;
+ public static final int AUTOWRAP_PESSIMISTIC = 3;
+
+ private String sql;
+ private int requestType = REQUEST_TYPE_STATEMENT;
+ private Object[] bindParameters;
+ private int cursorType = ResultSet.TYPE_FORWARD_ONLY;
+ private int fetchSize;
+ private boolean partialResults;
+ private boolean xmlValidationMode;
+ private String xmlFormat;
+ private String xmlStyleSheet;
+ private int transactionAutoWrapMode = AUTOWRAP_OFF;
+ private boolean useResultSetCache;
+ private Serializable commandPayload;
+
+ public String getSql() {
+ return sql;
+ }
+ /**
+ * @since 4.2
+ */
+ public void setSql(String sql) {
+ this.sql = sql;
+ }
+
+ public int getRequestType() {
+ return requestType;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setRequestType(int type) {
+ this.requestType = type;
+ }
+
+ public Object[] getBindParameters() {
+ return bindParameters;
+ }
+ /**
+ * @since 4.2
+ */
+ public void setBindParameters(Object[] params) {
+ this.bindParameters = params;
+ }
+
+ public int getCursorType() {
+ return cursorType;
+ }
+ /**
+ * @since 4.2
+ */
+ public void setCursorType(int type) {
+ this.cursorType = type;
+ }
+
+ public int getFetchSize() {
+ return fetchSize;
+ }
+ /**
+ * @since 4.2
+ */
+ public void setFetchSize(int size) {
+ this.fetchSize = size;
+ }
+
+ public boolean getPartialResults() {
+ return partialResults;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setPartialResults(boolean flag) {
+ this.partialResults = flag;
+ }
+
+ public boolean getXMLValidationMode() {
+ return xmlValidationMode;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setXMLValidationMode(boolean flag) {
+ this.xmlValidationMode = flag;
+ }
+
+ public String getXMLFormat() {
+ return xmlFormat;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setXMLFormat(String format) {
+ this.xmlFormat = format;
+ }
+
+ public String getXMLStyleSheet() {
+ return xmlStyleSheet;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setXMLStyleSheet(String styleSheet) {
+ this.xmlStyleSheet = styleSheet;
+ }
+
+ public int getTransactionAutoWrapMode() {
+ return transactionAutoWrapMode;
+ }
+ /**
+ * @since 4.2
+ */
+ public void setTransactionAutoWrapMode(int autoWrapMode) {
+ this.transactionAutoWrapMode = autoWrapMode;
+ }
+
+ public boolean getUseResultSetCache() {
+ return useResultSetCache;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setUseResultSetCache(boolean flag) {
+ this.useResultSetCache = flag;
+ }
+
+ Serializable getCommandPayload() {
+ return commandPayload;
+ }
+
+ /**
+ * @since 4.2
+ */
+ public void setCommandPayload(Serializable payload) {
+ this.commandPayload = payload;
+ }
+
+// String getPortableString() {
+// StringBuffer buf = new StringBuffer("ServerRequest:")
+//
.append("sql").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(sql)).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("requestType").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Integer.toString(requestType))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("cursorType").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Integer.toString(cursorType))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("fetchSize").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Integer.toString(fetchSize))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("partialResults").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Boolean.toString(partialResults))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("xmlValidationMode").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Boolean.toString(xmlValidationMode))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("transactionAutoWrapMode").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Integer.toString(transactionAutoWrapMode))).append(PortableStringUtil.PROP_SEPARATOR)
+//
.append("useResultSetCache").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(Boolean.toString(useResultSetCache)));
+// if (xmlFormat != null) {
+//
buf.append(PortableStringUtil.PROP_SEPARATOR).append("xmlFormat").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(xmlFormat));
+// }
+// if (xmlStyleSheet != null) {
+//
buf.append(PortableStringUtil.PROP_SEPARATOR).append("xmlStyleSheet").append(PortableStringUtil.EQUALS).append(PortableStringUtil.escapeString(xmlStyleSheet));
+// }
+// if (commandPayload != null) {
+//
buf.append(PortableStringUtil.PROP_SEPARATOR).append("commandPayload").append(PortableStringUtil.EQUALS).append(PortableStringUtil.encode(commandPayload));
+// }
+// if (bindParameters != null) {
+//
buf.append(PortableStringUtil.PROP_SEPARATOR).append("bindParameters").append(PortableStringUtil.EQUALS).append(PortableStringUtil.encode(bindParameters));
+// }
+// return buf.toString();
+// }
+//
+// static ServerRequest createServerRequestFromPortableString(String portableString)
throws MetaMatrixProcessingException {
+// String[] parts = PortableStringUtil.getParts(portableString,
PortableStringUtil.PROP_SEPARATOR);
+// if (parts == null || parts.length < 8 || parts.length > 12 ||
!parts[0].startsWith(HEADER)) {
+// throw new MetaMatrixProcessingException("");
+// }
+// parts[0] = parts[0].substring(HEADER.length());
+//
+// ServerRequest request = new ServerRequest();
+// request.sql =
PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[0],
PortableStringUtil.EQUALS)[1]);
+// request.requestType =
Integer.parseInt(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[1],
PortableStringUtil.EQUALS)[1]));
+// request.cursorType =
Integer.parseInt(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[2],
PortableStringUtil.EQUALS)[1]));
+// request.fetchSize =
Integer.parseInt(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[3],
PortableStringUtil.EQUALS)[1]));
+// request.partialResults =
Boolean.valueOf(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[4],
PortableStringUtil.EQUALS)[1])).booleanValue();
+// request.xmlValidationMode =
Boolean.valueOf(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[5],
PortableStringUtil.EQUALS)[1])).booleanValue();
+// request.transactionAutoWrapMode =
Integer.parseInt(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[6],
PortableStringUtil.EQUALS)[1]));
+// request.useResultSetCache =
Boolean.valueOf(PortableStringUtil.unescapeString(PortableStringUtil.getParts(parts[7],
PortableStringUtil.EQUALS)[1])).booleanValue();
+//
+// for (int i = 8; i < parts.length; i++) {
+// String[] propValPair = PortableStringUtil.getParts(parts[i],
PortableStringUtil.EQUALS);
+// if (propValPair[0].equals("xmlFormat")) {
+// request.xmlFormat = PortableStringUtil.unescapeString(propValPair[1]);
+// } else if (propValPair[0].equals("xmlStyleSheet")) {
+// request.xmlStyleSheet =
PortableStringUtil.unescapeString(propValPair[1]);
+// } else if (propValPair[0].equals("commandPayload")) {
+// request.commandPayload =
(Serializable)PortableStringUtil.decode(propValPair[1]);
+// } else if (propValPair[0].equals("bindParameters")) {
+// request.bindParameters =
(Object[])PortableStringUtil.decode(propValPair[1]);
+// }
+// }
+//
+// return request;
+// }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/SOAPPlugin.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/SOAPPlugin.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/SOAPPlugin.java 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap;
+
+import java.util.ResourceBundle;
+
+import org.teiid.core.BundleUtil;
+
+
+public class SOAPPlugin {
+ private static final String PLUGIN_ID = "org.teiid.soap" ; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = PLUGIN_ID + ".i18n";
//$NON-NLS-1$
+ public static final BundleUtil Util = new
BundleUtil(PLUGIN_ID,BUNDLE_NAME,ResourceBundle.getBundle(BUNDLE_NAME));
+
+}
+
Added: sqlquerywebservice/src/main/java/org/teiid/soap/security/Credential.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/security/Credential.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/security/Credential.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.security;
+
+import com.metamatrix.core.util.StringUtil;
+
+public class Credential {
+
+ private String userName = StringUtil.Constants.EMPTY_STRING;
+ private byte[] password = StringUtil.Constants.EMPTY_STRING.getBytes();
+
+ public Credential(String name, byte[] password) {
+ this.password = password;
+ this.userName = name;
+ }
+
+ public byte[] getPassword() {
+ return password;
+ }
+
+ public String getUserName() {
+ return userName;
+ }
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/service/BasicConnectionPoolFactory.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/service/BasicConnectionPoolFactory.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/service/BasicConnectionPoolFactory.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import com.metamatrix.common.jdbc.JDBCUtil;
+import com.metamatrix.common.jdbc.SimplePooledConnectionSource;
+
+/**
+ * This is the basic implementation of the ConnectionPoolFactory interface.
+ *
+ * @since 4.3
+ */
+public class BasicConnectionPoolFactory implements
+ ConnectionPoolFactory {
+
+ /*
+ * This is the set of default properties that are used to drive the way that the
pools produced by this factory behaves.
+ */
+ private static final Properties defaultProperties = new Properties();
+ public static final String MMPOOL_PROPERTIES_FILENAME =
"/teiidpool.properties"; //$NON-NLS-1$
+
+ static {
+ /*
+ * check for system property overrides and if none exist, use the defaults.
+ */
+ defaultProperties.setProperty(INITIAL_POOL_SIZE_PROPERTY_KEY,
String.valueOf(INITIAL_POOL_SIZE_PROPERTY_DEFAULT));
+ defaultProperties.setProperty(MAX_ACTIVE_CONNECTIONS_PROPERTY_KEY,
String.valueOf(MAX_ACTIVE_CONNECTIONS_DEFAULT));
+ defaultProperties.setProperty(MAX_IDLE_CONNECTIONS_PROPERTY_KEY,
String.valueOf(MAX_IDLE_CONNECTIONS_DEFAULT));
+ defaultProperties.setProperty(MAX_WAIT_PROPERTY_KEY,
String.valueOf(MAX_WAIT_PROPERTY_DEFAULT));
+ defaultProperties.setProperty(MIN_IDLE_COUNT_PROPERTY_KEY,
String.valueOf(MIN_IDLE_COUNT_PROPERTY_DEFAULT));
+ defaultProperties.setProperty(MIN_EVICTABLE_IDLE_TIME_MILLIS_KEY,
String.valueOf(MIN_EVICTABLE_IDLE_TIME_MILLIS_DEFAULT));
+ defaultProperties.setProperty(TIME_BETWEEN_EVICTION_THREAD_RUNS_KEY,
+
String.valueOf(TIME_BETWEEN_EVICTION_THREAD_RUNS_DEFAULT));
+ defaultProperties.setProperty(TIME_BETWEEN_EVICTION_THREAD_RUNS_KEY,
+ String.valueOf(TIME_BETWEEN_EVICTION_THREAD_RUNS_DEFAULT));
+ defaultProperties.setProperty(ConnectionSource.DRIVER_CLASS,
"com.metamatrix.jdbc.MMDriver"); //$NON-NLS-1$
+ }
+
+ /**
+ * @see
com.metamatrix.soap.service.ConnectionPoolFactory#createConnectionPool(java.util.Properties)
+ * @since 4.3
+ */
+ public DataSource createConnectionPool(final Properties poolProperties) {
+ if (poolProperties == null) {
+ return null;
+ }
+ Properties p = new Properties(poolProperties);
+ /* 1. 'mergedProperties' will contain the available properties,
constructed in the correct sequence
+ * so that propery values that should override other values, will override
them.
+ * 2. 'mergedProperties' must be recreated from scratch every time
'createConnectionPool' is called.
+ */
+ Properties mergedProperties = createMergedProperties( poolProperties );
+
+ p.setProperty(JDBCUtil.DRIVER,
mergedProperties.getProperty(ConnectionSource.DRIVER_CLASS));
+ p.setProperty(JDBCUtil.USERNAME,
mergedProperties.getProperty(ConnectionSource.USERNAME));
+ p.setProperty(JDBCUtil.PASSWORD,
mergedProperties.getProperty(ConnectionSource.PASSWORD));
+ p.setProperty(JDBCUtil.DATABASE,
poolProperties.getProperty(ConnectionSource.SERVER_URL));
+ p.setProperty(SimplePooledConnectionSource.MAXIMUM_RESOURCE_POOL_SIZE,
mergedProperties.getProperty(MAX_ACTIVE_CONNECTIONS_PROPERTY_KEY));
+ p.setProperty(SimplePooledConnectionSource.WAIT_TIME_FOR_RESOURCE,
mergedProperties.getProperty(MAX_WAIT_PROPERTY_KEY));
+ return new SimplePooledConnectionSource(p);
+ }
+
+ protected static Properties createMergedProperties( Properties poolProperties ) {
+
+ // 1. start with the default properties
+ Properties mergedProperties = new Properties( defaultProperties );
+
+ // 2. add properties from mmpool.properties
+ mergedProperties.putAll( getMMPoolProperties() );
+
+ // 3. add System.properties
+ mergedProperties.putAll(System.getProperties());
+
+ // 4. add specific poolProperties
+ mergedProperties.putAll( poolProperties );
+
+ return mergedProperties;
+ }
+
+ protected static Properties getMMPoolProperties() {
+ Properties p = new Properties();
+
+ InputStream is =
BasicConnectionPoolFactory.class.getClassLoader().getResourceAsStream(
MMPOOL_PROPERTIES_FILENAME ); //$NON-NLS-1$
+
+ if ( is != null ) {
+ try {
+ p.load( is );
+ } catch( IOException ioe ) {
+ return new Properties();
+ }
+ }
+
+ return p;
+ }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionPoolFactory.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionPoolFactory.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionPoolFactory.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+/**
+ * This interface defined the constants and methods used to create connection pools.
+ *
+ * @since 4.3
+ */
+public interface ConnectionPoolFactory {
+
+ /**
+ * This property defines how many connections will be created when the pool is
instantiated.
+ */
+ public static final String INITIAL_POOL_SIZE_PROPERTY_KEY =
"com.metamatrix.soap.service.initpoolsize"; //$NON-NLS-1$
+
+ /**
+ * The value for this property defines the maximum number of connections that can be
available in the pool at any one time.
+ */
+ public static final String MAX_ACTIVE_CONNECTIONS_PROPERTY_KEY =
"com.metamatrix.soap.service.maxactiveconnections";//$NON-NLS-1$
+
+ /**
+ * This value for this property defines the maximum number of connections that are
idle in the pool at one time.
+ */
+ public static final String MAX_IDLE_CONNECTIONS_PROPERTY_KEY =
"com.metamatrix.soap.service.maxidleconnections";//$NON-NLS-1$
+
+ /**
+ * The value for this property defines the maximum amount of time to block a client
that requests a connection from the pool.
+ * An Exception will be throw to the client if this amount of time is exceeded.
+ */
+ public static final String MAX_WAIT_PROPERTY_KEY =
"com.metamatrix.soap.service.maxwait";//$NON-NLS-1$
+
+ /**
+ * The value for this property defines the minimum number of idle connections that
will be available in the pool at any time.
+ */
+ public static final String MIN_IDLE_COUNT_PROPERTY_KEY =
"com.metamatrix.soap.service.minidlecount"; //$NON-NLS-1$
+
+ /**
+ * The value for this property defines the amount of time a connection can be idle in
the pool before being 'destroyed'.
+ */
+ public static final String MIN_EVICTABLE_IDLE_TIME_MILLIS_KEY =
"com.metamatrix.soap.service.minevictableidletime"; //$NON-NLS-1$
+
+ /**
+ * The value for this property defines the amount of time between checks for
connections that have exceeded the
+ * MIN_EVICTABLE_IDLE_TIME.
+ */
+ public static final String TIME_BETWEEN_EVICTION_THREAD_RUNS_KEY =
"com.metamatrix.soap.service.timebetweenevictionthreadruns"; //$NON-NLS-1$
+
+ /*
+ * These are the DBCP pool property defaults we will use for all pools created by
this factory instance. These properties can
+ * be overridden by setting them as JVM properties. property keys are located in the
interface of this class
+ * ConnectionPoolFactory.
+ */
+ public static final int INITIAL_POOL_SIZE_PROPERTY_DEFAULT = 1;
+ public static final int MAX_ACTIVE_CONNECTIONS_DEFAULT = 25;
+ public static final int MAX_IDLE_CONNECTIONS_DEFAULT = 10;
+ public static final int MAX_WAIT_PROPERTY_DEFAULT = 30000;
+ public static final int MIN_IDLE_COUNT_PROPERTY_DEFAULT = 0;
+ public static final int MIN_EVICTABLE_IDLE_TIME_MILLIS_DEFAULT = 600000;
+ public static final int TIME_BETWEEN_EVICTION_THREAD_RUNS_DEFAULT = 60000;
+
+ public DataSource createConnectionPool(Properties connectionProperties);
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionSource.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionSource.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/service/ConnectionSource.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+/**
+ * This is the interface that the Data Service feature uses to get Connections.
+ */
+public interface ConnectionSource {
+
+ /*
+ * These property keys are intended to be used to denote property values in the
Properties object passed to the getConnection ()
+ * method of this interface.
+ */
+
+ /**
+ * This is a key that is used for the JDBC Connection URL for an MM Server.
+ */
+ public static final String SERVER_URL = "ServerURL"; //$NON-NLS-1$
+
+ /**
+ * This is a property key that is used for the username used to connect to an MM
Server.
+ */
+ public static final String USERNAME = "Username"; //$NON-NLS-1$
+
+ /**
+ * This is a property key that is used for the password used to connect to an MM
Server.
+ */
+ public static final String PASSWORD = "Password"; //$NON-NLS-1$
+
+ /**
+ * This is a property key that is used for the driver class used to connect to an MM
Server.
+ */
+ public static final String DRIVER_CLASS = "DriverClass"; //$NON-NLS-1$
+
+ public Connection getConnection(Properties connectionProperties) throws
SQLException;
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/service/PoolingConnectionSource.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/service/PoolingConnectionSource.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/service/PoolingConnectionSource.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import com.metamatrix.soap.SOAPPlugin;
+
+/**
+ * This implmentation of ConnectionSource uses a HashMap to cache instances of Connection
Pools with their connection properties
+ * as the key.
+ */
+public class PoolingConnectionSource implements
+ ConnectionSource {
+
+ private static PoolingConnectionSource INSTANCE = new PoolingConnectionSource();
+
+ /**
+ * The internal factory used to create pools.
+ */
+ private ConnectionPoolFactory poolFactory;
+
+ /**
+ * The internal Map of Connection pools keyed by the connection properties used to
create them.
+ */
+ private Map pools = new HashMap();
+
+ /**
+ * Constructor that instantiates a BasicConnectionPoolFactory for pool creation
duties.
+ *
+ *
+ */
+ public PoolingConnectionSource() {
+ poolFactory = new BasicConnectionPoolFactory();
+ }
+
+ /**
+ * Constructor that allows the user to pass in their own implementation of
ConnectionPoolFactory.
+ *
+ * @param poolFactory the connection pool factory that will be used to create
connection pools.
+ *
+ */
+ public PoolingConnectionSource(final ConnectionPoolFactory poolFactory) {
+ this.poolFactory = poolFactory;
+ }
+
+ public static PoolingConnectionSource getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * @see
com.metamatrix.soap.service.ConnectionSource#getConnection(java.util.Properties)
+ * @since 4.3
+ */
+ public Connection getConnection(final Properties connectionProperties) throws
SQLException {
+ if (poolFactory == null) {
+ throw new SQLException(
+ SOAPPlugin.Util
+
.getString("BasicConnectionPool.The_connection_pool_factory_given_the_Pooling_Connection_Source"));
//$NON-NLS-1$
+ }
+
+ Object pool = pools.get(connectionProperties);
+
+ if (pool == null) {
+ pool = createPool(connectionProperties);
+ pools.put(connectionProperties, pool);
+ }
+
+
+
+ final DataSource source = (DataSource)pool;
+ if (source != null) {
+ return source.getConnection();
+ }
+
+ throw new
SQLException(SOAPPlugin.Util.getString("PoolingConnectionSource.The_DataSource_instance_pulled_from_the"));
//$NON-NLS-1$
+
+ }
+
+ /**
+ * This method will create a Connection Pool.
+ * @param properties the connection properties to be used to create connections in
the pool.
+ * See ConnectionSource for key values.
+ * @return A connection pool instance as an Object.
+ * @throws SQLException
+ *
+ */
+ private Object createPool(final Properties properties) throws SQLException {
+ return poolFactory.createConnectionPool(properties);
+ }
+
+ /**
+ * This method can be used to check to see if this Connection Source has a poool
with
+ * the passed in properties
+ * @param connectionProperties The properties to check to see if there is a matching
pool for in
+ * this connection source.
+ * @return true if a pool is found with the matching passed in properties.
+ *
+ */
+ protected boolean hasPool(final Properties connectionProperties) {
+ return pools.get(connectionProperties)!=null;
+ }
+
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/handler/PWCBHandler.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/handler/PWCBHandler.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/handler/PWCBHandler.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.sqlquerywebservice.handler;
+
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+
+/**
+ * This class is required for JAAS Security. We will just default to the
+ * username/password set by the username token.
+ */
+public class PWCBHandler implements CallbackHandler {
+
+ /* (non-Javadoc)
+ * @see
javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
+ */
+ public void handle(Callback[] callbacks) throws IOException,
+ UnsupportedCallbackException {
+ }
+
+}
\ No newline at end of file
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Cell.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Cell.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Cell.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Bean representing the value of a row/column.
+ */
+public class Cell {
+
+ protected java.lang.String value;
+
+ public java.lang.String getValue() {
+ return value;
+ }
+
+ public void setValue(java.lang.String value) {
+ this.value = value;
+ }
+
+}
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ColumnMetadata.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ColumnMetadata.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ColumnMetadata.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,202 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * This class contains metamdata values for a given result set.
+ */
+public class ColumnMetadata {
+
+ protected boolean autoIncrement;
+
+ public boolean isAutoIncrement() {
+ return autoIncrement;
+ }
+
+ public void setAutoIncrement(boolean autoIncrement) {
+ this.autoIncrement = autoIncrement;
+ }
+
+ protected boolean caseSensitive;
+
+ public boolean isCaseSensitive() {
+ return caseSensitive;
+ }
+
+ public void setCaseSensitive(boolean caseSensitive) {
+ this.caseSensitive = caseSensitive;
+ }
+
+ protected java.lang.String columnClassName;
+
+ public java.lang.String getColumnClassName() {
+ return columnClassName;
+ }
+
+ public void setColumnClassName(java.lang.String columnClassName) {
+ this.columnClassName = columnClassName;
+ }
+
+ protected java.lang.String columnDataType;
+
+ public java.lang.String getColumnDataType() {
+ return columnDataType;
+ }
+
+ public void setColumnDataType(java.lang.String columnDataType) {
+ this.columnDataType = columnDataType;
+ }
+
+ protected int columnDisplaySize;
+
+ public int getColumnDisplaySize() {
+ return columnDisplaySize;
+ }
+
+ public void setColumnDisplaySize(int columnDisplaySize) {
+ this.columnDisplaySize = columnDisplaySize;
+ }
+
+ protected java.lang.String columnName;
+
+ public java.lang.String getColumnName() {
+ return columnName;
+ }
+
+ public void setColumnName(java.lang.String columnName) {
+ this.columnName = columnName;
+ }
+
+ protected boolean currency;
+
+ public boolean isCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(boolean currency) {
+ this.currency = currency;
+ }
+
+ protected java.lang.String getColumnLabel;
+
+ public java.lang.String getGetColumnLabel() {
+ return getColumnLabel;
+ }
+
+ public void setGetColumnLabel(java.lang.String getColumnLabel) {
+ this.getColumnLabel = getColumnLabel;
+ }
+
+ protected boolean nullable;
+
+ public boolean isNullable() {
+ return nullable;
+ }
+
+ public void setNullable(boolean nullable) {
+ this.nullable = nullable;
+ }
+
+ protected int precision;
+
+ public int getPrecision() {
+ return precision;
+ }
+
+ public void setPrecision(int precision) {
+ this.precision = precision;
+ }
+
+ protected boolean readOnly;
+
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ public void setReadOnly(boolean readOnly) {
+ this.readOnly = readOnly;
+ }
+
+ protected int scale;
+
+ public int getScale() {
+ return scale;
+ }
+
+ public void setScale(int scale) {
+ this.scale = scale;
+ }
+
+ protected boolean searchable;
+
+ public boolean isSearchable() {
+ return searchable;
+ }
+
+ public void setSearchable(boolean searchable) {
+ this.searchable = searchable;
+ }
+
+ protected boolean signed;
+
+ public boolean isSigned() {
+ return signed;
+ }
+
+ public void setSigned(boolean signed) {
+ this.signed = signed;
+ }
+
+ protected java.lang.String tableName;
+
+ public java.lang.String getTableName() {
+ return tableName;
+ }
+
+ public void setTableName(java.lang.String tableName) {
+ this.tableName = tableName;
+ }
+
+ protected java.lang.String virtualDatabaseName;
+
+ public java.lang.String getVirtualDatabaseName() {
+ return virtualDatabaseName;
+ }
+
+ public void setVirtualDatabaseName(java.lang.String virtualDatabaseName) {
+ this.virtualDatabaseName = virtualDatabaseName;
+ }
+
+ protected java.lang.String virtualDatabaseVersion;
+
+ public java.lang.String getVirtualDatabaseVersion() {
+ return virtualDatabaseVersion;
+ }
+
+ public void setVirtualDatabaseVersion(
+ java.lang.String virtualDatabaseVersion) {
+ this.virtualDatabaseVersion = virtualDatabaseVersion;
+ }
+
+}
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Connection.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Connection.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Connection.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Class to hold contextual connection string.
+ */
+public class Connection {
+
+ protected java.lang.String connectionId;
+
+ public java.lang.String getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(java.lang.String connectionId) {
+ this.connectionId = connectionId;
+ }
+
+}
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionContextualRequest.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionContextualRequest.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionContextualRequest.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Class to hold connection request information.
+ */
+public class ConnectionContextualRequest {
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.Connection connection;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.Connection getConnection() {
+ return connection;
+ }
+
+ public void setConnection(
+ com.metamatrix.soap.sqlquerywebservice.helper.Connection connection) {
+ this.connection = connection;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo requestInfo;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo getRequestInfo() {
+ return requestInfo;
+ }
+
+ public void setRequestInfo(
+ com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo requestInfo) {
+ this.requestInfo = requestInfo;
+ }
+
+}
+
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionlessRequest.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionlessRequest.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ConnectionlessRequest.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Class containing all required information to create a
+ * connection and submit a SQL statement. This class is used
+ * for executeBlocking() in SQLQueryWebService.
+ */
+public class ConnectionlessRequest {
+
+ protected boolean includeMetadata;
+
+ public boolean isIncludeMetadata() {
+ return includeMetadata;
+ }
+
+ public void setIncludeMetadata(boolean includeMetadata) {
+ this.includeMetadata = includeMetadata;
+ }
+
+ protected int maxRowsReturned;
+
+ public int getMaxRowsReturned() {
+ return maxRowsReturned;
+ }
+
+ public void setMaxRowsReturned(int maxRowsReturned) {
+ this.maxRowsReturned = maxRowsReturned;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.LogInParameters parameters;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.LogInParameters getParameters() {
+ return parameters;
+ }
+
+ public void setParameters(
+ com.metamatrix.soap.sqlquerywebservice.helper.LogInParameters parameters) {
+ this.parameters = parameters;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo requestInfo;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo getRequestInfo() {
+ return requestInfo;
+ }
+
+ public void setRequestInfo(
+ com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo requestInfo) {
+ this.requestInfo = requestInfo;
+ }
+
+ protected int timeToWait;
+
+ public int getTimeToWait() {
+ return timeToWait;
+ }
+
+ public void setTimeToWait(int timeToWait) {
+ this.timeToWait = timeToWait;
+ }
+
+}
\ No newline at end of file
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/CursorType.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/CursorType.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/CursorType.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * This class is used to describe the value for 'cursor type' as part of
+ * the RequestInfo domain type. Cursor Type allowed values are:
+ * value 1003=FORWARD_ONLY,
+ * value 1004= SCROLL_INSENSITIVE and
+ * value 1005=SCROLL_SENSITIVE
+ *
+ */
+public class CursorType {
+
+ private String value;
+
+ public CursorType() {
+ }
+
+ public CursorType(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "enum:" + value; //$NON-NLS-1$
+ }
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Data.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Data.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Data.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+
+/**
+ * Domain object containing metadata and column/row information.
+ */
+public class Data {
+
+ protected boolean last;
+
+ public boolean isLast() {
+ return last;
+ }
+
+ public void setLast(boolean last) {
+ this.last = last;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.ColumnMetadata[] metadataArray =
new ColumnMetadata[0];
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.ColumnMetadata[] getMetadataArray()
{
+ return metadataArray;
+ }
+
+ public void setMetadataArray(
+ com.metamatrix.soap.sqlquerywebservice.helper.ColumnMetadata[] metadataArray) {
+ this.metadataArray = metadataArray;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.Row[] rows;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.Row[] getRows() {
+ return rows;
+ }
+
+ public void setRows(com.metamatrix.soap.sqlquerywebservice.helper.Row[] rows) {
+ this.rows = rows;
+ }
+
+}
+
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/LogInParameters.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/LogInParameters.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/LogInParameters.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Url values for a MetaMatrix VDB connection.
+ */
+public class LogInParameters {
+
+ protected java.lang.String connectionPayload;
+
+ public java.lang.String getConnectionPayload() {
+ return connectionPayload;
+ }
+
+ public void setConnectionPayload(java.lang.String connectionPayload) {
+ this.connectionPayload = connectionPayload;
+ }
+
+ protected java.lang.String mmServerUrl;
+
+ public java.lang.String getMmServerUrl() {
+ return mmServerUrl;
+ }
+
+ public void setMmServerUrl(java.lang.String mmServerUrl) {
+ this.mmServerUrl = mmServerUrl;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.Property[] optionalProperties;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.Property[] getOptionalProperties()
{
+ return optionalProperties;
+ }
+
+ public void setOptionalProperties(
+ com.metamatrix.soap.sqlquerywebservice.helper.Property[] optionalProperties) {
+ this.optionalProperties = optionalProperties;
+ }
+
+ protected java.lang.String vdbName;
+
+ public java.lang.String getVdbName() {
+ return vdbName;
+ }
+
+ public void setVdbName(java.lang.String vdbName) {
+ this.vdbName = vdbName;
+ }
+
+ protected java.lang.String vdbVersion;
+
+ public java.lang.String getVdbVersion() {
+ return vdbVersion;
+ }
+
+ public void setVdbVersion(java.lang.String vdbVersion) {
+ this.vdbVersion = vdbVersion;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Property.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Property.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Property.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Property holder used for a connection's optional property values.
+ */
+public class Property {
+
+ protected java.lang.String propertyName;
+
+ public java.lang.String getPropertyName() {
+ return propertyName;
+ }
+
+ public void setPropertyName(java.lang.String propertyName) {
+ this.propertyName = propertyName;
+ }
+
+ protected java.lang.String propertyValue;
+
+ public java.lang.String getPropertyValue() {
+ return propertyValue;
+ }
+
+ public void setPropertyValue(java.lang.String propertyValue) {
+ this.propertyValue = propertyValue;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestId.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestId.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestId.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Class to hold contextual request string.
+ */
+public class RequestId {
+
+ protected java.lang.String connectionId;
+
+ public java.lang.String getConnectionId() {
+ return connectionId;
+ }
+
+ public void setConnectionId(java.lang.String connectionId) {
+ this.connectionId = connectionId;
+ }
+
+ protected java.lang.String id;
+
+ public java.lang.String getId() {
+ return id;
+ }
+
+ public void setId(java.lang.String id) {
+ this.id = id;
+ }
+
+}
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestInfo.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestInfo.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestInfo.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Request information used for a specific query.
+ */
+public class RequestInfo {
+
+ protected java.lang.String[] bindParameters;
+
+ public java.lang.String[] getBindParameters() {
+ return bindParameters;
+ }
+
+ public void setBindParameters(java.lang.String[] bindParameters) {
+ this.bindParameters = bindParameters;
+ }
+
+ protected java.lang.String commandPayload;
+
+ public java.lang.String getCommandPayload() {
+ return commandPayload;
+ }
+
+ public void setCommandPayload(java.lang.String commandPayload) {
+ this.commandPayload = commandPayload;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.CursorType cursorType;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.CursorType getCursorType() {
+ return cursorType;
+ }
+
+ public void setCursorType(
+ com.metamatrix.soap.sqlquerywebservice.helper.CursorType cursorType) {
+ this.cursorType = cursorType;
+ }
+
+ protected int fetchSize;
+
+ public int getFetchSize() {
+ return fetchSize;
+ }
+
+ public void setFetchSize(int fetchSize) {
+ this.fetchSize = fetchSize;
+ }
+
+ protected boolean partialResults;
+
+ public boolean isPartialResults() {
+ return partialResults;
+ }
+
+ public void setPartialResults(boolean partialResults) {
+ this.partialResults = partialResults;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.RequestType requestType;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.RequestType getRequestType() {
+ return requestType;
+ }
+
+ public void setRequestType(
+ com.metamatrix.soap.sqlquerywebservice.helper.RequestType requestType) {
+ this.requestType = requestType;
+ }
+
+ protected java.lang.String sqlString;
+
+ public java.lang.String getSqlString() {
+ return sqlString;
+ }
+
+ public void setSqlString(java.lang.String sqlString) {
+ this.sqlString = sqlString;
+ }
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.TransactionAutoWrapType
transactionAutoWrapMode;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.TransactionAutoWrapType
getTransactionAutoWrapMode() {
+ return transactionAutoWrapMode;
+ }
+
+ public void setTransactionAutoWrapMode(
+ com.metamatrix.soap.sqlquerywebservice.helper.TransactionAutoWrapType
transactionAutoWrapMode) {
+ this.transactionAutoWrapMode = transactionAutoWrapMode;
+ }
+
+ protected boolean useResultSetCache;
+
+ public boolean isUseResultSetCache() {
+ return useResultSetCache;
+ }
+
+ public void setUseResultSetCache(boolean useResultSetCache) {
+ this.useResultSetCache = useResultSetCache;
+ }
+
+ protected java.lang.String xmlFormat;
+
+ public java.lang.String getXmlFormat() {
+ return xmlFormat;
+ }
+
+ public void setXmlFormat(java.lang.String xmlFormat) {
+ this.xmlFormat = xmlFormat;
+ }
+
+ protected java.lang.String xmlStyleSheet;
+
+ public java.lang.String getXmlStyleSheet() {
+ return xmlStyleSheet;
+ }
+
+ public void setXmlStyleSheet(java.lang.String xmlStyleSheet) {
+ this.xmlStyleSheet = xmlStyleSheet;
+ }
+
+ protected boolean xmlValidationMode;
+
+ public boolean isXmlValidationMode() {
+ return xmlValidationMode;
+ }
+
+ public void setXmlValidationMode(boolean xmlValidationMode) {
+ this.xmlValidationMode = xmlValidationMode;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestType.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestType.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/RequestType.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Used to describe the allowed values for 'statement type' as part of the
+ * RequestInfo domain type. Statement type allowed values are:
+ * value 0=Statement, value 1=PreparedStatement
+ */
+public class RequestType {
+
+ private String value;
+
+ public RequestType() {
+ }
+
+ public RequestType(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "enum:" + value ; //$NON-NLS-1$
+ }
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Results.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Results.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Results.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Container for returned results values.
+ */
+public class Results {
+
+ protected boolean hasData;
+
+ public boolean isHasData() {
+ return hasData;
+ }
+
+ public void setHasData(boolean hasData) {
+ this.hasData = hasData;
+ }
+
+ protected java.lang.String[] outputParameters = new java.lang.String[0];
+
+ public java.lang.String[] getOutputParameters() {
+ return outputParameters;
+ }
+
+ public void setOutputParameters(java.lang.String[] outputParameters) {
+ this.outputParameters = outputParameters;
+ }
+
+ protected org.teiid.soap.sqlquerywebservice.helper.SqlWarning[] sqlWarnings;
+
+ public org.teiid.soap.sqlquerywebservice.helper.SqlWarning[] getSqlWarnings() {
+ return sqlWarnings;
+ }
+
+ public void setSqlWarnings(
+ org.teiid.soap.sqlquerywebservice.helper.SqlWarning[] sqlWarnings) {
+ this.sqlWarnings = sqlWarnings;
+ }
+
+ protected java.lang.Integer beginRow;
+
+ public java.lang.Integer getBeginRow() {
+ return beginRow;
+ }
+
+ public void setBeginRow(java.lang.Integer beginRow) {
+ this.beginRow = beginRow;
+ }
+
+ protected org.teiid.soap.sqlquerywebservice.helper.Data data;
+
+ public org.teiid.soap.sqlquerywebservice.helper.Data getData() {
+ return data;
+ }
+
+ public void setData(org.teiid.soap.sqlquerywebservice.helper.Data data) {
+ this.data = data;
+ }
+
+ protected java.lang.Integer endRow;
+
+ public java.lang.Integer getEndRow() {
+ return endRow;
+ }
+
+ public void setEndRow(java.lang.Integer endRow) {
+ this.endRow = endRow;
+ }
+
+ protected java.lang.Integer updateCount;
+
+ public java.lang.Integer getUpdateCount() {
+ return updateCount;
+ }
+
+ public void setUpdateCount(java.lang.Integer updateCount) {
+ this.updateCount = updateCount;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ResultsRequest.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ResultsRequest.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/ResultsRequest.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Results request information used for submitting requests to server.
+ */
+public class ResultsRequest {
+
+ protected int startRow;
+
+ public int getStartRow() {
+ return startRow;
+ }
+
+ public void setStartRow(int startRow) {
+ this.startRow = startRow;
+ }
+
+ protected int endRow;
+
+ public int getEndRow() {
+ return endRow;
+ }
+
+ public void setEndRow(int endRow) {
+ this.endRow = endRow;
+ }
+
+ protected boolean includeMetadata;
+
+ public boolean isIncludeMetadata() {
+ return includeMetadata;
+ }
+
+ public void setIncludeMetadata(boolean includeMetadata) {
+ this.includeMetadata = includeMetadata;
+ }
+
+ protected org.teiid.soap.sqlquerywebservice.helper.RequestId requestId;
+
+ public org.teiid.soap.sqlquerywebservice.helper.RequestId getRequestId() {
+ return requestId;
+ }
+
+ public void setRequestId(
+ org.teiid.soap.sqlquerywebservice.helper.RequestId requestId) {
+ this.requestId = requestId;
+ }
+
+ protected int timeToWait;
+
+ public int getTimeToWait() {
+ return timeToWait;
+ }
+
+ public void setTimeToWait(int timeToWait) {
+ this.timeToWait = timeToWait;
+ }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Row.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Row.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/Row.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Row domain object containing cell values.
+ */
+public class Row {
+
+ protected com.metamatrix.soap.sqlquerywebservice.helper.Cell[] cells;
+
+ public com.metamatrix.soap.sqlquerywebservice.helper.Cell[] getCells() {
+ return cells;
+ }
+
+ public void setCells(
+ com.metamatrix.soap.sqlquerywebservice.helper.Cell[] cells) {
+ this.cells = cells;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlQueryWebServiceFault.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlQueryWebServiceFault.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlQueryWebServiceFault.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Soap fault container.
+ */
+public class SqlQueryWebServiceFault extends java.lang.Exception {
+
+
+ public SqlQueryWebServiceFault(java.lang.String message) {
+ super(message);
+
+ }
+}
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlWarning.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlWarning.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/SqlWarning.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * SqlWarning domain object.
+ */
+public class SqlWarning {
+
+ protected java.lang.String message;
+
+ public java.lang.String getMessage() {
+ return message;
+ }
+
+ public void setMessage(java.lang.String message) {
+ this.message = message;
+ }
+
+}
+
+
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/TransactionAutoWrapType.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/TransactionAutoWrapType.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/helper/TransactionAutoWrapType.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.helper;
+
+/**
+ * Used to describe the allowed values for 'transaction auto wrap
+ * mode' as part of the RequestInfo domain type. Transaction auto wrap allowed
+ * values are:
+ * value 0=OFF, value 1= ON, value 2=OPTIMISTIC, value 3=PESSIMISTIC
+ */
+public class TransactionAutoWrapType {
+
+ private String value;
+
+ public TransactionAutoWrapType() {
+ }
+
+ public TransactionAutoWrapType(String value) {
+ this.value = value;
+ }
+
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ public String toString() {
+ return "enum:" + value; //$NON-NLS-1$
+ }
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/log/LogUtil.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/log/LogUtil.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/log/LogUtil.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.log;
+
+import org.teiid.soap.SOAPPlugin;
+import org.teiid.logging.LogManager;
+
+/**
+ * This is going to console, if needs to be file based, a log listener needs to be added
to this.
+ */
+public class LogUtil {
+
+ // =========================================================================
+ // Static Members
+ // =========================================================================
+ private static final LogUtil INSTANCE = new LogUtil();
+
+ PlatformLog log = new PlatformLog("Teiid SOAP log"); //$NON-NLS-1$
+
+ /**
+ * Get an instance of this class.
+ */
+ public static LogUtil getInstance() {
+ return INSTANCE;
+ }
+
+ public static void log(int severity, String message) {
+ INSTANCE.log.logMessage(new LogMessage(SOAPPlugin.PLUGIN_ID, severity, new Object[]
{message}));
+ }
+
+ public static void log(int severity, Throwable t, String message) {
+ INSTANCE.log.logMessage(new LogMessage(SOAPPlugin.PLUGIN_ID, severity, t, new Object[]
{message}));
+ }
+}
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebService.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebService.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebService.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,477 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.service;
+
+import java.io.IOException;
+import java.io.StringReader;
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.ParameterMetaData;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Properties;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+
+import org.teiid.admin.AdminPlugin;
+import org.teiid.api.exception.MetaMatrixProcessingException;
+import org.teiid.common.api.MMURL;
+import org.teiid.core.log.MessageLevel;
+import org.teiid.dqp.client.impl.ServerRequest;
+import org.teiid.jdbc.MMCallableStatement;
+import org.teiid.jdbc.MMPreparedStatement;
+import org.teiid.jdbc.MMStatement;
+import org.teiid.jdbc.api.ExecutionProperties;
+import org.teiid.jdbc.api.ResultSetMetaData;
+import org.teiid.jdbc.api.SQLStates;
+import org.teiid.jdbc.api.Statement;
+import org.teiid.soap.SOAPPlugin;
+import org.teiid.soap.security.Credential;
+import org.teiid.soap.service.ConnectionSource;
+import org.teiid.soap.service.PoolingConnectionSource;
+import org.teiid.soap.sqlquerywebservice.helper.Cell;
+import org.teiid.soap.sqlquerywebservice.helper.ColumnMetadata;
+import org.teiid.soap.sqlquerywebservice.helper.ConnectionlessRequest;
+import org.teiid.soap.sqlquerywebservice.helper.Data;
+import org.teiid.soap.sqlquerywebservice.helper.LogInParameters;
+import org.teiid.soap.sqlquerywebservice.helper.Results;
+import org.teiid.soap.sqlquerywebservice.helper.Row;
+import org.teiid.soap.sqlquerywebservice.helper.SqlWarning;
+import org.teiid.soap.sqlquerywebservice.log.LogUtil;
+import org.teiid.soap.util.WebServiceUtil;
+
+/**
+ * This class is designed to support the querying of the MetaMatrix Server via a SOAP web
service node. This class is also
+ * designed in such a way as to produce a resulting web service interface that is
complaint with the WS-I profile.
+ */
+public class SqlQueryWebService {
+
+ public static final String APP_NAME = "SQL Query Web Service"; //$NON-NLS-1$
+
+ /**
+ * Contextually aware credential provider. Abstracted to facilitate testing.
+ */
+ public interface CredentialProvider {
+ Credential getCredentials() throws SqlQueryWebServiceFault;
+ }
+
+ private ConnectionSource connectionSource = PoolingConnectionSource.getInstance();
+ private CredentialProvider credentialProvider = new CredentialProvider() {
+ @Override
+ public Credential getCredentials() throws SqlQueryWebServiceFault {
+ MessageContext msgCtx = MessageContext.getCurrentMessageContext();
+ if (msgCtx == null) {
+ throwFaultException(true, new
Exception(SOAPPlugin.Util.getString("SqlQueryWebService.0"))); //$NON-NLS-1$
+ }
+
+ Credential credential = null;
+ try {
+ credential = WebServiceUtil.getCredentials(msgCtx);
+ } catch (AxisFault e) {
+ throwFaultException(true, e);
+ }
+ return credential;
+ }
+ };
+
+ /**
+ * This method is used as a shortcut when no Connection state is required on the server
side. It will simply make a connection
+ * using the information supplied in the passed in object, and execute the query as
defined also in the passed in object. This
+ * method saves server round trips, but sacrifices the performance of keeping a
Connection open on the server side when
+ * multiple queries are to be executed. The returned Data contains all of the results
retrieved from the server as a result of
+ * executing the query defined in the ConnectionlessRequest object. This method also
sacrifices the �batching� functionality
+ * that is available when using the execute, getResults asynchronous method combination.
The first x number of rows from the
+ * results will be returned in the return message as specified in the
ConnectionlessRequest object. ResultsMetadata will also
+ * be returned in the result set by default.
+ *
+ * @return Results
+ */
+ public Results executeBlocking( final ConnectionlessRequest connectionlessRequest )
throws SqlQueryWebServiceFault {
+ Connection conn = null;
+ Results results = null;
+ Statement stmt = null;
+ try {
+ Properties connectionProperties =
getConnectionInfo(connectionlessRequest.getParameters());
+ conn = connectionSource.getConnection(connectionProperties);
+ ServerRequest request = getRequestInfo(connectionlessRequest);
+
+ if (request.getRequestType() ==
ServerRequest.REQUEST_TYPE_PREPARED_STATEMENT) {
+ MMPreparedStatement pStmt = conn.prepareStatement(request.getSql(),
request.getCursorType(), ResultSet.CONCUR_READ_ONLY).unwrap(MMPreparedStatement.class);
+ stmt = pStmt;
+ setParameterValues(request, pStmt);
+ } else if (request.getRequestType() ==
ServerRequest.REQUEST_TYPE_CALLABLE_STATEMENT) {
+ MMCallableStatement cStmt = conn.prepareCall(request.getSql(),
request.getCursorType(), ResultSet.CONCUR_READ_ONLY).unwrap(MMCallableStatement.class);
+ stmt = cStmt;
+ setParameterValues(request, cStmt);
+ } else {
+ stmt = conn.createStatement(request.getCursorType(),
ResultSet.CONCUR_READ_ONLY).unwrap(MMStatement.class);
+ }
+ if (connectionlessRequest.getMaxRowsReturned() > 0) {
+ stmt.setMaxRows(connectionlessRequest.getMaxRowsReturned());
+ }
+ if (request.getFetchSize() > 0) {
+ stmt.setFetchSize(request.getFetchSize());
+ }
+ if (connectionlessRequest.getTimeToWait() > 0) {
+ stmt.setQueryTimeout(connectionlessRequest.getTimeToWait()/1000);
+ }
+ stmt.setExecutionProperty(ExecutionProperties.PLAN_NOT_ALLOWED,
Boolean.TRUE.toString());
+
+ if (request.getXMLStyleSheet() != null) {
+ try {
+ stmt.attachStylesheet(new StringReader(request.getXMLStyleSheet()));
+ } catch (IOException e) {
+ throwFaultException(true, e);
+ }
+ }
+ stmt.setExecutionProperty(ExecutionProperties.PROP_PARTIAL_RESULTS_MODE,
String.valueOf(request.getPartialResults()));
+ stmt.setExecutionProperty(ExecutionProperties.PROP_XML_VALIDATION,
String.valueOf(request.getXMLValidationMode()));
+ stmt.setExecutionProperty(ExecutionProperties.XML_TREE_FORMAT,
String.valueOf(request.getXMLFormat()));
+
+ // Get transaction auto-wrap mode
+ int transactionAutowrap = request.getTransactionAutoWrapMode();
+ String autowrap = null;
+ switch(transactionAutowrap) {
+ case ServerRequest.AUTOWRAP_OFF: autowrap =
ExecutionProperties.AUTO_WRAP_OFF; break;
+ case ServerRequest.AUTOWRAP_ON: autowrap =
ExecutionProperties.AUTO_WRAP_ON; break;
+ case ServerRequest.AUTOWRAP_OPTIMISTIC: autowrap =
ExecutionProperties.AUTO_WRAP_OPTIMISTIC; break;
+ case ServerRequest.AUTOWRAP_PESSIMISTIC: autowrap =
ExecutionProperties.AUTO_WRAP_PESSIMISTIC; break;
+ default: throwFaultException(true, new
MetaMatrixProcessingException(AdminPlugin.Util.getString("ServerFacadeImpl.invalid_txnautowrap",
transactionAutowrap))); //$NON-NLS-1$
+ }
+
+ stmt.setExecutionProperty(ExecutionProperties.PROP_TXN_AUTO_WRAP, autowrap);
+ stmt.setExecutionProperty(ExecutionProperties.RESULT_SET_CACHE_MODE,
String.valueOf(request.getUseResultSetCache()));
+
+ ResultSet rs = null;
+
+ if (request.getRequestType() == ServerRequest.REQUEST_TYPE_PREPARED_STATEMENT
|| request.getRequestType() == ServerRequest.REQUEST_TYPE_PREPARED_STATEMENT) {
+ if (((PreparedStatement)stmt).execute()) {
+ rs = stmt.getResultSet();
+ }
+ } else {
+ if (stmt.execute(request.getSql())) {
+ rs = stmt.getResultSet();
+ }
+ }
+
+ results = buildResults(stmt, rs, connectionlessRequest,
connectionlessRequest.isIncludeMetadata());
+ } catch (SQLException e) {
+ throwFaultException(e.getSQLState() ==
null?true:SQLStates.isUsageErrorState(e.getSQLState()), e);
+ } finally {
+ if (stmt != null) {
+ try {
+ stmt.close();
+ } catch (SQLException e) {
+
+ }
+ }
+ if (conn != null) {
+ try {
+ conn.close();
+ } catch (SQLException e) {
+
+ }
+ }
+ }
+ return results;
+ }
+
+ private void setParameterValues(ServerRequest request,
+ MMPreparedStatement pStmt) throws SQLException {
+ Object [] params = request.getBindParameters();
+ if (params != null) {
+ for (int i = 0; i < params.length; i++) {
+ pStmt.setObject(i + 1, params[i]);
+ }
+ }
+ }
+
+ private Properties getConnectionInfo( final LogInParameters params ) throws
SqlQueryWebServiceFault {
+ Properties connectionInfo = new Properties();
+ if (params.getMmServerUrl() != null) {
+ connectionInfo.setProperty(MMURL.CONNECTION.SERVER_URL, params.getMmServerUrl());
+ }
+ if (params.getVdbName() != null) {
+ connectionInfo.setProperty(MMURL.JDBC.VDB_NAME, params.getVdbName());
+ }
+ if (params.getVdbVersion() != null) {
+ connectionInfo.setProperty(MMURL.JDBC.VDB_VERSION, params.getVdbVersion());
+ }
+ if (params.getConnectionPayload() != null) {
+ connectionInfo.setProperty(MMURL.CONNECTION.CLIENT_TOKEN_PROP,
params.getConnectionPayload());
+ }
+
+ /*
+ * Set the additional property for the application name.
+ */
+ connectionInfo.setProperty(MMURL.CONNECTION.APP_NAME, APP_NAME);
+
+ /*
+ * Set additional properties, if any, on the ConnectionInfo object.
+ */
+ if (params.getOptionalProperties() != null) {
+
+ for (int i = 0; i < params.getOptionalProperties().length; i++) {
+ String propName = params.getOptionalProperties()[i].getPropertyName();
+ String propValue = params.getOptionalProperties()[i].getPropertyValue();
+ connectionInfo.setProperty(propName, propValue);
+ }
+ }
+
+ Credential credential = this.credentialProvider.getCredentials();
+
+ connectionInfo.setProperty(MMURL.CONNECTION.USER_NAME, credential.getUserName());
+ connectionInfo.setProperty(MMURL.CONNECTION.PASSWORD, new
String(credential.getPassword()));
+
+ return connectionInfo;
+ }
+
+ /**
+ * This method is used to get an instance of RequestInfo.
+ *
+ * @return PortableContext
+ */
+ private ServerRequest getRequestInfo( final ConnectionlessRequest request ) {
+ org.teiid.soap.sqlquerywebservice.helper.RequestInfo info = request.getRequestInfo();
+ ServerRequest domainInfo = new ServerRequest();
+ domainInfo.setBindParameters(info.getBindParameters());
+ domainInfo.setCommandPayload(info.getCommandPayload());
+ domainInfo.setCursorType(Integer.parseInt(info.getCursorType().getValue()));
+ domainInfo.setFetchSize(info.getFetchSize());
+ domainInfo.setPartialResults(info.isPartialResults());
+ domainInfo.setRequestType(Integer.parseInt(info.getRequestType().getValue()));
+ domainInfo.setSql(info.getSqlString());
+ domainInfo.setTransactionAutoWrapMode(Integer.parseInt(info.getTransactionAutoWrapMode().getValue()));
+ domainInfo.setUseResultSetCache(info.isUseResultSetCache());
+ domainInfo.setXMLFormat(info.getXmlFormat());
+ domainInfo.setXMLStyleSheet(info.getXmlStyleSheet());
+ domainInfo.setXMLValidationMode(info.isXmlValidationMode());
+
+ return domainInfo;
+ }
+
+ /**
+ * This method is used to construct a results object for a given context. This is used
for synchronous query execution to get
+ * all results.
+ *
+ * @return Results
+ * @throws SQLException
+ */
+ protected Results buildResults( final Statement stmt,
+ final ResultSet rs,
+ final ConnectionlessRequest request,
+ final boolean includeMetadata ) throws SQLException {
+
+ final Results soapResults = new Results();
+
+ getData(soapResults, rs, includeMetadata);
+
+ /*
+ * Get warnings If there are no SQLWarnings, we will stick a "holder" value
to prevent NPE's in the Axis2 ADB
+ * client.
+ */
+ soapResults.setSqlWarnings(getWarnings(stmt.getWarnings()));
+
+ soapResults.setUpdateCount(stmt.getUpdateCount());
+
+ /*
+ * Add any output parmeters to the SOAP Results If there are no output parms, we will
stick a "holder" value to
+ * prevent NPE's in the Axis2 ADB client.
+ */
+ soapResults.setOutputParameters(getOutputParameters(stmt));
+
+ return soapResults;
+ }
+
+ /**
+ * Get SQL Warnings from results
+ *
+ * @return SqlWarning[] - Array of SQLWarnings
+ */
+ private SqlWarning[] getWarnings( SQLWarning warning ) {
+ if (warning == null) {
+ return new SqlWarning[] { new SqlWarning() };
+ }
+ List<SqlWarning> warnings = new ArrayList<SqlWarning>();
+ do {
+ final SqlWarning toAdd = new SqlWarning();
+ toAdd.setMessage(warning.getMessage());
+ warnings.add(toAdd);
+ warning = warning.getNextWarning();
+ } while (warning != null);
+ return (SqlWarning[])warnings.toArray();
+ }
+
+ private String[] getOutputParameters( final Statement stmt ) throws SQLException {
+ String[] result = null;
+ if (stmt instanceof CallableStatement) {
+ CallableStatement cs = (CallableStatement)stmt;
+
+ ParameterMetaData metadata = cs.getParameterMetaData();
+
+ int count = metadata.getParameterCount();
+
+ final ArrayList<String> outputParametersList = new ArrayList<String>();
+ for (int k = 1; k <= count; k++) {
+ final int parameterType = metadata.getParameterType(k);
+ if (parameterType == ParameterMetaData.parameterModeOut
+ || parameterType == ParameterMetaData.parameterModeInOut) {
+ outputParametersList.add(cs.getString(k));
+ }
+ }
+ result = (String[])outputParametersList.toArray();
+ }
+
+ if (result == null || result.length == 0) {
+ return new String[] {"none"}; //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ /**
+ * This method is used create a data object from the results returned from the server.
+ *
+ * @return Data
+ * @throws SQLException
+ */
+ private void getData( final Results soapResults,
+ final ResultSet rs,
+ final boolean includeMetadata ) throws SQLException {
+ Data data = new Data();
+
+ soapResults.setBeginRow(0);
+
+ /*
+ * Set boolean indicating whether or not this is the last batch.
+ */
+ data.setLast(true);
+
+ Row[] rowArray = null;
+ int rowCounter = 0;
+
+ if (rs != null) {
+ soapResults.setHasData(true);
+
+ // Metadata is only valid for non-update results.
+ ResultSetMetaData metadata = rs.getMetaData().unwrap(ResultSetMetaData.class);
+ if (includeMetadata) {
+ data.setMetadataArray(getColumnMetaData(metadata));
+ }
+
+ List<Row> rows = new ArrayList<Row>();
+ /*
+ * Need to return at least one rowArray value to assure the response message conforms
to the structure expected by the
+ * Axis2 ADB client.
+ */
+ while (rs.next()) {
+ Row row = new Row();
+ Cell[] cellArray = new Cell[metadata.getColumnCount()];
+ for (int j = 1; j <= cellArray.length; j++) {
+ Cell cell = new Cell();
+ String value = rs.getString(j);
+ cell.setValue(value);
+ cellArray[j - 1] = cell;
+ }
+ row.setCells(cellArray);
+ rows.add(row);
+ rowCounter++;
+ }
+
+ rowArray = (Row[])rows.toArray();
+ }
+
+ soapResults.setEndRow(rowCounter);
+ /*
+ * Need to return at least one row/cell value(s) to assure the response message
conforms to the structure expected by the
+ * Axis2 ADB client.
+ */
+ if (rowCounter == 0) {
+ Row emptyRow = new Row();
+ rowArray = new Row[] {emptyRow};
+ Cell emptyCell = new Cell();
+ emptyRow.setCells(new Cell[] {emptyCell});
+ }
+
+ data.setRows(rowArray);
+
+ soapResults.setData(data);
+ }
+
+ /**
+ * This method is used create a ColumnMetaData object array from the results returned
from the server.
+ *
+ * @return ColumnMetaData
+ * @throws SQLException
+ */
+ private ColumnMetadata[] getColumnMetaData( final ResultSetMetaData metadata ) throws
SQLException {
+
+ final int columnCount = metadata.getColumnCount();
+ ColumnMetadata[] metadataArray = new ColumnMetadata[columnCount];
+
+ for (int i = 1; i <= metadata.getColumnCount(); i++) {
+ ColumnMetadata columnMetadata = new ColumnMetadata();
+ columnMetadata.setColumnName(metadata.getColumnName(i));
+ columnMetadata.setColumnDataType(metadata.getColumnTypeName(i));
+ columnMetadata.setColumnClassName(metadata.getColumnClassName(i));
+ columnMetadata.setColumnDisplaySize(metadata.getColumnDisplaySize(i));
+ columnMetadata.setCurrency(metadata.isCurrency(i));
+ columnMetadata.setGetColumnLabel(metadata.getColumnLabel(i));
+ columnMetadata.setNullable(metadata.isNullable(i) ==
ResultSetMetaData.columnNullable);
+ columnMetadata.setPrecision(metadata.getPrecision(i));
+ columnMetadata.setReadOnly(metadata.isReadOnly(i));
+ columnMetadata.setScale(metadata.getScale(i));
+ columnMetadata.setSearchable(metadata.isSearchable(i));
+ columnMetadata.setSigned(metadata.isSigned(i));
+ columnMetadata.setTableName(metadata.getTableName(i));
+ columnMetadata.setVirtualDatabaseName(metadata.getVirtualDatabaseName(i));
+ columnMetadata.setVirtualDatabaseVersion(metadata.getVirtualDatabaseVersion(i));
+
+ metadataArray[i - 1] = columnMetadata;
+
+ }
+ return metadataArray;
+ }
+
+ private void throwFaultException( boolean client, Throwable e ) throws
SqlQueryWebServiceFault {
+
+ SqlQueryWebServiceFault fault = SqlQueryWebServiceFault.create(client, e);
+
+ LogUtil.log(MessageLevel.ERROR, e, e.getMessage());
+
+ throw fault;
+ }
+
+ public void setConnectionSource(ConnectionSource connectionSource) {
+ this.connectionSource = connectionSource;
+ }
+
+ public void setCredentialProvider(CredentialProvider credentialProvider) {
+ this.credentialProvider = credentialProvider;
+ }
+
+}
\ No newline at end of file
Added:
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebServiceFault.java
===================================================================
---
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebServiceFault.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/sqlquerywebservice/service/SqlQueryWebServiceFault.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.sqlquerywebservice.service;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis2.AxisFault;
+
+/**
+ * This is an exception class that is thrown from the SqlQueryWebService implementation
that repesents a SOAP fault.
+ *
+ * @since 4.2
+ */
+public class SqlQueryWebServiceFault extends AxisFault{
+
+ /*
+ * This is a namespace for the faultcodes for the metamatrix server api. It will be
used when a fault is thrown from the api
+ * as the namespace for the faultcode in the returned fault.
+ */
+ public static final String SOAP_11_FAULTCODES_NAMESPACE =
"http://schemas.xmlsoap.org/soap/envelope/"; //$NON-NLS-1$
+ public static final String SOAP_11_STANDARD_CLIENT_FAULT_CODE = "Client";
//$NON-NLS-1$
+ public static final String SOAP_11_STANDARD_SERVER_FAULT_CODE = "Server";
//$NON-NLS-1$
+
+
+ /**
+ * @param message
+ * @param cause
+ */
+ public SqlQueryWebServiceFault(String message, QName code) {
+ super(message, code);
+ }
+
+
+ public static final SqlQueryWebServiceFault create(boolean client, Throwable e) {
+
+ String faultCodeString = null;
+
+ /*
+ * if the exception being thrown is due to the inputs that the client gave us,
then the fault code should be 'Client' per
+ * the SOAP 1.1 specification. If there is some 'internal' server side
reason for not being able to fulfill the request,
+ * then the fault code should be 'Server' per the SOAP 1.1
specification.
+ */
+ if (client) {
+ faultCodeString = SOAP_11_STANDARD_CLIENT_FAULT_CODE;
+ } else {
+ /*
+ * if this is not a MetaMatrixProcessingException we make the assumption that
this exception
+ * is not a result of some invalid client input, but that it is an exception
thrown because
+ * of an invalid server state.
+ */
+ faultCodeString = SOAP_11_STANDARD_SERVER_FAULT_CODE;
+ }
+
+
+ QName faultCode = new QName(SOAP_11_FAULTCODES_NAMESPACE, faultCodeString);
+
+
+ SqlQueryWebServiceFault fault = new SqlQueryWebServiceFault(e.getMessage(),
faultCode);
+
+ return fault;
+ }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/ErrorMessageKeys.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/ErrorMessageKeys.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/util/ErrorMessageKeys.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.util;
+
+/**
+ */
+public class ErrorMessageKeys {
+
+ /* auth (001) */
+ public static final String AUTH_0001 = "ERR.018.001.0001"; //$NON-NLS-1$
+ public static final String AUTH_0002 = "ERR.018.001.0002"; //$NON-NLS-1$
+ public static final String AUTH_0003 = "ERR.018.001.0003"; //$NON-NLS-1$
+ public static final String AUTH_0004 = "ERR.018.001.0004"; //$NON-NLS-1$
+
+
+ public static final String SERVICE_0001 = "ERR.018.002.0001";
//$NON-NLS-1$
+ public static final String SERVICE_0002 = "ERR.018.002.0002";
//$NON-NLS-1$
+ public static final String SERVICE_0003 = "ERR.018.002.0003";
//$NON-NLS-1$
+ public static final String SERVICE_0004 = "ERR.018.002.0004";
//$NON-NLS-1$
+ public static final String SERVICE_0005 = "ERR.018.002.0005";
//$NON-NLS-1$
+ public static final String SERVICE_0006 = "ERR.018.002.0006";
//$NON-NLS-1$
+ public static final String SERVICE_0007 = "ERR.018.002.0007";
//$NON-NLS-1$
+ public static final String SERVICE_0008 = "ERR.018.002.0008";
//$NON-NLS-1$
+ public static final String SERVICE_0009 = "ERR.018.002.0009";
//$NON-NLS-1$
+ public static final String SERVICE_0010 = "ERR.018.002.0010";
//$NON-NLS-1$
+ public static final String SERVICE_0011 = "ERR.018.002.0011";
//$NON-NLS-1$
+ public static final String SERVICE_0012 = "ERR.018.002.0012";
//$NON-NLS-1$
+ public static final String SERVICE_0013 = "ERR.018.002.0013";
//$NON-NLS-1$
+ public static final String SERVICE_0014 = "ERR.018.002.0014";
//$NON-NLS-1$
+ public static final String SERVICE_0015 = "ERR.018.002.0015";
//$NON-NLS-1$
+ public static final String SERVICE_0016 = "ERR.018.002.0016";
//$NON-NLS-1$
+ public static final String SERVICE_0017 = "ERR.018.002.0017";
//$NON-NLS-1$
+ public static final String SERVICE_0018 = "ERR.018.002.0018";
//$NON-NLS-1$
+ public static final String SERVICE_0019 = "ERR.018.002.0019";
//$NON-NLS-1$
+ public static final String SERVICE_0020 = "ERR.018.002.0020";
//$NON-NLS-1$
+ public static final String SERVICE_0021 = "ERR.018.002.0021";
//$NON-NLS-1$
+ public static final String SERVICE_0022 = "ERR.018.002.0022";
//$NON-NLS-1$
+ public static final String SERVICE_0023 = "ERR.018.002.0023";
//$NON-NLS-1$
+ public static final String SERVICE_0024 = "ERR.018.002.0024";
//$NON-NLS-1$
+ public static final String SERVICE_0025 = "ERR.018.002.0025";
//$NON-NLS-1$
+ public static final String SERVICE_0026 = "ERR.018.002.0026";
//$NON-NLS-1$
+
+ /** xml (011) */
+ public static final String xml_0001 = "ERR.018.011.0001"; //$NON-NLS-1$
+ public static final String xml_0002 = "ERR.018.011.0002"; //$NON-NLS-1$
+ public static final String xml_0003 = "ERR.018.011.0003"; //$NON-NLS-1$
+ public static final String xml_0004 = "ERR.018.011.0004"; //$NON-NLS-1$
+ public static final String xml_0005 = "ERR.018.011.0005"; //$NON-NLS-1$
+ public static final String xml_0006 = "ERR.018.011.0006"; //$NON-NLS-1$
+ public static final String xml_0007 = "ERR.018.011.0007"; //$NON-NLS-1$
+ public static final String xml_0008 = "ERR.018.011.0008"; //$NON-NLS-1$
+ public static final String xml_0009 = "ERR.018.011.0009"; //$NON-NLS-1$
+ public static final String xml_0010 = "ERR.018.011.0010"; //$NON-NLS-1$
+ public static final String xml_0011 = "ERR.018.011.0011"; //$NON-NLS-1$
+ public static final String xml_0012 = "ERR.018.011.0012"; //$NON-NLS-1$
+ public static final String xml_0013 = "ERR.018.011.0013"; //$NON-NLS-1$
+ public static final String xml_0014 = "ERR.018.011.0014"; //$NON-NLS-1$
+ public static final String xml_0015 = "ERR.018.011.0015"; //$NON-NLS-1$
+ public static final String xml_0016 = "ERR.018.011.0016"; //$NON-NLS-1$
+ public static final String xml_0017 = "ERR.018.011.0017"; //$NON-NLS-1$
+ public static final String xml_0018 = "ERR.018.011.0018"; //$NON-NLS-1$
+ public static final String xml_0019 = "ERR.018.011.0019"; //$NON-NLS-1$
+ public static final String xml_0020 = "ERR.018.011.0020"; //$NON-NLS-1$
+ public static final String xml_0021 = "ERR.018.011.0021"; //$NON-NLS-1$
+ public static final String xml_0022 = "ERR.018.011.0022"; //$NON-NLS-1$
+ public static final String xml_0023 = "ERR.018.011.0023"; //$NON-NLS-1$
+ public static final String xml_0024 = "ERR.018.011.0024"; //$NON-NLS-1$
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/SOAPConstants.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/SOAPConstants.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/util/SOAPConstants.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,349 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import com.metamatrix.common.api.MMURL;
+
+/**
+ * This file will contain all of the constants used by the MetaMatrix SOAP service
+ */
+public final class SOAPConstants {
+
+ /**
+ * Private constructor
+ */
+ private SOAPConstants() {
+ }
+
+ /**
+ * Name of property used to set the application name in a MetaMatrix connection.
+ */
+ public static final String APP_NAME = MMURL.CONNECTION.APP_NAME;
+
+ /**
+ * Non-secure MetaMatrix Protocol.
+ */
+ public static final String NON_SECURE_PROTOCOL =
MMURL.CONNECTION.NON_SECURE_PROTOCOL;
+
+ /**
+ * Non-secure MetaMatrix Protocol.
+ */
+ public static final String SECURE_PROTOCOL = MMURL.CONNECTION.SECURE_PROTOCOL;
+
+ /**
+ * Indicates that the client did not have enough information to process the
authentication or that the authentication message
+ * was incorrectly formed.
+ */
+ public static final String CLIENT_AUTHENTICATION_FAULT =
"Client.Authentication"; //$NON-NLS-1$
+
+ /**
+ * Indicates that there was an authentication failure when attempting to
authenticate
+ */
+ public static final String SERVER_AUTHENTICATION_FAULT =
"Server.Authentication"; //$NON-NLS-1$
+
+ /**
+ * Indicates that there was a failure when attempting to establish a connection on
the server side to the MetaMatrixServer
+ */
+ public static final String SERVER_CONNECTION_FAULT = "Server.Connection";
//$NON-NLS-1$
+
+ /**
+ * Indicates that there was a failure when attempting to establish a connection to
the SOAP Connection architecture
+ */
+ public static final String CLIENT_CONNECTION_FAULT = "Client.Connection";
//$NON-NLS-1$
+
+ /**
+ * Indicates that the client did not have enough information in the request to submit
a query to the MetaMatrix server
+ */
+ public static final String CLIENT_QUERY_EXECUTION_FAULT =
"Client.QueryExecution"; //$NON-NLS-1$
+
+ /**
+ * Indicates that there was a failure when attempting to execute the query against
the MetaMatrix server
+ */
+ public static final String SERVER_QUERY_EXECUTION_FAULT =
"Server.QueryExecution"; //$NON-NLS-1$
+
+ /**
+ * Indicates that there was a translation error when attempting to translate the
results into a SOAP specific return message
+ * on the server
+ */
+ public static final String SERVER_TRANSLATION_FAULT = "Server.Translation";
//$NON-NLS-1$
+
+ /**
+ * Indicates that the server is not licensed for the MetaMatrix SOAP API
+ */
+ public static final String SERVER_LICENSE_EXCEPTION =
"Server.LicenseException"; //$NON-NLS-1$
+
+ /**
+ * Indicates that the client did not have enough information to submit an insert,
update, or delete statement to the
+ * MetaMatrix server
+ */
+ public static final String CLIENT_UPDATE_EXECUTION_FAULT =
"Client.UpdateExecution"; //$NON-NLS-1$
+
+ /**
+ * Indicates that there was a failure executing the insert,update, or delete against
the MetaMatrix server
+ */
+ public static final String SERVER_UPDATE_EXECUTION_FAULT =
"Server.UpdateExecution"; //$NON-NLS-1$
+
+ /**
+ * Indicates that the client did not have enough information to process a Stored
procedure execution request against the
+ * MetaMatrix server.
+ */
+ public static final String CLIENT_STOREDPROCEDURE_EXECUTION_FAULT =
"Client.StoredProcedureExecution"; //$NON-NLS-1$
+
+ /**
+ * Indicates that an error occurred in the MetaMatrix server while executing the
Stored procedure execution
+ */
+ public static final String SERVER_STOREDPROCEDURE_EXECUTION_FAULT =
"Server.StoredProcedureExecution"; //$NON-NLS-1$
+
+ /**
+ * A timeout has occured on the Client side
+ */
+ public static final String CLIENT_TIMEOUT = "Client.Timeout";
//$NON-NLS-1$
+
+ /**
+ * A timeout has occured on the Server side
+ */
+ public static final String SERVER_TIMEOUT = "Server.Timeout";
//$NON-NLS-1$
+
+ /**
+ * A general server fault
+ */
+ public static final String SERVER_FAULT = "Server"; //$NON-NLS-1$
+
+ /**
+ * A general client fault
+ */
+ public static final String CLIENT_FAULT = "Client"; //$NON-NLS-1$
+
+ /**
+ * This class contains the literal XML tag names and attributes for the session id
+ */
+ public static final class SESSION_ID {
+
+ public static final class TAGS {
+
+ public static final String SESSION_ID_TAG = "session";
//$NON-NLS-1$
+ }
+ }
+
+ /**
+ * This class contains the literal XML tag names and attributes tags for the
authentication XML used in the MetaMatrix SOAP
+ * service.
+ */
+ public static final class AUTHENTICATION {
+
+ public static final class TAGS {
+
+ public static final String AUTHENTICATION_TAG = "authentication";
//$NON-NLS-1$
+
+ public static final class USERNAME {
+
+ public static final String USERNAME_TAG = "username";
//$NON-NLS-1$
+
+ public static final class ATTRIBUTES {
+ }
+ }
+
+ public static final class PASSWORD {
+
+ public static final String PASSWORD_TAG = "password";
//$NON-NLS-1$
+
+ public static final class ATTRIBUTES {
+
+ public static final String IS_ENCRYPTED_TAG =
"isencrypted"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class VDB {
+
+ public static final String VDB_TAG = "vdb"; //$NON-NLS-1$
+
+ public static final class ATTRIBUTES {
+
+ public static final String VERSION_TAG = "version";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class SERVERURL {
+
+ public static final String SERVER_URL_TAG = "serverurl";
//$NON-NLS-1$
+
+ public static final class ATTRIBUTES {
+
+ public static final String APPSERVER_TAG = "appserver";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class TRUSTED {
+
+ public static final String TRUSTED_TAG = "trusted";
//$NON-NLS-1$
+
+ public static final class ATTRIBUTES {
+ }
+ }
+ }
+ }
+
+ public static final class STORED_PROCEDURE_PARAMETERS {
+
+ public static final String PARAMETERS_TAG = "parameters";
//$NON-NLS-1$
+
+ public static final class Param {
+
+ public static final String PARAM_TAG = "param"; //$NON-NLS-1$
+
+ public static final class Attributes {
+
+ public static final String INDEX_TAG = "index"; //$NON-NLS-1$
+ }
+ }
+ }
+
+ public static final class METADATA_TYPES {
+
+ public static final class CROSS_REFERENCES {
+
+ public static final String NAME = "crossreferences"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String PRIMARY_GROUP_NAME =
"cr_primarygroupname"; //$NON-NLS-1$
+ public static final String FOREIGN_GROUP_NAME =
"cr_foreigngroupname"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class DATATYPES {
+
+ public static final String NAME = "datatypes"; //$NON-NLS-1$
+
+ public static final class Parameters {
+ }
+ }
+
+ public static final class ELEMENTS {
+
+ public static final String NAME = "elements"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String GROUP_PATTERN = "e_grouppattern";
//$NON-NLS-1$
+ public static final String ELEMENT_PATTERN =
"e_elementpattern"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class EXPORTED_KEYS {
+
+ public static final String NAME = "exportedkeys"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String PRIMARY_GROUP_NAME =
"ek_primarygroupname"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class FOREIGN_KEYS {
+
+ public static final String NAME = "foreignkeys"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String GROUP_NAME = "fk_groupname";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class GROUPS {
+
+ public static final String NAME = "groups"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String GROUP_PATTERN = "g_grouppattern";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class IMPORTED_KEYS {
+
+ public static final String NAME = "importedkeys"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String FOREIGN_GROUP_NAME =
"ik_foreigngroupname"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class MODELS {
+
+ public static final String NAME = "models"; //$NON-NLS-1$
+
+ public static final class Parameters {
+ }
+ }
+
+ public static final class PRIMARY_KEYS {
+
+ public static final String NAME = "primarykeys"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String GROUP_NAME = "pk_groupname";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class PROCEDURES {
+
+ public static final String NAME = "procedures"; //$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String PROCEDURE_PATTERN =
"p_procedurepattern"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class PROCEDURE_PARAMETERS {
+
+ public static final String NAME = "procedureparameters";
//$NON-NLS-1$
+
+ public static final class Parameters {
+
+ public static final String PROCEDURE_NAME_PATTERN =
"pp_procedurenamepattern"; //$NON-NLS-1$
+ public static final String PARAMETER_NAME_PATTERN =
"pp_parameternamepattern"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class USER_DEFINED_DATATYPES {
+
+ public static final String NAME = "userdefineddatatypes";
//$NON-NLS-1$
+
+ public static final class Parameters {
+ }
+ }
+
+ public static final class VIRTUALDATABASES {
+
+ public static final String NAME = "virtualdatabases";
//$NON-NLS-1$
+
+ public static final class Parameters {
+ }
+ }
+ }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/ServletClientConstants.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/ServletClientConstants.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/util/ServletClientConstants.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import com.metamatrix.soap.util.SOAPConstants;
+
+/**
+ * This file is used for constants to be displayed on the SOAP Client .jsp page.
+ * It is used by the com.metamatrix.soap.service.MMSOAPClientServlet to pull
+ * the form values from the .jsp page in order to submit a soap service query
+ */
+
+public final class ServletClientConstants {
+
+ private ServletClientConstants(){
+ }
+ /**
+ * General keys
+ */
+ public static final String LOGON_KEY = "Logon"; //$NON-NLS-1$
+ public static final String PASSWORD_KEY = "Password"; //$NON-NLS-1$
+ public static final String SESSIONID_KEY = "SessionID"; //$NON-NLS-1$
+ public static final String SERVER_URL_KEY = "ServerURL"; //$NON-NLS-1$
+ public static final String SOAP_URL_KEY = "SOAPURL"; //$NON-NLS-1$
+ public static final String SOAP_SERVICE_URN_KEY = "SOAPServiceURN";
//$NON-NLS-1$
+ public static final String VDB_NAME_KEY = "VDBName"; //$NON-NLS-1$
+ public static final String VDB_VERSION_KEY = "VDBVersion"; //$NON-NLS-1$
+ public static final String FETCH_SIZE_KEY = "FetchSize"; //$NON-NLS-1$
+ public static final String FULL_METADATA_KEY = "FullMetadata"; //$NON-NLS-1$
+ public static final String PARTIAL_RESULTS_KEY = "PartialResults";
//$NON-NLS-1$
+ public static final String TIMEOUT_KEY = "TimeOut"; //$NON-NLS-1$
+
+ public static final String DEBUG_KEY = "Debug"; //$NON-NLS-1$
+
+ /**
+ * The execute parameters
+ */
+ public static final String EXECUTE_QUERY_KEY = "executeQuery";
//$NON-NLS-1$
+ public static final String EXECUTE_UPDATE_KEY = "executeUpdate";
//$NON-NLS-1$
+ public static final String EXECUTE_STORED_PROCEDURE_KEY =
"executeStoredProcedure"; //$NON-NLS-1$
+
+ public static final String EXECUTE_METADATA_KEY = "executeMetadata";
//$NON-NLS-1$
+ public static final String EXECUTE_LOGON_KEY = "executeLogon";
//$NON-NLS-1$
+ public static final String EXECUTE_LOGOFF_KEY = "executeLogoff";
//$NON-NLS-1$
+ public static final String EXECUTE_STORED_QUERY =
"executeStoredQuery"; //$NON-NLS-1$
+ /*
+ * For the stored queries to query through the MetaMatrixServerAPI vs the
+ * DataService web service
+ */
+ public static final String EXECUTE_STORED_QUERY_API_KEY =
"executeStoredQueryAPI"; //$NON-NLS-1$
+
+ /**
+ * For the metadata
+ */
+ public static final String METADATA_RADIO_BUTTON_KEY ="rdo_metadata";
//$NON-NLS-1$
+ public static final String METADATA_PREPEND_KEY = "METADATA_";
//$NON-NLS-1$
+ public static final String CR_PRIMARY_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.CROSS_REFERENCES.Parameters.PRIMARY_GROUP_NAME;
+ public static final String CR_FOREIGN_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.CROSS_REFERENCES.Parameters.FOREIGN_GROUP_NAME;
+ public static final String ELEMENTS_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.ELEMENTS.Parameters.GROUP_PATTERN;
+ public static final String ELEMENTS_ELEMENT_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.ELEMENTS.Parameters.ELEMENT_PATTERN;
+ public static final String EK_PRIMARY_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.EXPORTED_KEYS.Parameters.PRIMARY_GROUP_NAME;
+ public static final String FK_PRIMARY_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.FOREIGN_KEYS.Parameters.GROUP_NAME;
+ public static final String IK_FOREIGN_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.IMPORTED_KEYS.Parameters.FOREIGN_GROUP_NAME;
+ public static final String GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.GROUPS.Parameters.GROUP_PATTERN;
+ public static final String PK_GROUP_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.PRIMARY_KEYS.Parameters.GROUP_NAME;
+ public static final String GP_PROCEDURE_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.PROCEDURE_PARAMETERS.Parameters.PROCEDURE_NAME_PATTERN;
+ public static final String GP_PARAMETER_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.PROCEDURE_PARAMETERS.Parameters.PARAMETER_NAME_PATTERN;
+ public static final String P_PROCEDURE_NAME_KEY =
METADATA_PREPEND_KEY+SOAPConstants.METADATA_TYPES.PROCEDURES.Parameters.PROCEDURE_PATTERN;
+
+ /**
+ * For the XML
+ *
+ */
+ public static final String CB_RETURN_SCHEMA = "cb_returnSchema";
//$NON-NLS-1$
+ public static final String CB_VALIDATE_DOCUMENT = "cb_validateDocument";
//$NON-NLS-1$
+
+ public static final String COMPACT_FORMAT_KEY = "xml_compact_format";
//$NON-NLS-1$
+ /**
+ * For standard quering
+ */
+ public static final String SQL_KEY = "SQL"; //$NON-NLS-1$
+
+ /**
+ * For the Stored Procedures
+ */
+ public static final String SP_PREPEND = "sp_"; //$NON-NLS-1$
+ public static final String SEP_STRING = "."; //$NON-NLS-1$
+ public static final String SP_PROCEDURE_PARAM_VALUE_KEY =
SP_PREPEND+"sp_procedure_param_value_key"; //$NON-NLS-1$
+ public static final String SP_PROCEDURE_NAME_KEY =
SP_PREPEND+"sp_procedure_name_key"; //$NON-NLS-1$
+
+ /**
+ * For the Stored Queries
+ */
+ public static final String SQ_PREPEND = "sq_"; //$NON-NLS-1$
+ public static final String SQ_SEP_STRING = "."; //$NON-NLS-1$
+ public static final String SQ_PARAM_VALUE_KEY = "sq_param_value_key";
//$NON-NLS-1$
+ public static final String SQ_NAME_KEY = "sq_name_key";
//$NON-NLS-1$
+
+
+ /**
+ * For the Stored Queries through the MetamatrixServerAPI Web service
+ */
+ public static final String SQ_PREPEND_API = "sq_api";
//$NON-NLS-1$
+ public static final String SQ_SEP_STRING_API = "."; //$NON-NLS-1$
+ public static final String SQ_PARAM_VALUE_KEY_API =
"sq_api_param_value_key"; //$NON-NLS-1$
+ public static final String SQ_NAME_KEY_API = "sq_api_name_key";
//$NON-NLS-1$
+}
+
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/WebServiceUtil.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/WebServiceUtil.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/util/WebServiceUtil.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,188 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package org.teiid.soap.util;
+
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Vector;
+import javax.servlet.http.HttpServletRequest;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.transport.http.HTTPConstants;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.WSSecurityEngineResult;
+import org.apache.ws.security.WSUsernameTokenPrincipal;
+import org.apache.ws.security.handler.WSHandlerConstants;
+import org.apache.ws.security.handler.WSHandlerResult;
+import org.teiid.admin.api.core.Admin;
+import org.teiid.admin.api.exception.AdminException;
+import org.teiid.admin.api.objects.VDB;
+import org.teiid.api.exception.security.LogonException;
+import org.teiid.common.comm.platform.client.ServerAdminFactory;
+import org.teiid.core.CoreConstants;
+import org.teiid.core.util.StringUtil;
+import org.teiid.soap.SOAPPlugin;
+import org.teiid.soap.exceptions.SOAPProcessingException;
+import org.teiid.soap.object.MMServerInfo;
+import org.teiid.soap.object.WSDLUrl;
+import org.teiid.soap.security.Credential;
+
+/**
+ * This class contains utility methods for MetaMatrix Web Services.
+ */
+public class WebServiceUtil {
+
+ /*
+ * This is the username and password for the WSDL user account. This account is strictly
used
+ * for getting VDB resources (like the WSDL and schemas). There is a check in place in
the Request
+ * to assure that the getUpdatedVDBResources is the only procedure used by this account.
The password
+ * is not checked so it's value is not important, it just can't be blank.
+ */
+ public static final String WSDLUSER = CoreConstants.DEFAULT_ANON_USERNAME;
+ public static final String WSDLPASSWORD = "mmx"; //$NON-NLS-1$
+
+ /**
+ * This method will validate that the action value is set. If the value is not set a
SOAPException will be thrown. The value
+ * should contain the fully qualified procedure name. For 5.5 WSDL and greater the value
should also contain the server
+ * connection properties in order to support non-HTTP transports (like JMS).
+ *
+ * @param action - Action string
+ * @return boolean (true if set)
+ * @exception SOAPProcessingException (if value not set)
+ */
+ public static void validateActionIsSet( String action ) throws SOAPProcessingException
{
+
+ if (action == null || action.trim().equals(StringUtil.Constants.EMPTY_STRING)) {
+ throw new
SOAPProcessingException(SOAPPlugin.Util.getString("WebServiceUtil.0"));
//$NON-NLS-1$
+ }
+ }
+
+ /**
+ * This method gets the user credentials containg username and password to use for a
server connection. It will return a
+ * WSUsernameTokenPrincipal if WS-Security was used and a string containing encrypted
username and password if HTTPBasic was
+ * used. If neither was used an exception will be thrown.
+ *
+ * @return Object (WSUsernameTokenPrincipal or String)
+ * @throws AxisFault
+ * @since 5.5
+ */
+ public static Credential getCredentials( final MessageContext msgCtx ) throws AxisFault
{
+
+ WSUsernameTokenPrincipal principal = null;
+ String basicAuthenticationString = null;
+
+ /*
+ * These are thread contextual calls that we can make in this web service
implementation to get the authorization
+ * information for the current call.
+ */
+
+ Vector results = null;
+
+ if ((results = (Vector)msgCtx.getProperty(WSHandlerConstants.RECV_RESULTS)) != null) {
+ for (int i = 0; i < results.size(); i++) {
+ WSHandlerResult rResult = (WSHandlerResult)results.get(i);
+ Vector wsSecEngineResults = rResult.getResults();
+
+ for (int j = 0; j < wsSecEngineResults.size(); j++) {
+ WSSecurityEngineResult wser = (WSSecurityEngineResult)wsSecEngineResults.get(j);
+ if (((java.lang.Integer)wser.get(WSSecurityEngineResult.TAG_ACTION)).intValue() ==
WSConstants.UT
+ && wser.get(WSSecurityEngineResult.TAG_PRINCIPAL) != null) {
+
+ // Extract the principal
+ principal =
(WSUsernameTokenPrincipal)wser.get(WSSecurityEngineResult.TAG_PRINCIPAL);
+ }
+ }
+ }
+ }
+
+ // If WS-Security token was not found, check for HTTPBasic
+ if (principal == null) {
+ HttpServletRequest req =
(HttpServletRequest)msgCtx.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
+
+ // Acquiring Authorization Header from servlet request
+ basicAuthenticationString = req.getHeader("Authorization"); //$NON-NLS-1$
+
+ if (basicAuthenticationString != null) {
+ basicAuthenticationString =
basicAuthenticationString.substring(basicAuthenticationString.indexOf(" "));
//$NON-NLS-1$
+ }
+ }
+
+ if (principal == null && basicAuthenticationString == null) {
+ throw (new AxisFault(SOAPPlugin.Util.getString("WebServiceUtil.1")));
//$NON-NLS-1$
+ }
+
+ Credential credential = null;
+ if (principal != null) {
+ credential = new Credential(principal.getName(), principal.getPassword().getBytes());
+ } else {
+ // Assume Basic
+ credential = getBasicUserNameAndPassword(basicAuthenticationString);
+ }
+
+ return credential;
+ }
+
+ /**
+ * This decodes and parses the username and password from an encrypted string derived
from HTTPBasic and returns in a <@link
+ * come.metamatrix.soap.security.Credential> instance.
+ *
+ * @return userName - String
+ */
+ public static Credential getBasicUserNameAndPassword( final Object creds ) {
+
+ // Decoding the authorization header...
+ String decoded = new String(org.apache.axiom.om.util.Base64.decode(creds.toString()));
+
+ // decoded now contains username:password in plain text.
+ int i = decoded.indexOf(":"); //$NON-NLS-1$
+
+ // so we take the username from it ( everything until the ':' )
+ String userName = decoded.substring(0, i);
+
+ // and the password
+ String password = decoded.substring(i + 1, decoded.length());
+
+ return new Credential(userName, password.getBytes());
+ }
+
+ /**
+ * @param userName
+ * @param password
+ * @param serverUrlInfo
+ * @return Admin
+ * @throws LogonException, AdminException
+ * @since 5.5.3
+ */
+ public static Admin getAdminAPI( final String userName,
+ final String password,
+ final MMServerInfo serverUrlInfo ) throws
AdminException {
+ Admin serverAdmin = null;
+
+ org.teiid.common.comm.platform.client.ServerAdminFactory factory =
ServerAdminFactory.getInstance();
+ serverAdmin = factory.createAdmin(userName, password.toCharArray(),
serverUrlInfo.toString());
+
+ return serverAdmin;
+ }
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslationException.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslationException.java
(rev 0)
+++
sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslationException.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import com.metamatrix.api.exception.MetaMatrixException;
+
+/**
+ *
+ *
+ */
+public class XMLTranslationException extends MetaMatrixException {
+
+ /**
+ * No-arg constructor required by Externalizable semantics.
+ */
+ public XMLTranslationException() {
+ super();
+ }
+
+ /**
+ * Constructor for XMLTranslationException.
+ * @param message
+ */
+ public XMLTranslationException(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructor for XMLTranslationException.
+ * @param code
+ * @param message
+ */
+ public XMLTranslationException(String code, String message) {
+ super(code, message);
+ }
+
+ /**
+ * Constructor for XMLTranslationException.
+ * @param e
+ * @param message
+ */
+ public XMLTranslationException(Throwable e, String message) {
+ super(e, message);
+ }
+
+ /**
+ * Constructor for XMLTranslationException.
+ * @param e
+ * @param code
+ * @param message
+ */
+ public XMLTranslationException(Throwable e, String code, String message) {
+ super(e, code, message);
+ }
+
+}
Added: sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslator.java
===================================================================
--- sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslator.java
(rev 0)
+++ sqlquerywebservice/src/main/java/org/teiid/soap/util/XMLTranslator.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,870 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.SQLWarning;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import com.metamatrix.jdbc.MMResultSet;
+import com.metamatrix.soap.SOAPPlugin;
+
+/**
+ * ResultDocuments is an organized way of structuring XML documents
+ * The following illustrates an example of an XML document
+ * <xmldoc>
+ * <xmlschema isprimary="true">
+ * <xml .... </xml>
+ * </xmlschema>
+ * </xmldoc>
+ *
+ *
+ * Stored Procedure Parameters are an organized way of structuring data necessary
+ * for executing a stored procedure (SP) call against the MetaMatrix server
+ * The following illustrates an example of 2 stored procedure parameters with a value of
1 and null
+ * <paramaters>
+ * <param index="1">1</param>
+ * <param index="2"></param>
+ * </parameters>
+ *
+ *
+ * Tabular Results (TR) is an organized way of structuring results data. The following
example illustrates
+ * the TR format with full metadata from a ResultSet with two columns and 3 rows of data.
+ * <resultset>
+ * <metadata elementCount=�2� >
+ * <column datatype="float" VDBName=�MyVDB� VDBVersion=�1�
groupName=�MyTable�
+ * precision=�1� radix=�� scale=�2� searchable=�true� isAutoIncrementing=�false�
+ * isCaseSensitive=�false� isCurrency=�false� isNullable=�true�
isSigned=�true�>FloatNum
+ * </column>
+ *
+ * <column datatype="int" VDBName=�MyVDB� VDBVersion=�1�
groupName=�MyTable�
+ * precision=�1� scale=�0� radix=�� searchable=�true� isAutoIncrementing=�false�
+ * isCaseSensitive=�false� isCurrency=�false� isNullable=�true�
isSigned=�true�>IntNum
+ * </column>
+ * </metadata>
+ * <data>
+ * <row><cell>5.0</cell><cell>5</cell</row>
+ * <row><cell>8.0</cell><cell>5</cell></row>
+ * <row><cell>3.5</cell><cell>6</cell></row>
+ * </data>
+ * </resultset>
+ *
+ * The following example illustrates limited metadata (which is the default) of the same
result set
+ *
+ * <resultset>
+ * <metadata elementCount=�2�>
+ * <column datatype="float">FloatNum</column>
+ * <column datatype="int">IntNum</column>
+ * </metadata>
+ * <data>
+ * <row><cell>5.0</cell><cell>5</cell</row>
+ * <row><cell>8.0</cell><cell>5</cell></row>
+ * <row><cell>3.5</cell><cell>6</cell></row>
+ * </data>
+ * </resultset>
+ *
+ *
+ */
+public class XMLTranslator {
+
+ /**
+ * Constructor for XMLTranslator.
+ */
+ public XMLTranslator() {
+ super();
+ }
+
+ private Document document;
+
+ /**
+ * Translate a results document into a w3c Element
+ * @param documents The documents to translate
+ * @param returnSchema whether to include the schema within the document
+ * @return resultsElement
+ * @throws SOAPTranslationException if a translation error occurs
+ *
+ */
+ public Element translateResultDocuments(ResultSet documents) throws SQLException,
XMLTranslationException {
+ Element resultsElement =
getNewElement(XMLTranslator.Constant_TAGS.XMLDOCUMENTS_RESULTS_TAG);
+ try{
+ while(documents.next()){
+ //create a document element
+ Element documentElement =
getNewElement(XMLTranslator.Constant_TAGS.XMLDOCUMENTS.XMLDOCUMENTS_TAG);
+ // get the document
+ String documentString = documents.getString(1);
+ documentString =
documentString.substring(XMLTranslator.Constant_TAGS.XML_TAG.length());
+ // create a text node
+ Node documentNode =
getNewTextNode(XMLTranslator.Constant_TAGS.XMLDOCUMENTS.XMLDOCUMENTS_TAG);
+ documentNode.setNodeValue(documentString);
+ // add the node to the document element
+ documentElement.appendChild(documentNode);
+ // add the element to the results
+ resultsElement.appendChild(documentElement);
+ }
+ } catch(Exception e){
+ throw new XMLTranslationException(e,ErrorMessageKeys.xml_0009,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0009));
+ }
+
+ resultsElement = addWarningsAndExceptions(resultsElement, documents);
+ return resultsElement;
+ }
+
+ /**
+ * Translate the schema into a w3c Element
+ * @param schema The String schema of the the XML document
+ * @boolean isPrimary whether this schema is the priimary document
+ * @return Element
+ * @throws XMLTranslationException
+ *
+ */
+ public Element translateXMLSchema(String schema, boolean isPrimary) throws
XMLTranslationException {
+ if(schema == null){
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0010,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0010));
+ }
+ Element schemaElement =
getNewElement(XMLTranslator.Constant_TAGS.XMLSCHEMA.XMLSCHEMA_TAG);
+ // get a new text node
+ Node xmlNode = getNewTextNode(XMLTranslator.Constant_TAGS.XMLSCHEMA.XMLSCHEMA_TAG);
+ xmlNode.setNodeValue(schema);
+ schemaElement.setAttribute(XMLTranslator.Constant_TAGS.XMLSCHEMA.Attributes.IS_PRIMARY_TAG,""+isPrimary);
//$NON-NLS-1$
+ // add the schema to the element
+ schemaElement.appendChild(xmlNode);
+ return schemaElement;
+ }
+
+ /**
+ * This method will translate a list of XML String Schemas into a w3c Element
+ * If the schema is null then it will return a schema of "Schema is not
available" in the message node
+ * @param schemas a list of XML String schemas
+ * @return Element containing all the schemas
+ * @throws XMLTranslationException
+ *
+ */
+ public Element translateXMLSchemas(Element root, Collection schemas) throws
XMLTranslationException {
+ if(root == null){
+ root = getNewElement(XMLTranslator.Constant_TAGS.XMLSCHEMA.XMLSCHEMA_TAG);
+ }
+ if(schemas == null){
+ Element schemaElement =
translateXMLSchema(SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0011), true);
+ root.appendChild(schemaElement);
+ } else {
+ // create a new element
+ Iterator iter = schemas.iterator();
+ boolean isPrimary = true;
+ while(iter.hasNext()){
+ String schema = (String)iter.next();
+ Element schemaElement = translateXMLSchema(schema, isPrimary);
+ // add the element to the main element
+ root.appendChild(schemaElement);
+ isPrimary = false;
+ }
+ }
+ return root;
+ }
+
+
+ /**
+ * Translates a literal XML parameter element into a Map with Int
+ * @param parameters (index and value) parameters in an XML format
+ */
+ public Map translateStoredProcedureParameters(Element parameters) throws
XMLTranslationException{
+ Map parameterMap = new HashMap();
+ // get the list of children
+ NodeList list = parameters.getChildNodes();
+ int numberOfParameters = list.getLength();
+ Integer index = null;
+ Object value = null;
+ for(int itemIndex=0;itemIndex<numberOfParameters;itemIndex++){
+ Node parameterNode = list.item(itemIndex);
+ // get the index attribute
+ NamedNodeMap attributes = parameterNode.getAttributes();
+ Node indexAttribute =
attributes.getNamedItem(XMLTranslator.Constant_TAGS.StoredProcedureParameters.Param.Attributes.INDEX_TAG);
+ if(indexAttribute != null){
+ // get the index value
+ String indexString = indexAttribute.getNodeValue();
+ try{
+ index = new Integer(indexString);
+ } catch(NumberFormatException nfe){
+ throw new XMLTranslationException(nfe,ErrorMessageKeys.xml_0012,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0012, indexString));
+ }
+ } else {
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0013,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0013));
+ }
+ // now get the value
+ Node valueNode = parameterNode.getFirstChild();
+ if(valueNode != null){
+ value = valueNode.getNodeValue();
+ }
+ // now put the index and value into the Map
+ parameterMap.put(index,value);
+ }
+ return parameterMap;
+ }
+ /**
+ * This method will translate MetaMatrix parameters into a literal XML Element
containing
+ * The list of parameters will be a map of Integer indexes to Object values correlating
to the
+ * StoredProcedure's modeled information
+ * @param parameters
+ * @return literal xml element containing the parameters
+ * @throws XMLTranslationException if an error occurs
+ *
+ */
+ public Element translateParameters(Map parameters) throws XMLTranslationException{
+ if(parameters == null){
+ // this procedure might not have any parameters so just create an empty list
+ parameters = new HashMap();
+ }
+ Element parametersElement =
getNewElement(XMLTranslator.Constant_TAGS.StoredProcedureParameters.PARAMETERS_TAG);
+ try{
+ Iterator iter = parameters.keySet().iterator();
+ while(iter.hasNext()){
+ Integer index = (Integer)iter.next();
+ Object value = parameters.get(index);
+ // construct a parameter element
+ Element parameter = constructParameterElement(index, value);
+ // add the parameter to the root element
+ parametersElement.appendChild(parameter);
+ }
+ } catch(Exception e){
+ throw new XMLTranslationException(e,ErrorMessageKeys.xml_0014,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0014, e.getMessage()));
+ }
+ return parametersElement;
+
+ }
+ /**
+ * Construct a metadata parameter which is used for the metadata method getMetdata
+ * @param parameterName the name of the parameter
+ * @param filter the value to filter on
+ * @return Elemetn
+ * @throws XMLTranslationException
+ */
+ public Element createMetadataParameter(String parameterName, String filter) throws
XMLTranslationException{
+ if(parameterName == null){
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0015,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0015));
+ }
+ Element parametersElement =
getNewElement(XMLTranslator.Constant_TAGS.MetadataParameter.METADATA_PARAMETER_TAG);
+ parametersElement.setAttribute(XMLTranslator.Constant_TAGS.MetadataParameter.Attributes.NAME_TAG,parameterName);
+
+ Node valueNode =
getNewTextNode(XMLTranslator.Constant_TAGS.MetadataParameter.METADATA_PARAMETER_TAG);
+ if(filter == null){
+ filter = new String();
+ }
+ valueNode.setNodeValue(filter);
+ parametersElement.appendChild(valueNode);
+ return parametersElement;
+ }
+
+ /**
+ * Gets the appropriate metadata parameter element based on it it's name
+ * @param parameterName
+ * @return Element
+ * @throws XMLTranslationException
+ */
+ public Element getMetadataParameterElement(Element rootElement, String parameterName)
throws XMLTranslationException{
+ NodeList list = rootElement.getChildNodes();
+ int size = list.getLength();
+ for(int i=0;i<size;i++){
+ Node nodeToCheck = list.item(i);
+
+ if(nodeToCheck.getNodeType() == Node.ELEMENT_NODE){
+ String attributeValue =
((Element)nodeToCheck).getAttribute(XMLTranslator.Constant_TAGS.MetadataParameter.Attributes.NAME_TAG);
+ if(parameterName.equalsIgnoreCase(attributeValue)){
+ return (Element)nodeToCheck;
+ }
+ }
+ }
+
+ return rootElement;
+ }
+ /**
+ * Get the metadata parameter name of this element
+ * @return the metadata parameter name
+ * @throws XMLTranslationException
+ */
+ public String getMetadataParameterName(Element metadataParameterElement) throws
XMLTranslationException{
+ return
metadataParameterElement.getAttribute(XMLTranslator.Constant_TAGS.MetadataParameter.Attributes.NAME_TAG);
+ }
+ /**
+ * Gets the metadata parameter value for a given element
+ * @param metadataParameterElemetn
+ * @throws XMLTranslationException
+ */
+ public String getMetadataParameterValue(Element metadataParameterElement) throws
XMLTranslationException{
+ String value = null;
+ Node textNode = metadataParameterElement.getFirstChild();
+ if(textNode != null){
+ value = textNode.getNodeValue();
+ }
+ return value;
+ }
+
+ /**
+ * Construct a parameter element given an Integer index and Object value
+ * @param index
+ * @param value
+ * @return constructed Literal XML element
+ * @throws XMLTranslationException if an error occurs
+ *
+ */
+ private Element constructParameterElement(Integer index, Object value) throws
XMLTranslationException{
+ if(index == null){
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0016,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0016));
+ }
+ Element parameterElement =
getNewElement(XMLTranslator.Constant_TAGS.StoredProcedureParameters.Param.PARAM_TAG);
+ // add the attribute of index
+ parameterElement.setAttribute(XMLTranslator.Constant_TAGS.StoredProcedureParameters.Param.Attributes.INDEX_TAG,index.toString());
+ // create a value node
+ Node valueNode =
getNewTextNode(XMLTranslator.Constant_TAGS.StoredProcedureParameters.Param.PARAM_TAG);
+ if(value == null){
+ // create an empty string to represent a NULL value
+ value = new String();
+ }
+ valueNode.setNodeValue(value.toString());
+ parameterElement.appendChild(valueNode);
+ return parameterElement;
+ }
+
+
+ /**
+ * Given an integer count of the rows affected, create a Literal XML Element
+ * to be returned
+ * @param rowsAffected
+ * @return Element
+ * @throws XMLTranslationException if an error occurs
+ *
+ */
+ public Element translateRowsAffected(int rowsAffected) throws XMLTranslationException {
+ Element rowsAffectedElement =
getNewElement(XMLTranslator.Constant_TAGS.ROWS_AFFECTED_TAG);
+ Node rowsAffectedNode = getNewTextNode(XMLTranslator.Constant_TAGS.ROWS_AFFECTED_TAG);
+ rowsAffectedNode.setNodeValue(""+rowsAffected); //$NON-NLS-1$
+ rowsAffectedElement.appendChild(rowsAffectedNode);
+ return rowsAffectedElement;
+ }
+
+
+ /**
+ * Given a MetaMatrix Results object generate the Tabuluar Results
+ *
+ */
+ public Element translateTabularResults(ResultSet results, boolean fullMetadata) throws
SQLException, XMLTranslationException {
+ // create the element to return
+ Element resultsElement = getNewElement(XMLTranslator.Constant_TAGS.RESULT_SET_TAG);
+ try {
+ Element metadataElement = createMetadataElement(results.getMetaData());
+
+ List listOfColumnElements = createColumnElements(results.getMetaData(),fullMetadata);
+ Iterator iter = listOfColumnElements.iterator();
+ while(iter.hasNext()){
+ Element columnElement = (Element)iter.next();
+ // add the column element information to the results element
+ metadataElement.appendChild(columnElement);
+ }
+
+ // add the metadata element to the results element
+ resultsElement.appendChild(metadataElement);
+
+ Element dataElement = createDataElement((MMResultSet)results);
+ // add the dataElement to the results Element
+ resultsElement.appendChild(dataElement);
+
+ } catch (Exception e){
+ throw new XMLTranslationException(e,ErrorMessageKeys.xml_0017,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0017, e.getMessage()));
+ }
+ resultsElement = addWarningsAndExceptions(resultsElement, results);
+ return resultsElement;
+ }
+
+ /**
+ * Given a MetaMatrix Results object generate the Tabuluar Results
+ *
+ */
+ public Element translateTabularResults(ResultSet results, boolean fullMetadata, int[]
rows) throws SQLException, XMLTranslationException {
+ // create the element to return
+ Element resultsElement = getNewElement(XMLTranslator.Constant_TAGS.RESULT_SET_TAG);
+ try {
+ Element metadataElement = createMetadataElement(results.getMetaData());
+
+ List listOfColumnElements = createColumnElements(results.getMetaData(),
fullMetadata);
+ Iterator iter = listOfColumnElements.iterator();
+ while(iter.hasNext()){
+ Element columnElement = (Element)iter.next();
+ // add the column element information to the results element
+ metadataElement.appendChild(columnElement);
+ }
+
+ // add the metadata element to the results element
+ resultsElement.appendChild(metadataElement);
+
+ Element dataElement = createDataElement((MMResultSet)results, rows);
+ // add the dataElement to the results Element
+ resultsElement.appendChild(dataElement);
+
+ } catch (Exception ste){
+ throw new XMLTranslationException(ste,ErrorMessageKeys.xml_0017,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0017, ste.getMessage()));
+ }
+ resultsElement = addWarningsAndExceptions(resultsElement, results);
+ return resultsElement;
+ }
+
+ private Element addWarningsAndExceptions(Element root, ResultSet results) throws
SQLException, XMLTranslationException {
+ // add any warnings
+ Element warningElement = translateWarnings(results);
+ if(warningElement != null){
+ root.appendChild(warningElement);
+ }
+ return root;
+ }
+ /**
+ * Helper method to produce a warning element based on results
+ * will return null if there is no warning
+ * @param results
+ * @return element (or null if no warning exists)
+ * @throws XMLTranslationException if an error occurs
+ */
+ private Element translateWarnings(ResultSet results) throws SQLException,
XMLTranslationException {
+ Element warningElement = null;
+ SQLWarning warning = results.getWarnings();
+ if(warning != null){
+ // create the root warning element
+ warningElement = getNewElement(XMLTranslator.Constant_TAGS.WARNINGS_TAG);
+ for (;warning != null;
+ warning = warning.getNextWarning()) {
+ String message = warning.getMessage();
+ // create the warning element
+ Element warningChild =
getNewElement(XMLTranslator.Constant_TAGS.WARNING_TAG);
+ // create the text node containing the warning message
+ Node childTextNode =
getNewTextNode(XMLTranslator.Constant_TAGS.WARNING_TAG);
+ childTextNode.setNodeValue(message);
+ warningChild.appendChild(childTextNode);
+ warningElement.appendChild(warningChild);
+ }
+ }
+
+ return warningElement;
+ }
+
+ /**
+ * This method will create a list of Column element and add all of it's attributes
to each one
+ * @param metadata
+ * @param fullMetadata
+ * @throws XMLTranslationException
+ *
+ */
+ private List createColumnElements(ResultSetMetaData metadata, boolean fullMetadata)
throws SQLException, XMLTranslationException {
+ List listOfColumns = new ArrayList();
+ int count = metadata.getColumnCount();
+ for(int index=0;index<count;index++){
+ Element columnElement =
createColumnElement((com.metamatrix.jdbc.api.ResultSetMetaData)metadata,fullMetadata,index);
+ listOfColumns.add(columnElement);
+ }
+ return listOfColumns;
+ }
+
+ /**
+ * This method will create a data element
+ * e.g.
+ * <data>
+ * <row><cell>5.0</cell><cell>5</cell</row>
+ * <row><cell>8.0</cell><cell>5</cell></row>
+ * <row><cell>3.5</cell><cell>6</cell></row>
+ * </data>
+ * @param results
+ * @return data Element
+ * @throws XMLTranslationException
+ *
+ */
+ private Element createDataElement(MMResultSet results) throws XMLTranslationException
{
+ // create the data tag
+ Element dataElement = getNewElement(XMLTranslator.Constant_TAGS.Data.DATA_TAG);
+ try{
+ while(results.next()){
+ List record = results.getCurrentRecord();
+ Element rowElement = createRowElement(record);
+ // add the row to the data Element
+ dataElement.appendChild(rowElement);
+ }
+ } catch(Exception e){
+ throw new XMLTranslationException(e.getMessage());
+ }
+ return dataElement;
+ }
+
+ private Element createDataElement(MMResultSet results, int[] rows) throws
XMLTranslationException {
+ if(rows == null) {
+ return createDataElement(results);
+ }
+ // create the data tag
+ Element dataElement = getNewElement(XMLTranslator.Constant_TAGS.Data.DATA_TAG);
+ try{
+ for(int i=0; i < rows.length; i++) {
+ int rowIndex = rows[i];
+ // move the cursor to the next row to be exported
+ while(results.getRow() != rowIndex) {
+ results.next();
+ }
+ List record = results.getCurrentRecord();
+ Element rowElement = createRowElement(record);
+ // add the row to the data Element
+ dataElement.appendChild(rowElement);
+ }
+ } catch(Exception e){
+ throw new XMLTranslationException(e.getMessage());
+ }
+ return dataElement;
+ }
+
+ /**
+ * This will construct a row element for the current row
+ * @param List of records for the current row
+ * @return Element (row Element)
+ * @throws XMLTranslationException
+ */
+ private Element createRowElement(List record) throws XMLTranslationException {
+ // create the data tag
+ Element rowElement = getNewElement(XMLTranslator.Constant_TAGS.Data.Row.ROW_TAG);
+ // now for each column create a cell and add it to the row element
+ Iterator iter = record.iterator();
+ while(iter.hasNext()){
+ Element cellElement =
getNewElement(XMLTranslator.Constant_TAGS.Data.Row.Cell.CELL_TAG);
+ Object value = iter.next();
+ // create the cell element
+ Node cellNode = getNewTextNode(XMLTranslator.Constant_TAGS.Data.Row.Cell.CELL_TAG);
+ if(value == null){
+ value = new String();
+ }
+ cellNode.setNodeValue(value.toString());
+ // add the cell to the row Element
+ cellElement.appendChild(cellNode);
+ rowElement.appendChild(cellElement);
+ }
+ return rowElement;
+ }
+
+
+ /**
+ * This method will create a column element and all of it's attributes to it
+ * @param metadata
+ * @param fullMetadata
+ * @param index
+ * @return columnElement
+ * @throws XMLTranslationException if a MetadataAccessException occurs
+ *
+ */
+ private Element createColumnElement(com.metamatrix.jdbc.api.ResultSetMetaData metadata,
boolean fullMetadata, int index)
+ throws SQLException, XMLTranslationException {
+ Element columnElement = getNewElement(XMLTranslator.Constant_TAGS.Column.COLUMN_TAG);
+
+// try{
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.DATATYPE,metadata.getColumnTypeName(index));
+ // create a text node
+ Node columnNameNode =
getNewTextNode(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.DATATYPE);
+ columnNameNode.setNodeValue(metadata.getColumnName(index));
+ columnElement.appendChild(columnNameNode);
+
+ if(fullMetadata){
+ // add the following attributes
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.VDBNAME,metadata.getVirtualDatabaseName(index));
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.VDBVERSION,metadata.getVirtualDatabaseVersion(index));
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.GROUPNAME,metadata.getCatalogName(index));
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.PRECISION,""+metadata.getPrecision(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.RADIX,"10");
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.SCALE,""+metadata.getScale(index));
//$NON-NLS-1$
+
columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.SEARCHABLE,""+metadata.isSearchable(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISAUTOINCREMENTING,""+metadata.isAutoIncrement(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISCASESENSITIVE,""+metadata.isCaseSensitive(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISCURRENCY,""+metadata.isCurrency(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISNULLABLE,""+metadata.isNullable(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISSIGNED,""+metadata.isSigned(index));
//$NON-NLS-1$
+ columnElement.setAttribute(XMLTranslator.Constant_TAGS.Column.COLUMN_ATTRIBUTE_TAGS.ISUPDATEABLE,""+metadata.isWritable(index));
//$NON-NLS-1$
+ }
+// }catch(MetadataAccessException mae){
+// throw new XMLTranslationException(mae);
+// }
+ return columnElement;
+ }
+ /**
+ * This method will create a metadata element and add all of it's attributes to it
+ * @param metadata
+ * @param fullMetadata
+ * @throws XMLTranslationException
+ *
+ */
+ private Element createMetadataElement(ResultSetMetaData metadata) throws SQLException,
XMLTranslationException {
+
+ // Create the metadata element
+ Element metadataElement =
getNewElement(XMLTranslator.Constant_TAGS.Metadata.METADATA_TAG);
+ // add it's attributes
+ metadataElement = addMetadataElementAttributes(metadataElement,metadata);
+
+ return metadataElement;
+ }
+
+ /**
+ * This will construct an element with a namespace of metadata and an elementCount
attribute
+ * @param metadata
+ * @throws XMLTranslationException if an error occurs
+ * an example is:
+ * <metadata elementCount=�2�>
+ */
+ private Element addMetadataElementAttributes(Element metadataElement, ResultSetMetaData
metadata) throws SQLException {
+
+ String elementCount = new String(""+ metadata.getColumnCount());
//$NON-NLS-1$
+ metadataElement.setAttribute(XMLTranslator.Constant_TAGS.Metadata.Attributes.ELEMENT_COUNT_TAG,elementCount);
+ return metadataElement;
+ }
+
+
+ /**
+ * This method will create a new w3c Element with a given name
+ * @param elementName
+ * @return Element
+ * @throws XMLTranslationException if it cannot create an Element
+ *
+ */
+ public Element getNewElement(String elementName) throws XMLTranslationException {
+ if(elementName == null){
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0018,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0018) );
+ }
+ Document doc = null;
+ try{
+ doc = getDocument();
+ } catch(ParserConfigurationException pce){
+ throw new XMLTranslationException(pce,ErrorMessageKeys.xml_0019,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0019, pce.getMessage()));
+ }
+ return doc.createElement(elementName);
+ }
+
+ protected Document getDocument() throws ParserConfigurationException{
+ if(document == null){
+ DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+ DocumentBuilder builder = factory.newDocumentBuilder();
+ document = builder.newDocument();
+ }
+ return document;
+ }
+
+ /**
+ * This method will create a new w3c Node with a given name
+ * @param nodeName
+ * @return Node
+ * @throws XMLTranslationException if it cannot create a Node
+ *
+ */
+ protected Node getNewTextNode(String nodeName) throws XMLTranslationException {
+ if(nodeName == null){
+ throw new XMLTranslationException(ErrorMessageKeys.xml_0020,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0020));
+ }
+ Document doc = null;
+ try{
+ doc = getDocument();
+ } catch(ParserConfigurationException pce){
+ throw new XMLTranslationException(pce,ErrorMessageKeys.xml_0019,
SOAPPlugin.Util.getString(ErrorMessageKeys.xml_0019, pce.getMessage()));
+ }
+ return doc.createTextNode(nodeName);
+ }
+
+
+ public String translateElementToString(Node element)throws XMLTranslationException {
+ StringBuffer result = new StringBuffer();
+ if(element.getNodeType() == Node.TEXT_NODE){
+ result.append(element.getNodeValue());
+ } else {
+ if(element.getParentNode() == null) {
+ result.append(XMLTranslator.Constant_TAGS.XML_TAG);
+ }
+ result.append("<"); //$NON-NLS-1$
+ result.append(element.getNodeName());
+ // check for attributes
+ NamedNodeMap map = element.getAttributes();
+ if(map !=null){
+ int attributes = map.getLength();
+ for(int index=0;index<attributes;index++){
+ // get each attribute
+ Node attr = map.item(index);
+ // get the name of the attribute
+ result.append(" "); //$NON-NLS-1$
+ result.append(attr.getNodeName());
+ result.append("="); //$NON-NLS-1$
+ result.append("\""); //$NON-NLS-1$
+ result.append(attr.getNodeValue());
+ result.append("\""); //$NON-NLS-1$
+
+ if(index < attributes-1){
+ result.append(" "); //$NON-NLS-1$
+ }
+ }
+ }
+ result.append(">"); //$NON-NLS-1$
+ // now get any text for this node
+
+ NodeList list = element.getChildNodes();
+ int numberOfChildren = list.getLength();
+ for(int i=0;i<numberOfChildren;i++){
+ String child = translateElementToString(list.item(i));
+ result.append(child);
+ }
+ result.append("</"); //$NON-NLS-1$
+ result.append(element.getNodeName());
+ result.append(">"); //$NON-NLS-1$
+ }
+
+ return result.toString();
+ }
+ /**
+ * This class contains the Constant tag names used in construction of the XML results
+ *
+ * @author Andrew Martello
+ * @since May 15, 2002
+ */
+ public static final class Constant_TAGS {
+
+ public static final String XML_TAG = "<?xml version=\"1.0\"
encoding=\"UTF-8\"?>"; //$NON-NLS-1$
+
+ public static final String ROWS_AFFECTED_TAG = "rowsaffected"; //$NON-NLS-1$
+
+ public static final String RESULT_SET_TAG = "resultset"; //$NON-NLS-1$
+
+ public static final String WARNINGS_TAG = "warnings"; //$NON-NLS-1$
+
+ public static final String WARNING_TAG = "warning"; //$NON-NLS-1$
+
+ public static final String EXCEPTION_TAG = "exception"; //$NON-NLS-1$
+
+ public static final String XMLDOCUMENTS_RESULTS_TAG = "xmlresults";
//$NON-NLS-1$
+
+ public static final class XMLDOCUMENTS{
+ public static final String XMLDOCUMENTS_TAG = "xmldoc"; //$NON-NLS-1$
+
+ }
+ public static final class XMLSCHEMA{
+ public static final String XMLSCHEMA_TAG = "xmlschema"; //$NON-NLS-1$
+ public static final class Attributes{
+ public static final String IS_PRIMARY_TAG = "isprimary"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class StoredProcedureParameters{
+ public static final String PARAMETERS_TAG =
SOAPConstants.STORED_PROCEDURE_PARAMETERS.PARAMETERS_TAG;
+ public static final class Param{
+ public static final String PARAM_TAG =
SOAPConstants.STORED_PROCEDURE_PARAMETERS.Param.PARAM_TAG;
+ public static final class Attributes{
+ public static final String INDEX_TAG =
SOAPConstants.STORED_PROCEDURE_PARAMETERS.Param.Attributes.INDEX_TAG;
+ }
+ }
+ }
+
+ public static final class Metadata{
+ public static final String METADATA_TAG = "metadata"; //$NON-NLS-1$
+ public static final class Attributes{
+ // how many elements are in the tabular results
+ public static final String ELEMENT_COUNT_TAG = "elementcount";
//$NON-NLS-1$
+ }
+ }
+
+ public static final class MetadataParameter{
+ public static final String METADATA_PARAMETER_TAG = "metadataparameter";
//$NON-NLS-1$
+ public static final class Attributes{
+ public static final String NAME_TAG = "name"; //$NON-NLS-1$
+ }
+ }
+ public static final class Column{
+
+ public static final String COLUMN_TAG = "column"; //$NON-NLS-1$
+ /**
+ * The following class contains the tag names for the metadata information
+ * that will be in the Tabular Results
+ */
+ public static final class COLUMN_ATTRIBUTE_TAGS{
+ // the data type of the column
+ public static final String DATATYPE = "datatype"; //$NON-NLS-1$
+
+ // the virtual database of the particular column
+ public static final String VDBNAME = "vdbname"; //$NON-NLS-1$
+
+ // the virtual databse version of the particular column
+ public static final String VDBVERSION = "vdbversion"; //$NON-NLS-1$
+
+ // the name of the table
+ public static final String GROUPNAME = "groupname"; //$NON-NLS-1$
+
+ // the number of decimal digits
+ public static final String PRECISION = "precision"; //$NON-NLS-1$
+
+ // the column's radix 10 or 2
+ public static final String RADIX = "radix"; //$NON-NLS-1$
+
+ // the column's scale
+ public static final String SCALE = "scale"; //$NON-NLS-1$
+
+ // whether this column is searchable or not
+ public static final String SEARCHABLE = "searchable"; //$NON-NLS-1$
+
+ // whether this column is auto incrementing or not
+ public static final String ISAUTOINCREMENTING = "isautoincrementing";
//$NON-NLS-1$
+
+ // whether this column is case sensitive or not
+ public static final String ISCASESENSITIVE = "iscasesensitive";
//$NON-NLS-1$
+
+ // whether this column can be a currency value
+ public static final String ISCURRENCY = "iscurrency"; //$NON-NLS-1$
+
+ // whether this column can be nullable or not
+ public static final String ISNULLABLE = "isnullable"; //$NON-NLS-1$
+
+ // whether this column is signed or not
+ public static final String ISSIGNED = "issigned"; //$NON-NLS-1$
+
+ // whether this column is updateable or not
+ public static final String ISUPDATEABLE = "isupdateable"; //$NON-NLS-1$
+ }
+ }
+
+ public static final class Data {
+ public static final String DATA_TAG = "data"; //$NON-NLS-1$
+
+ public static final class Row {
+ public static final String ROW_TAG = "row"; //$NON-NLS-1$
+
+ public static final class Cell {
+ public static final String CELL_TAG = "cell"; //$NON-NLS-1$
+ }
+ }
+ }
+ }
+}
Added: sqlquerywebservice/src/main/resources/com/teiid/soap/i18n.properties
===================================================================
--- sqlquerywebservice/src/main/resources/com/teiid/soap/i18n.properties
(rev 0)
+++ sqlquerywebservice/src/main/resources/com/teiid/soap/i18n.properties 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,174 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+# authentication (001)
+ERR.018.001.0001 = Session ID parameter cannot be null.
+ERR.018.001.0002 = Server URL parameter cannot be null.
+ERR.018.001.0003 = Virtual database parameter cannot be null.
+ERR.018.001.0004 = Maximum number of anonymous connections reached.
+
+# servlet (002)
+ERR.018.002.0001 = The metadata type ({0}) is not a valid type.
+ERR.018.002.0002 = Unexpected type for current index for stored procedure parameters
received from form page, was expecting type of Integer but was ({0}) instead: {1}
+ERR.018.002.0003 = The SOAP Call failed. The details are: {0}
+ERR.018.002.0004 = Required parameter ({0}) not found in form data.
+ERR.018.002.0005 = Unable to get metadata data types: {0}
+ERR.018.002.0006 = Unable to get a connection.
+ERR.018.002.0007 = Unable to use anonymous login as a dedicated session.
+ERR.018.002.0008 = Unable to obtain the connection pool controller: {0}
+ERR.018.002.0009 = Unable to logoff from server: {0}
+ERR.018.002.0010 = The stored procedure cannot be null.
+ERR.018.002.0011 = The stored procedure name cannot be null
+ERR.018.002.0012 = The results returned from the data service were null.
+ERR.018.002.0013 = SQL cannot be null for SOAP method submitXMLQuery
+ERR.018.002.0014 = Unable to read the returned result set.
+ERR.018.002.0015 = Unable to retreive metadata from the Query Results.
+ERR.018.002.0016 = The current user session is invalid, please login again.
+ERR.018.002.0017 = The user connection cannot be established.
+ERR.018.002.0018 = Connection is not available, check server to make sure it is running.
+ERR.018.002.0019 = Unable to establish a connection: {0}
+ERR.018.002.0020 = The specified port {0} is invalid.
+ERR.018.002.0021 = The specified host {0} is invalid.
+ERR.018.002.0022 = Recheck the parameters provided.\n\nThe generated URL: {0}\n\nCould
not be used to get WSDL due to error: {1}
+ERR.018.002.0023 = The user entered a negative number.
+ERR.018.002.0024 = The specified version {0} is invalid.
+ERR.018.002.0025 = Did not find a colon delimiter between the server host and port for
the supplied list item {0}
+ERR.018.002.0026 = The supplied server host and port list is invalid.
+
+
+# xml (011)
+ERR.018.011.0001 = No children expected when star is chosen.
+ERR.018.011.0002 = Invalid value for {0} element: "{1}" must be either
"{2}" or "{3}"
+ERR.018.011.0003 = Invalid input format
+ERR.018.011.0004 = Unable to parse the value for {0} element: "{1}"
+ERR.018.011.0005 = The starting row cannot be negetive.
+ERR.018.011.0006 = The starting row cannot be less than the ending row.
+ERR.018.011.0007 = Null object reference
+ERR.018.011.0008 = The starting row cannot be less than 1.
+ERR.018.011.0009 = Unable to translate result documents.
+ERR.018.011.0010 = Schema cannot be null when attempting to translate.
+ERR.018.011.0011 = Schema is not available.
+ERR.018.011.0012 = index attribute of {0} in stored procedure parameter is not a valid
integer.
+ERR.018.011.0013 = index attribute not found in stored procedure attribute.
+ERR.018.011.0014 = Unable to translate the stored procedure parameters due to: {0}
+ERR.018.011.0015 = Parameter name cannot be null.
+ERR.018.011.0016 = Index cannot be null.
+ERR.018.011.0017 = Unable to translate metadata due to: {0}
+ERR.018.011.0018 = element name cannot be null in getNewElement method.
+ERR.018.011.0019 = Unable to create new w3c document due to a parser configuration
exception: {0}
+ERR.018.011.0020 = node name cannot be null in getNewTextNode method.
+ERR.018.011.0021 = Unable to execute Stored Procedure due to: {0}
+ERR.018.011.0022 = Unable to execute query due to: {0}
+ERR.018.011.0023 = Unable to execute update due to: {0}
+ERR.018.011.0024 = Unable to execute XMLQuery due to: {0}
+
+# MMSOAPClientServlet
+MMSOAPClientServlet.There_was_a_problem_creating_the_SOAPAuthentication_object._61=There
was a problem creating the SOAPAuthentication object.
+
+# MMSOAPServlet
+MMSOAPServlet.Unexpected_error_while_processing_JMS_SOAP_request._4=Unexpected error
while processing JMS SOAP request.
+MMSOAPServlet.Unable_to_get_an_Axis_server_engine._5=Unable to get an Axis server
engine.
+MMSOAPServlet.Unable_to_set_the_target_service._The_service_name_is_not_correctly_configured._7=Unable
to set the target service. The service name is not correctly configured.
+MMSOAPServlet.Failed_to_retrieve_the_response_destination_from_the_JMS_message._No_response_will_be_sent._8=Failed
to retrieve the response destination from the JMS message. No response will be sent.
+MMSOAPServlet.Unable_to_send_a_JMS_response_message_to_the_reply_destination._9=Unable to
send a JMS response message to the reply destination.
+MMSOAPServlet.Unable_to_initialize_the_JMS_MessageListener_for_data_service_requests_to___{0}__._The_JMS_transport_will_not_function_properly_for_data_service_requests._11=Unable
to initialize the JMS MessageListener for data service requests to {0}. The JMS transport
will not function properly for data service requests.
+MMSOAPServlet.Unable_to_start_the_JMS_service._The_JMS_transport_will_not_function_properly_for_SOAP_requests._12=Unable
to start the JMS service. The JMS transport will not function properly for SOAP requests.
+MMSOAPServlet.Unable_to_obtain_a_connector_with_connection_factory_{0}._The_JMS_transport_will_not_function._1=Unable
to obtain a connector with connection factory {0}. The JMS transport will not function.
+MMSOAPServlet.Unable_to_initialize_the_JMS_MessageListener_for_SOAP_service_requests_to_{0}._The_JMS_transport_will_not_function_properly_for_SOAP_requests._1=Unable
to initialize the JMS MessageListener for SOAP service requests to {0}. The JMS transport
will not function properly for SOAP requests.
+MMSOAPServlet.MMDriver_init_failed=Teiid SOAP service initialization failed because it
could not find the requisite Teiid JDBC driver. Please ensure that this driver is in your
classpath
+
+# MMSoapQueryService
+MMSoapQueryService.document_name_cannot_be_null_2=document name cannot be null
+MMSoapQueryService.Unable_to_get_metadata_data_types___{0}_4=Unable to get metadata data
types : {0}
+MMSoapQueryService.Exception_when_attempting_to_close_the_ResultSet_2=Exception when
attempting to close the ResultSet
+MMSoapQueryService.Exception_when_attempting_to_close_the_statement._1=Exception when
attempting to close the statement.
+MMSoapQueryService.Exception_when_attempting_to_close_the_connection._2=Exception when
attempting to close the connection.
+
+# BytesMessageInputStream
+BytesMessageInputStream.Unable_to_read_a_byte_from_the_BytesMessage__{0}_1=Unable to read
a byte from the BytesMessage: {0}
+
+# DataServiceWebServiceImpl
+DataServiceWebServiceImpl.0=The incoming Message Context was null. Cannot authenticate
user.
+DataServiceWebServiceImpl.1=The result message from executing the Web Service operation *
{0} * contained more than one xml document in the result returned from the Teiid Server.
This behavior is not supported by a Data Service type web service.
+DataServiceWebServiceImpl.2=The input Data Service Request message had more than one root
element in the body section. This structural anomaly is not supported by the Data Service
web service.
+DataServiceWebServiceImpl.3=Exception closing connection.
+DataServiceWebServiceImpl.4=SOAP Action is not present.
+DataServiceWebServiceImpl.6=Exception in executeDataservice: {0}
+DataServiceWebServiceImpl.7=No response document returned. Please check your inputs.
+DataServiceWebServiceImpl.8=There was no row returned in the ResultSet.
+DataServiceWebServiceImpl.9=A processing error occurred for the following xml document:
{0}
+DataServiceWebServiceImpl.10=There was a problem parsing the xml result document returned
from the server. Here is the error: {0} Please see the log for more details.
+DataServiceWebServiceImpl.11=No security results. Token was not found.
+DataServiceWebServiceImpl.12=Unable to create connection for username: {0} due to {1}.
+DataServiceWebServiceImpl.16=Query Timeout not set or not a valid integer. Using zero for
query timeout (NO TIMOUT).
+
+# MMGetVDBResourceServlet
+MMGetVDBResourceServlet.0=Exception closing connection: {0}
+MMGetVDBResourceServlet.1=IOException in decrypt
+MMGetVDBResourceServlet.2=Exception in decrypt
+MMGetVDBResourceServlet.3=Exception in get decrypt key
+MMGetVDBResourceServlet.4=Exception in Cipher.getInstance()
+MMGetVDBResourceServlet.5=InvalidKeyException in decrypt.init()
+MMGetVDBResourceServlet.6=IllegalStateException in decrypt.doFinal()
+MMGetVDBResourceServlet.7=SQLException retrieving VDB Resource
+MMGetVDBResourceServlet.8=Exception retrieving VDB Resource
+MMGetVDBResourceServlet.9=BadPaddingException in decrypt.doFinal()
+MMGetVDBResourceServlet.10=Class Not Found
+MMGetVDBResourceServlet.11=IllegalBlockSizeException in decrypt.doFinal()
+MMGetVDBResourceServlet.12=No results from procedure
+MMGetVDBResourceServlet.13=FileNotFoundException in decrypt
+MMGetVDBResourceServlet.14=Resource Not Found
+MMGetVDBResourceServlet.15=There was an error encoding the query string.
+MMGetVDBResourceServlet.Application_Name=Teiid WSDL Resource Client
+
+# LicenseInfo
+LicenseInfo.UnverifiedLicenseException=UnverifiedLicenseException: {0}
+LicenseInfo.UnlicensedProductException=UnlicensedProductException: {0}
+LicenseInfo.InvalidLicenseException=InvalidLicenseException: {0}
+LicenseInfo.LicenseVerificationException=LicenseVerificationException: {0}
+LicenseInfo.ErrorMessage= Please contact your System Administrator or Teiid for a valid
license.
+
+
+PoolingConnectionSource.The_connection_pool_factory_given_the_Pooling_Connection_Source=The
connection pool factory given the Pooling Connection Source for the Data Service
implementation was null. Please check configuration properties.
+PoolingConnectionSource.The_DataSource_instance_pulled_from_the=The DataSource instance
pulled from the map of connection pools was null.
+
+WebServiceUtil.0=The SOAP Action and WSAW Action are null or empty. Please format the
action as follows:
VDBName=MyVDB&ServerURL=mm://mmHost:mmPort&VDBVersion=<optional>&AdditionalProperties=<optional>&procedure=fully.qualified.procedureName
+WebServiceUtil.1=The NamePasswordCredentials from the SOAP request message were null.
The incoming SOAP request cannot be authenticated.
+
+# MMDiscoverWSDLServlet
+MMDiscoverWSDLServlet.1=Error retrieving WSDL Urls. Please verify that the Teiid Server
information is correctly defined in the web.xml.
+MMDiscoverWSDLServlet.2=Error retrieving WSDL Urls:
+
+# SqlQueryWebService
+SqlQueryWebService.0=The incoming Message Context was null. Cannot authenticate user.
+Unable_to_close_session_with_id_due_to=Unable to close session with id {0} due to: {1}
+The_time_to_wait_submitted_with_the_executeBlocking_request=The ''time to
wait'' submitted with the executeBlocking request was reached. The request has
timed out. If results are desired, please revise the ''time to wait''
parameter in the request message and try again.
+
+# SqlQueryWebServiceFault
+Unable_to_create_the_Detail_for_the_exception_due_to=Unable to create the
''Detail'' for the exception due to the following: {0}
+
+# LicenseInfo
+LicenseInfo.UnverifiedLicenseException=UnverifiedLicenseException: {0}
+LicenseInfo.UnlicensedProductException=UnlicensedProductException: {0}
+LicenseInfo.InvalidLicenseException=InvalidLicenseException: {0}
+LicenseInfo.LicenseVerificationException=LicenseVerificationException: {0}
+
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorData.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorData.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorFilter.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorFilter.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorPage.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorPage.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTableModel.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTableModel.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTextArea.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$SOAPMonitorTextArea.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$ServiceFilterPanel.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/SOAPMonitorApplet$ServiceFilterPanel.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet.class
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/SOAPMonitorApplet.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/classes/commons-logging.properties
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/classes/commons-logging.properties
(rev 0)
+++
sqlquerywebservice/src/main/webapp/WEB-INF/classes/commons-logging.properties 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,27 @@
+# -------------------------------------------------------------------
+# Copyright 2001-2004 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.
+# -------------------------------------------------------------------
+
+# This is the logging properties that goes to the war, there are two logging conf kept at
the
+# svn, one for developement (one at src/test-resources) and other for producation
+
+# Uncomment the next line to disable all logging.
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.NoOpLog
+
+# Uncomment the next line to enable the simple log based logging
+#org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+
+# Uncomment the next line to enable log4j based logging
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
Added: sqlquerywebservice/src/main/webapp/WEB-INF/classes/log4j.properties
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/classes/log4j.properties
(rev 0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/classes/log4j.properties 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,32 @@
+# A FileAppender will be added programatically, but this properties file needs to be
present
+# to avoid warning messages
+
+# Set root category priority to INFO and its only appender to LOGFILE.
+log4j.rootCategory=INFO, LOGFILE
+
+# Set the enterprise logger category to FATAL and its only appender to CONSOLE.
+log4j.logger.org.apache.axis2.enterprise=FATAL, CONSOLE
+log4j.logger.de.hunsicker.jalopy.io=FATAL, CONSOLE
+
+# Set the enterprise logger priority to FATAL
+log4j.logger.org.apache.axis2.enterprise=FATAL
+log4j.logger.de.hunsicker.jalopy.io=FATAL
+log4j.logger.httpclient.wire.header=FATAL
+log4j.logger.org.apache.commons.httpclient=FATAL
+
+ # CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=%d %-5p %c - %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=../log/JBEDSPWebServices.log
+log4j.appender.LOGFILE.Append=true
+log4j.appender.LOGFILE.Threshold=INFO
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c %x - %m%n
+
+
+
Added: sqlquerywebservice/src/main/webapp/WEB-INF/conf/axis2.xml
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/conf/axis2.xml (rev
0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/conf/axis2.xml 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,420 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+
+<axisconfig name="AxisJava2.0">
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <parameter name="hotdeployment">true</parameter>
+ <parameter name="hotupdate">false</parameter>
+ <parameter name="enableMTOM">false</parameter>
+ <parameter name="enableSwA">false</parameter>
+
+ <!--Uncomment if you want to enable file caching for attachments -->
+ <!--parameter name="cacheAttachments">true</parameter>
+ <parameter name="attachmentDIR"></parameter>
+ <parameter name="sizeThreshold">4000</parameter-->
+
+ <!--This will give out the timout of the configuration contexts, in
milliseconds-->
+ <parameter
name="ConfigContextTimeoutInterval">30000</parameter>
+
+ <!--During a fault, stack trace can be sent with the fault message. The following
flag will control -->
+ <!--that behavior.-->
+ <parameter
name="sendStacktraceDetailsWithFaults">false</parameter>
+
+ <!--If there aren't any information available to find out the fault reason, we
set the message of the exception-->
+ <!--as the faultreason/Reason. But when a fault is thrown from a service or some
where, it will be -->
+ <!--wrapped by different levels. Due to this the initial exception message can be
lost. If this flag-->
+ <!--is set, then Axis2 tries to get the first exception and set its message as the
faultreason/Reason.-->
+ <parameter
name="DrillDownToRootCauseForFaultReason">false</parameter>
+
+ <parameter name="userName">system</parameter>
+ <parameter name="password">stladmin</parameter>
+
+ <!--To override repository/services you need to uncomment following parameter and
value SHOULD be absolute file path.-->
+ <!--ServicesDirectory only works on the following cases-->
+ <!---File based configurator and in that case the value should be a file URL
(http:// not allowed)-->
+ <!---When creating URL Based configurator with URL “file://� -->
+ <!--- War based configurator with expanded case , -->
+
+ <!--All the other scenarios it will be ignored.-->
+ <!--<parameter
name="ServicesDirectory">service</parameter>-->
+ <!--To override repository/modules you need to uncomment following parameter and
value SHOULD be absolute file path-->
+ <!--<parameter
name="ModulesDirectory">modules</parameter>-->
+
+
+
+ <!--Following params will set the proper context paths for invocations. All the
endpoints will have a commons context-->
+ <!--root which can configured using the following contextRoot parameter-->
+ <!--<parameter
name="contextRoot">teiid-soap</parameter>-->
+
+ <!--Our HTTP endpoints can handle both REST and SOAP. Following parameters can be
used to distinguiush those endpoints-->
+ <!--In case of a servlet, if you change this you have to manually change the
settings of your servlet container to map this -->
+ <!--context path to proper Axis2 servlets-->
+ <!--<parameter
name="servicePath">services</parameter>-->
+ <!--<parameter name="restPath">rest</parameter>-->
+
+ <!-- Following parameter will completely disable REST handling in Axis2-->
+ <parameter name="disableREST"
locked="true">false</parameter>
+
+ <!--POJO deployer , this will alow users to drop .class file and make that into a
service-->
+ <deployer extension=".class" directory="pojo"
class="org.apache.axis2.deployment.POJODeployer"/>
+
+ <!-- Following parameter will set the host name for the epr-->
+ <!--<parameter name="hostname"
locked="true">myhost.com</parameter>-->
+
+ <!-- If you have a front end host which exposes this webservice using a different
public URL -->
+ <!-- use this parameter to override autodetected url -->
+ <!--<parameter
name="httpFrontendHostUrl">https://someotherhost/context</parameter>-->
+
+
+ <!-- The way of adding listener to the system-->
+ <!-- <listener class="org.apache.axis2.ObserverIMPL">-->
+ <!-- <parameter
name="RSS_URL">http://127.0.0.1/rss</parameter>-->
+ <!-- </listener>-->
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!--This is the default MessageReceiver for the system , if you want to have
MessageReceivers for -->
+ <!--all the other MEP implement it and add the correct entry to here , so that you
can refer from-->
+ <!--any operation -->
+ <!--Note : You can override this for a particular service by adding the same
element with your requirement-->
+ <messageReceivers>
+ <messageReceiver
mep="http://www.w3.org/2004/08/wsdl/in-only"
+
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver
mep="http://www.w3.org/2004/08/wsdl/in-out"
+
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ <messageReceiver
mep="http://www.w3.org/2006/01/wsdl/in-only"
+
class="org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver"/>
+ <messageReceiver
mep="http://www.w3.org/2006/01/wsdl/in-out"
+
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+ </messageReceivers>
+
+ <!-- ================================================= -->
+ <!-- Message Formatter -->
+ <!-- ================================================= -->
+ <!--Following content type to message formatter mapping can be used to implement
support for different message -->
+ <!--format serialization in Axis2. These message formats are expected to be
resolved based on the content type. -->
+ <messageFormatters>
+ <messageFormatter contentType="application/x-www-form-urlencoded"
+
class="org.apache.axis2.transport.http.XFormURLEncodedFormatter"/>
+ <messageFormatter contentType="multipart/form-data"
+
class="org.apache.axis2.transport.http.MultipartFormDataFormatter"/>
+ <messageFormatter contentType="application/xml"
+
class="org.apache.axis2.transport.http.ApplicationXMLFormatter"/>
+ </messageFormatters>
+
+ <!-- ================================================= -->
+ <!-- Message Builders -->
+ <!-- ================================================= -->
+ <!--Following content type to builder mapping can be used to implement support for
different message -->
+ <!--formats in Axis2. These message formats are expected to be resolved based on
the content type. -->
+ <messageBuilders>
+ <messageBuilder contentType="application/xml"
+
class="org.apache.axis2.builder.ApplicationXMLBuilder"/>
+ <messageBuilder contentType="application/x-www-form-urlencoded"
+
class="org.apache.axis2.builder.XFormURLEncodedBuilder"/>
+ <messageBuilder contentType="multipart/form-data"
+
class="org.apache.axis2.builder.MultipartFormDataBuilder"/>
+ </messageBuilders>
+
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http"
+
class="org.apache.axis2.transport.http.SimpleHTTPServer">
+ <parameter name="port">8080</parameter>
+ <!-- Here is the complete list of supported parameters (see example settings
further below):
+ port: the port to listen on (default 6060)
+ hostname: if non-null, url prefix used in reply-to endpoint references
(default null)
+ originServer: value of http Server header in outgoing messages
(default "Simple-Server/1.1")
+ requestTimeout: value in millis of time that requests can wait for data
(default 20000)
+ requestTcpNoDelay: true to maximize performance and minimize latency
(default true)
+ false to minimize bandwidth consumption by combining
segments
+ requestCoreThreadPoolSize: number of threads available for request
processing (unless queue fills up) (default 25)
+ requestMaxThreadPoolSize: number of threads available for request processing
if queue fills up (default 150)
+ note that default queue never fills up: see
HttpFactory
+ threadKeepAliveTime: time to keep threads in excess of core size alive while
inactive (default 180)
+ note that no such threads can exist with default
unbounded request queue
+ threadKeepAliveTimeUnit: TimeUnit of value in threadKeepAliveTime (default
SECONDS) (default SECONDS)
+ -->
+ <!-- <parameter
name="hostname">http://www.myApp.com/ws</parameter> -->
+ <!-- <parameter
name="originServer">My-Server/1.1</parameter> -->
+ <!-- <parameter name="requestTimeout">10000</parameter>
-->
+ <!-- <parameter
name="requestTcpNoDelay">false</parameter> -->
+ <!-- <parameter
name="requestCoreThreadPoolSize">50</parameter>
-->
+ <!-- <parameter
name="RequestMaxThreadPoolSize">100</parameter>
-->
+ <!-- <parameter
name="threadKeepAliveTime">240000</parameter> -->
+ <!-- <parameter
name="threadKeepAliveTimeUnit">MILLISECONDS</parameter>
-->
+ </transportReceiver>
+
+ <!--Uncomment this and configure as appropriate for JMS transport support, after
setting up your JMS environment (e.g. ActiveMQ)
+ <transportReceiver name="jms"
class="org.apache.axis2.transport.jms.JMSListener">
+ <parameter name="myTopicConnectionFactory">
+ <parameter
name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter
name="java.naming.provider.url">tcp://localhost:61616</parameter>
+ <parameter
name="transport.jms.ConnectionFactoryJNDIName">TopicConnectionFactory</parameter>
+ </parameter>
+
+ <parameter name="myQueueConnectionFactory">
+ <parameter
name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter
name="java.naming.provider.url">tcp://localhost:61616</parameter>
+ <parameter
name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+ </parameter>
+
+ <parameter name="default">
+ <parameter
name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
+ <parameter
name="java.naming.provider.url">tcp://localhost:61616</parameter>
+ <parameter
name="transport.jms.ConnectionFactoryJNDIName">QueueConnectionFactory</parameter>
+ </parameter>
+ </transportReceiver>-->
+
+ <!-- ================================================= -->
+ <!-- Non-blocking http/s Transport Listener -->
+
+ <!-- the non blocking http transport based on HttpCore + NIO extensions
+ <transportReceiver name="http"
class="org.apache.axis2.transport.nhttp.HttpCoreNIOListener">
+ <parameter name="port"
locked="false">9000</parameter>
+ <parameter name="non-blocking"
locked="false">true</parameter>
+ </transportReceiver>-->
+
+ <!-- the non blocking https transport based on HttpCore + SSL-NIO extensions
+ <transportReceiver name="https"
class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLListener">
+ <parameter name="port"
locked="false">9002</parameter>
+ <parameter name="non-blocking"
locked="false">true</parameter>
+ <parameter name="keystore" locked="false">
+ <KeyStore>
+ <Location>identity.jks</Location>
+ <Type>JKS</Type>
+ <Password>password</Password>
+ <KeyPassword>password</KeyPassword>
+ </KeyStore>
+ </parameter>
+ <parameter name="truststore" locked="false">
+ <TrustStore>
+ <Location>trust.jks</Location>
+ <Type>JKS</Type>
+ <Password>password</Password>
+ </TrustStore>
+ </parameter>-->
+ <!--<parameter
name="SSLVerifyClient">require</parameter>
+ supports optional|require or defaults to none -->
+ <!--</transportReceiver>-->
+
+ <!-- ================================================= -->
+ <!-- Mail Transport Listener -->
+ <!-- This is a sample configuration. It assumes a mail server running in
localhost.
+ Listener pops messages that comes to the email address red@localhost. Users
+ password is red. Listener connect to the server every 3000 milliseconds.
+ Parameters with "transport." prefix is Axis2 specific. Others are all
from Java Mail API.
+
http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+ -->
+ <!-- ================================================= -->
+ <!--<transportReceiver name="mailto"
class="org.apache.axis2.transport.mail.SimpleMailListener">
+ <parameter name="mail.pop3.host">localhost</parameter>
+ <parameter name="mail.pop3.user">red</parameter>
+ <parameter name="mail.store.protocol">pop3</parameter>
+ <parameter
name="transport.mail.pop3.password">red</parameter>
+ <parameter
name="transport.mail.replyToAddress">red@localhost</parameter>
+ <parameter
name="transport.listener.interval">3000</parameter>
+ </transportReceiver>-->
+
+ <!--Uncomment if you want to have TCP transport support-->
+ <!--transportReceiver name="tcp"
+ class="org.apache.axis2.transport.tcp.TCPServer">
+ <parameter name="port">6060</parameter-->>
+ <!--If you want to give your own host address for EPR generation-->
+ <!--uncomment the following paramter , and set it as you required.-->
+ <!--<parameter
name="hostname">tcp://myApp.com/ws</parameter>-->
+ <!-- /transportReceiver -->
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="tcp"
+
class="org.apache.axis2.transport.tcp.TCPTransportSender"/>
+ <transportSender name="local"
+
class="org.apache.axis2.transport.local.LocalTransportSender"/>
+ <transportSender name="http"
+
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding">chunked</parameter>
+
+ <!-- If following is set to 'true', optional action part of the
Content-Type will not be added to the SOAP 1.2 messages -->
+ <!-- <parameter
name="OmitSOAP12Action">true</parameter> -->
+ </transportSender>
+
+ <transportSender name="https"
+
class="org.apache.axis2.transport.http.CommonsHTTPTransportSender">
+ <parameter name="PROTOCOL">HTTP/1.1</parameter>
+ <parameter name="Transfer-Encoding">chunked</parameter>
+ </transportSender>
+ <!--<transportSender name="jms"-->
+
<!--class="org.apache.axis2.transport.jms.JMSSender"/>-->
+
+ <!-- ================================================= -->
+ <!-- Non-blocking http/s Transport Sender -->
+
+ <!-- the non-blocking http transport sender based on HttpCore + NIO extensions
+ <transportSender name="http"
class="org.apache.axis2.transport.nhttp.HttpCoreNIOSender">
+ <parameter name="non-blocking"
locked="false">true</parameter>
+ </transportSender>-->
+
+ <!-- the non-blocking https transport sender based on HttpCore + NIO SSL
extensions
+ <transportSender name="https"
class="org.apache.axis2.transport.nhttp.HttpCoreNIOSSLSender">
+ <parameter name="non-blocking"
locked="false">true</parameter>
+ <parameter name="keystore" locked="false">
+ <KeyStore>
+ <Location>identity.jks</Location>
+ <Type>JKS</Type>
+ <Password>password</Password>
+ <KeyPassword>password</KeyPassword>
+ </KeyStore>
+ </parameter>
+ <parameter name="truststore" locked="false">
+ <TrustStore>
+ <Location>trust.jks</Location>
+ <Type>JKS</Type>
+ <Password>password</Password>
+ </TrustStore>
+ </parameter>-->
+ <!--<parameter
name="HostnameVerifier">DefaultAndLocalhost</parameter>
+ supports Strict|AllowAll|DefaultAndLocalhost or the default if none specified
-->
+ <!--</transportSender>-->
+
+ <!-- ================================================= -->
+ <!-- Mail Transport Sender -->
+ <!--Only need to uncomment the sender. Configuration is achieved with every
client.
+ At any instant mail host should be given. Sample configuration has been given.
+
http://people.apache.org/~pzf/SMTPBase64Binding-0.2.html
+ -->
+ <!-- ================================================= -->
+ <!--<transportSender name="mailto"
class="org.apache.axis2.transport.mail.MailTransportSender">
+ <parameter name="mail.smtp.host">localhost</parameter>
+ </transportSender>-->
+
+ <!-- ================================================= -->
+ <!-- Global Modules -->
+ <!-- ================================================= -->
+ <!-- Comment this to disable Addressing -->
+ <module ref="addressing"/>
+
+ <!--Configuring module , providing parameters for modules whether they refer or
not-->
+ <!--<moduleConfig name="addressing">-->
+ <!--<parameter name="addressingPara">N/A</parameter>-->
+ <!--</moduleConfig>-->
+
+ <!-- Comment this to disable WS-Security -->
+ <module ref="rampart"/>
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="InFlow">
+ <!-- System predefined phases -->
+ <phase name="Transport">
+ <handler name="ActionUpdateHandler"
+
class="com.metamatrix.soap.handler.ActionUpdateHandler">
+ <order phase="Transport"/>
+ </handler>
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher">
+ <order phase="Transport"/>
+ </handler>
+ </phase>
+ <phase name="Addressing">
+ <handler name="AddressingBasedDispatcher"
+
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Addressing"/>
+ </handler>
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch"
class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+ <handler name="RequestURIOperationDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+ <handler name="SOAPMessageBodyBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+ <handler name="HTTPLocationBasedDispatcher"
+
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- System predefined phases -->
+ <!-- After Postdispatch phase module author or service author can add any
phase he want -->
+ <phase name="OperationInPhase"/>
+ <phase name="soapmonitorPhase"/>
+ </phaseOrder>
+ <phaseOrder type="OutFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="soapmonitorPhase"/>
+ <phase name="OperationOutPhase"/>
+ <!--system predefined phase-->
+ <!--these phase will run irrespective of the service-->
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+ <phaseOrder type="InFaultFlow">
+ <phase name="Addressing">
+ <handler name="AddressingBasedDispatcher"
+
class="org.apache.axis2.dispatchers.AddressingBasedDispatcher">
+ <order phase="Addressing"/>
+ </handler>
+ </phase>
+ <phase name="Security"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch"
class="org.apache.axis2.engine.DispatchPhase">
+ <handler name="RequestURIBasedDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIBasedDispatcher"/>
+ <handler name="SOAPActionBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPActionBasedDispatcher"/>
+ <handler name="RequestURIOperationDispatcher"
+
class="org.apache.axis2.dispatchers.RequestURIOperationDispatcher"/>
+ <handler name="SOAPMessageBodyBasedDispatcher"
+
class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher"/>
+
+ <handler name="HTTPLocationBasedDispatcher"
+
class="org.apache.axis2.dispatchers.HTTPLocationBasedDispatcher"/>
+ </phase>
+ <phase name="RMPhase"/>
+ <!-- user can add his own phases to this area -->
+ <phase name="OperationInFaultPhase"/>
+ <phase name="soapmonitorPhase"/>
+ </phaseOrder>
+ <phaseOrder type="OutFaultFlow">
+ <!-- user can add his own phases to this area -->
+ <phase name="soapmonitorPhase"/>
+ <phase name="OperationOutFaultPhase"/>
+ <phase name="RMPhase"/>
+ <phase name="PolicyDetermination"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
Added: sqlquerywebservice/src/main/webapp/WEB-INF/lib/soapmonitor-1.3.jar
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/WEB-INF/lib/soapmonitor-1.3.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/modules/addressing-1.3.mar
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/modules/addressing-1.3.mar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/modules/modules.list
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/modules/modules.list
(rev 0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/modules/modules.list 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,3 @@
+
+ rampart-1.3.mar
+ addressing-1.3.mar
Added: sqlquerywebservice/src/main/webapp/WEB-INF/modules/rahas-1.3.mar
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/WEB-INF/modules/rahas-1.3.mar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/modules/rampart-1.3.mar
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/WEB-INF/modules/rampart-1.3.mar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/modules/soapmonitor-1.3.mar
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/modules/soapmonitor-1.3.mar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorConstants.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorConstants.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ConnectionThread.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ConnectionThread.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ServerSocketThread.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService$ServerSocketThread.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService.class
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/org/apache/axis2/soapmonitor/servlet/SOAPMonitorService.class
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/services/SqlQueryWebService.aar
===================================================================
(Binary files differ)
Property changes on:
sqlquerywebservice/src/main/webapp/WEB-INF/services/SqlQueryWebService.aar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/services/service.aar
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/WEB-INF/services/service.aar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/services/services.list
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/services/services.list
(rev 0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/services/services.list 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,4 @@
+ service.aar
+ SqlQueryWebService.aar
+ version.aar
+
\ No newline at end of file
Added: sqlquerywebservice/src/main/webapp/WEB-INF/services/version.aar
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/WEB-INF/services/version.aar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/web.xml 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,197 @@
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application
2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
+<!--
+
+ JBoss, Home of Professional Open Source.
+ Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ as indicated by the @author tags. See the copyright.txt file in the
+ distribution for a full listing of individual contributors.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ 02110-1301 USA.
+
+-->
+<web-app>
+
+ <!-- The optional BasicAuthInterceptor filter is for use with HTTP Basic
authentication. It allows circumvention
+ of preemptive authentication which may not always be desired. Comment/uncomment the
filter
+ and it's mapping accordingly to achieve the preferred behavior. -->
+ <!--<filter>
+ <filter-name>BasicAuthInterceptor</filter-name>
+ <filter-class>
+ com.metamatrix.soap.servlet.filter.BasicAuthInterceptor
+ </filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>BasicAuthInterceptor</filter-name>
+ <url-pattern>/services/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>BasicAuthInterceptor</filter-name>
+ <url-pattern>/DataService/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>BasicAuthInterceptor</filter-name>
+ <url-pattern>/DataServices/*</url-pattern>
+ </filter-mapping> -->
+
+ <!-- This parameter is used for making the Data Services endpoint value backwards
+ compatible. This value changed in the 5.5 release. Uncomment to change the generated
endpoint
+ in the WSDL for a MetaMatrix Data Service Virtual Database for pre-5.5. Leave commented
to use
+ the post 5.5 endpoint value.-->
+ <!-- <context-param>
+ <param-name>endpointOverride</param-name>
+ <param-value>/DataServices</param-value>
+ </context-param> -->
+
+ <!--
+ * mmServer and mmProtocol parameters are used to obtain the WSDL from Web Service
VDBs.
+ * They should be set accordingly for your environment.
+ *
+ * mmServer is the target Metamatrix host and port. For a clustered environment, comma
delimit server/port combinations
+ * mmProtocol should be set to "mms" if the target MetaMatrix server or
cluster has SSL enabled.
+ -->
+ <context-param>
+ <param-name>mmServer</param-name>
+ <param-value>localhost:31000</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>mmProtocol</param-name>
+ <param-value>mm</param-value>
+ </context-param>
+
+ <servlet>
+ <servlet-name>AxisServlet</servlet-name>
+ <display-name>Apache-Axis Servlet</display-name>
+ <servlet-class>
+ org.apache.axis2.transport.http.AxisServlet
+ </servlet-class>
+ <load-on-startup>101</load-on-startup>
+ </servlet>
+
+ <servlet>
+ <servlet-name>AxisAdminServlet</servlet-name>
+ <display-name>Apache-Axis AxisAdmin Servlet (Web
Admin)</display-name>
+ <servlet-class>
+ org.apache.axis2.transport.http.AxisAdminServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>AxisAdminServlet</servlet-name>
+ <url-pattern>/axis2-admin/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet>
+ <servlet-name>MMGetVDBResource</servlet-name>
+ <display-name>MetaMatrix VDB Resource Servlet</display-name>
+
<servlet-class>com.metamatrix.soap.servlet.MMGetVDBResourceServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>MMDiscoverWSDLServlet</servlet-name>
+ <display-name>MetaMatrix Discover WSDL URLs Servlet</display-name>
+
<servlet-class>com.metamatrix.soap.servlet.MMDiscoverWSDLServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>MMWSDLURLGenerator</servlet-name>
+ <display-name>MetaMatrix WSDL URL Generator Servlet</display-name>
+
<servlet-class>com.metamatrix.soap.servlet.WSDLURLGenerator</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>MMGetWSDLServlet</servlet-name>
+ <display-name>MetaMatrix Get WSDL Servlet</display-name>
+ <servlet-class>com.metamatrix.soap.servlet.MMGetWSDLServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>MMGetVDBResource</servlet-name>
+ <url-pattern>/servlet/ArtifactDocumentService/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>MMWSDLURLGenerator</servlet-name>
+ <url-pattern>/servlet/WSDLURLGenerator</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>MMGetWSDLServlet</servlet-name>
+ <url-pattern>/wsdl/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/SqlQueryWebService</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/SqlQueryWebService/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/servlet/AxisServlet</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>*.jws</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/DataService</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/DataService/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>MMDiscoverWSDLServlet</servlet-name>
+ <url-pattern>/servlet/DiscoverWSDLServlet</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>30</session-timeout>
+ </session-config>
+
+ <!-- currently the W3C havent settled on a media type for WSDL;
+
http://www.w3.org/TR/2003/WD-wsdl12-20030303/#ietf-draft
+ for now we go with the basic 'it's XML' response -->
+
+ <mime-mapping>
+ <extension>wsdl</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <mime-mapping>
+ <extension>xsd</extension>
+ <mime-type>text/xml</mime-type>
+ </mime-mapping>
+
+ <welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+</web-app>
\ No newline at end of file
Added: sqlquerywebservice/src/main/webapp/WEB-INF/weblogic.xml
===================================================================
--- sqlquerywebservice/src/main/webapp/WEB-INF/weblogic.xml (rev
0)
+++ sqlquerywebservice/src/main/webapp/WEB-INF/weblogic.xml 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,25 @@
+<!DOCTYPE weblogic-web-app PUBLIC "-//BEA
+Systems, Inc.//DTD Web Application 7.0//EN"
+"http://www.bea.com/servers/wls700/dtd/weblogic700-web-jar.dtd">
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<weblogic-web-app>
+ <container-descriptor>
+ <prefer-web-inf-classes>true</prefer-web-inf-classes>
+ </container-descriptor>
+</weblogic-web-app>
\ No newline at end of file
Added: sqlquerywebservice/src/main/webapp/axis2-web/ActivateService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ActivateService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ActivateService.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,81 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisService,
+ java.util.Collection,
+ java.util.HashMap,
+ java.util.Iterator"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Turn On Service</h1>
+<form method="get" name="serviceActivate"
action="axis2-admin/activateService">
+ <table width="100%" border="0">
+<tr>
+ <td colspan="2" >
+ <p>The services that are inactive are listed below. Although you can activate
the services from this page, once system is restarted the services will be inactive
again</p>
+ </td>
+ </tr>
+ <tr>
+ <%
+HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+Collection col = services.values();
+String html = "";
+int count = 0;
+
+for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ AxisService axisServices = (AxisService) iterator.next();
+ if(!axisServices.isActive()){
+ count++;
+ html += "<option value='" + axisServices.getName() +
"'>";
+ html += axisServices.getName() + "</option>";
+ }
+}
+request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+if (count > 0) {
+%>
+
+ <td width="20%"> Select Service : </td>
+ <td width="80%">
+ <select name="axisService" class="selectBoxes">
+ <%=html%>
+ </select>
+ </tr>
+ <tr>
+ <td width="20%">Activate Service </td>
+ <td width="80%"><input type="checkbox"
name="turnon">
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input name="submit" type="submit" value=" Activate
" >
+ <input name="reset" type="reset" value=" Clear "
>
+ </td>
+<%
+} else {
+ %>
+ <td colspan="2">No inactive services present.</td>
+ <%
+}
+%>
+ </tr>
+
+</table>
+</form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/EngageToServiceGroup.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/EngageToServiceGroup.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/EngageToServiceGroup.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,136 @@
+<%@ page contentType="text/html; charset=iso-8859-1"
language="java" import="org.apache.axis2.Constants,
+
org.apache.axis2.description.AxisModule,
+
org.apache.axis2.description.AxisServiceGroup,
+
java.util.Collection" %>
+<%@ page import="java.util.HashMap"%>
+<%@ page import="java.util.Iterator"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<%
+ String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
+ HashMap moduels = (HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP,null);
+ Collection moduleCol = moduels.values();
+ Iterator servicesGroups =
(Iterator)request.getSession().getAttribute(Constants.SERVICE_GROUP_MAP);
+ request.getSession().setAttribute(Constants.SERVICE_GROUP_MAP,null);
+%>
+<h1>Engage Module for a Service Group</h1>
+<p>To engage a module for a set of services grouped as an axis service
group,</p>
+
+ <ol>
+ <li>select the module you want to engage </li>
+ <li>select the axis service group you like the module to be
engaged.</li>
+ <li>click "Engage".</li>
+ </ol>
+
+
+<%
+ if (!moduleCol.iterator().hasNext()) {%>
+ <p>No modules are present to be engaged.</p>
+ <%} else {
+ if (!servicesGroups.hasNext()) {%>
+ <p>No Axis service groups are present to be engaged.</p>
+ <%} else {
+%>
+<form method="get" name="selectModuleForm"
action="axis2-admin/engageToServiceGroup">
+ <table border="0" width="100%" cellspacing="1"
cellpadding="1">
+ <tr>
+ <td>Select a Module :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="modules">
+ <%
+ for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ String modulename = axisOperation.getName();
+ %> <option align="left"
value="<%=modulename%>"><%=modulename%></option>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>Select a Service Group :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="axisService">
+ <%
+
+ while(servicesGroups.hasNext()){
+ AxisServiceGroup axisServiceGroup = (AxisServiceGroup)
servicesGroups.next();
+ String serviceName = axisServiceGroup.getServiceGroupName();
+ %> <option align="left"
value="<%=serviceName%>"><%=serviceName%></option>
+ <%
+ }
+
+ %>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="submit" type="submit" value="
Engage " >
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <textarea cols="50" <%
+ if(status == null){
+ %>
+ style="display:none"
+ <%
+ } %>
+ ><%=status%></textarea>
+ </td>
+ </tr>
+ </table>
+</form>
+<%
+ }
+ }
+%>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
+
Added: sqlquerywebservice/src/main/webapp/axis2-web/Error/AuthError.html
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/Error/AuthError.html
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/Error/AuthError.html 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,43 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<html>
+ <header><title>Error In Admin Application</title></header>
+ <body>
+ <table width="100%">
+ <tr>
+ <td align="left"><img
src="../images/asf-logo.gif"/></td>
+ <td align="right"><img
src="../images/axis_l.jpg"/></td>
+ </tr>
+</table>
+<table width="100%">
+ <tr>
+ <td align="center">Failure in Authentication! Please check your
username and password</td>
+
+ </tr>
+ <tr> <td align="center"><a
href="/axis2/Login.jsp">back</a></td></tr>
+</table>
+
+<hr/>
+<table width="100%">
+ <tr>
+ <td align="center">All rights reserved by Apache Software
Foundation</td>
+ </tr>
+</table>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/Error/GenError.html
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/Error/GenError.html
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/Error/GenError.html 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,43 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<html>
+ <header><title>Error In Admin Application</title></header>
+ <body>
+ <table width="100%">
+ <tr>
+ <td align="left"><img
src="../images/asf-logo.gif"/></td>
+ <td align="right"><img
src="../images/axis_l.jpg"/></td>
+ </tr>
+</table>
+<table width="100%">
+ <tr>
+ <td align="center">Server Encountered an Error!</td>
+
+ </tr>
+ <tr> <td align="center"><a
href="/">home</a></td></tr>
+</table>
+
+<hr/>
+<table width="100%">
+ <tr>
+ <td align="center">All rights reserved by Apache Software
Foundation</td>
+ </tr>
+</table>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/Error/error404.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/Error/error404.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/Error/error404.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,62 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=iso-8859-1"
language="java" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <jsp:include page="../include/httpbase.jsp"/>
+ <title>Axis2 :: Resource not found!</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css"/>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
+ </head>
+
+ <body>
+ <table width="100%">
+ <tr>
+ <td align="left"><img
src="axis2-web/images/asf-logo.gif" alt=""/></td>
+ <td align="right"><img
src="axis2-web/images/axis_l.jpg" alt=""/></td>
+ </tr>
+ </table>
+ <table width="100%">
+ <tr>
+ <td>
+ <h1>Requested resource not found!</h1>
+ <br/>
+ <br/>
+ <br/>
+ <br/>
+ </td>
+ </tr>
+ <tr><td align="center"><a
href="axis2-web/index.jsp">home</a></td></tr>
+ </table>
+ <table width="100%">
+ <tr><td>
+ <table width="950px">
+ <tr><td><hr size="1"
noshade=""/></td></tr>
+ <tr>
+ <td align="center">Copyright © 1999-2006, The Apache
Software Foundation<br/>Licensed under the <a
+
href="http://www.apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</a>.</td>
+ </tr>
+ </table>
+ </td>
+ <td> </td>
+ </tr>
+ </table>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/Error/error500.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/Error/error500.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/Error/error500.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,63 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=iso-8859-1"
language="java" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html>
+ <head>
+ <jsp:include page="../include/httpbase.jsp"/>
+ <title>Axis2 :: Internal server error</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css"/>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
+ </head>
+
+ <body>
+ <table width="100%">
+ <tr>
+ <td align="left"><img
src="axis2-web/images/asf-logo.gif" alt=""/></td>
+ <td align="right"><img
src="axis2-web/images/axis_l.jpg" alt=""/></td>
+ </tr>
+ </table>
+ <table width="100%">
+ <tr>
+ <td>
+ <h1>Internal server error</h1>
+ <br/>
+ <br/>
+ <br/>
+ <br/>
+ </td>
+ </tr>
+ <tr><td align="center"><a
href="axis2-web/index.jsp">home</a></td></tr>
+ </table>
+ <hr/>
+ <table width="100%">
+ <tr><td>
+ <table width="950px">
+ <tr><td><hr size="1"
noshade=""/></td></tr>
+ <tr>
+ <td align="center">Copyright © 1999-2006, The Apache
Software Foundation<br/>Licensed under the <a
+
href="http://www.apache.org/licenses/LICENSE-2.0">Apache
License, Version 2.0</a>.</td>
+ </tr>
+ </table>
+ </td>
+ <td> </td>
+ </tr>
+ </table>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/HappyAxis.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/HappyAxis.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/HappyAxis.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,519 @@
+<html>
+<%@ page import="org.apache.axiom.om.OMAbstractFactory,
+ org.apache.axiom.om.OMElement,
+ org.apache.axiom.om.OMFactory,
+ org.apache.axiom.om.OMNamespace,
+ org.apache.axis2.AxisFault,
+ org.apache.axis2.Constants,
+ org.apache.axis2.addressing.EndpointReference,
+ org.apache.axis2.client.Options,
+ org.apache.axis2.client.ServiceClient,
+ org.apache.axis2.context.ConfigurationContext,
+ org.apache.axis2.context.ConfigurationContextFactory,
+ javax.servlet.ServletContext,
+ javax.servlet.http.HttpServletRequest,
+ javax.servlet.http.HttpServletResponse,
+ javax.servlet.jsp.JspWriter,
+ javax.xml.parsers.SAXParser,
+ javax.xml.parsers.SAXParserFactory"
+ session="false" %>
+<%@ page import="javax.xml.stream.XMLOutputFactory" %>
+<%@ page import="javax.xml.stream.XMLStreamException" %>
+<%@ page import="java.io.IOException" %>
+<%@ page import="java.io.InputStream" %>
+<%@ page import="java.io.StringWriter" %>
+<%@ page import="java.lang.Class" %>
+<%@ page import="java.lang.ClassNotFoundException"%>
+<%@ page import="java.lang.Exception" %>
+<%@ page import="java.lang.Integer" %>
+<%@ page import="java.lang.NoClassDefFoundError" %>
+<%@ page import="java.lang.SecurityException" %>
+<%@ page import="java.lang.String" %>
+<%@ page import="java.lang.System" %>
+<%@ page import="java.lang.Throwable" %>
+
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<head>
+ <jsp:include page="include/httpbase.jsp"/>
+ <title>Axis2 Happiness Page</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css">
+</head>
+
+<body>
+<jsp:include page="include/header.inc"/>
+<jsp:include page="include/link-footer.jsp"/>
+<%IP = request.getRequestURL().toString();%>
+<%!
+ /*
+ * Happiness tests for axis2. These look at the classpath and warn if things
+ * are missing. Normally addng this much code in a JSP page is mad
+ * but here we want to validate JSP compilation too, and have a drop-in
+ * page for easy re-use
+ */
+ String IP;
+
+ /**
+ * Get a string providing install information.
+ * TODO: make this platform aware and give specific hints
+ */
+ public String getInstallHints(HttpServletRequest request) {
+
+ return "<B><I>Note:</I></B> On Tomcat 4.x and
Java1.4, you may need to put libraries that contain "
+ + "java.* or javax.* packages into CATALINA_HOME/common/lib"
+ + "<br>jaxrpc.jar and saaj.jar are two such libraries.";
+ }
+
+ /**
+ * test for a class existing
+ * @param classname
+ * @return class iff present
+ */
+ Class classExists(String classname) {
+ try {
+ return Class.forName(classname);
+ } catch (ClassNotFoundException e) {
+ return null;
+ }
+ }
+
+ /**
+ * test for resource on the classpath
+ * @param resource
+ * @return true iff present
+ */
+ boolean resourceExists(String resource) {
+ boolean found;
+ InputStream instream = this.getClass().getResourceAsStream(resource);
+ found = instream != null;
+ if (instream != null) {
+ try {
+ instream.close();
+ } catch (IOException e) {
+ }
+ }
+ return found;
+ }
+
+ /**
+ * probe for a class, print an error message is missing
+ * @param out stream to print stuff
+ * @param category text like "warning" or "error"
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @return the number of missing classes
+ * @throws IOException
+ */
+ int probeClass(JspWriter out,
+ String category,
+ String classname,
+ String jarFile,
+ String axisOperation,
+ String errorText,
+ String homePage) throws IOException {
+ try {
+ Class clazz = classExists(classname);
+ if (clazz == null) {
+ String url = "";
+ if (homePage != null) {
+ url = "<br> See <a href=" + homePage +
">" + homePage + "</a>";
+ }
+ out.write("<p>" + category + ": could not find class
" + classname
+ + " from file <b>" + jarFile
+ + "</b><br> " + errorText
+ + url
+ + "<p>");
+ return 1;
+ } else {
+ String location = getLocation(out, clazz);
+ if (location == null) {
+ out.write("Found " + axisOperation + " (" +
classname + ")<br/>");
+ } else {
+ out.write("Found " + axisOperation + " (" +
classname + ") <br/> at " + location +
"<br/>");
+ }
+ return 0;
+ }
+ } catch (NoClassDefFoundError ncdfe) {
+ String url = "";
+ if (homePage != null) {
+ url = "<br> See <a href=" + homePage +
">" + homePage + "</a>";
+ }
+ out.write("<p>" + category + ": could not find a
dependency"
+ + " of class " + classname
+ + " from file <b>" + jarFile
+ + "</b><br> " + errorText
+ + url
+ + "<br>The root cause was: " + ncdfe.getMessage()
+ + "<br>This can happen e.g. if " + classname + "
is in"
+ + " the 'common' classpath, but a dependency like
"
+ + " activation.jar is only in the webapp classpath."
+ + "<p>");
+ return 1;
+ }
+ }
+
+ /**
+ * get the location of a class
+ * @param out
+ * @param clazz
+ * @return the jar file or path where a class was found
+ */
+
+ String getLocation(JspWriter out,
+ Class clazz) {
+ try {
+ java.net.URL url =
clazz.getProtectionDomain().getCodeSource().getLocation();
+ String location = url.toString();
+ if (location.startsWith("jar")) {
+ url = ((java.net.JarURLConnection)
url.openConnection()).getJarFileURL();
+ location = url.toString();
+ }
+
+ if (location.startsWith("file")) {
+ java.io.File file = new java.io.File(url.getFile());
+ return file.getAbsolutePath();
+ } else {
+ return url.toString();
+ }
+ } catch (Throwable t) {
+ }
+ return "an unknown location";
+ }
+
+ /**
+ * a class we need if a class is missing
+ * @param out stream to print stuff
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @throws IOException when needed
+ * @return the number of missing libraries (0 or 1)
+ */
+ int needClass(JspWriter out,
+ String classname,
+ String jarFile,
+ String axisOperation,
+ String errorText,
+ String homePage) throws IOException {
+ return probeClass(out,
+ "<b>Error</b>",
+ classname,
+ jarFile,
+ axisOperation,
+ errorText,
+ homePage);
+ }
+
+ /**
+ * print warning message if a class is missing
+ * @param out stream to print stuff
+ * @param classname class to look for
+ * @param jarFile where this class comes from
+ * @param errorText extra error text
+ * @param homePage where to d/l the library
+ * @throws IOException when needed
+ * @return the number of missing libraries (0 or 1)
+ */
+ int wantClass(JspWriter out,
+ String classname,
+ String jarFile,
+ String axisOperation,
+ String errorText,
+ String homePage) throws IOException {
+ return probeClass(out,
+ "<b>Warning</b>",
+ classname,
+ jarFile,
+ axisOperation,
+ errorText,
+ homePage);
+ }
+
+ /**
+ * probe for a resource existing,
+ * @param out
+ * @param resource
+ * @param errorText
+ * @throws Exception
+ */
+ int wantResource(JspWriter out,
+ String resource,
+ String errorText) throws Exception {
+ if (!resourceExists(resource)) {
+ out.write("<p><b>Warning</b>: could not find resource
" + resource
+ + "<br>"
+ + errorText);
+ return 0;
+ } else {
+ out.write("found " + resource + "<br>");
+ return 1;
+ }
+ }
+
+
+ /**
+ * get servlet version string
+ *
+ */
+
+ public String getServletVersion() {
+ ServletContext context = getServletConfig().getServletContext();
+ int major = context.getMajorVersion();
+ int minor = context.getMinorVersion();
+ return Integer.toString(major) + '.' + Integer.toString(minor);
+ }
+
+
+ /**
+ * what parser are we using.
+ * @return the classname of the parser
+ */
+ private String getParserName() {
+ SAXParser saxParser = getSAXParser();
+ if (saxParser == null) {
+ return "Could not create an XML Parser";
+ }
+
+ // check to what is in the classname
+ return saxParser.getClass().getName();
+ }
+
+ /**
+ * Create a JAXP SAXParser
+ * @return parser or null for trouble
+ */
+ private SAXParser getSAXParser() {
+ SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
+ if (saxParserFactory == null) {
+ return null;
+ }
+ SAXParser saxParser = null;
+ try {
+ saxParser = saxParserFactory.newSAXParser();
+ } catch (Exception e) {
+ }
+ return saxParser;
+ }
+
+ /**
+ * get the location of the parser
+ * @return path or null for trouble in tracking it down
+ */
+
+ private String getParserLocation(JspWriter out) {
+ SAXParser saxParser = getSAXParser();
+ if (saxParser == null) {
+ return null;
+ }
+ return getLocation(out, saxParser.getClass());
+ }
+
+ private String value;
+
+ private OMElement createEnvelope() {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMNamespace omNs =
fac.createOMNamespace("http://axisversion.sample/xsd", "ns1");
+ OMElement method = fac.createOMElement("getVersion", omNs);
+ OMElement value = fac.createOMElement("myValue", omNs);
+ method.addChild(value);
+ return method;
+ }
+
+ public boolean invokeTheService() {
+ try {
+ // since this one is an internal request we do not use public
frontendHostUrl
+ // for it
+ int lastindex = IP.lastIndexOf('/');
+ IP = IP.substring(0, lastindex);
+ ///axis2/axis2-web/services/version
+ IP = IP.replaceAll("axis2-web", "");
+
+ OMElement payload = createEnvelope();
+ ConfigurationContext configctx =
+
ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null);
+ ServiceClient client = new ServiceClient(configctx, null);
+ EndpointReference targetEPR = new EndpointReference(IP +
configctx.getServicePath() + "/Version");
+ Options options = new Options();
+ client.setOptions(options);
+ options.setTo(targetEPR);
+ options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+
+ OMElement result = client.sendReceive(payload);
+ StringWriter writer = new StringWriter();
+
result.serialize(XMLOutputFactory.newInstance().createXMLStreamWriter(writer));
+ writer.flush();
+ value = writer.toString();
+ return true;
+ } catch (AxisFault axisFault) {
+ System.out.println(value);
+ return false;
+ } catch (XMLStreamException e) {
+ value = e.getMessage();
+ return false;
+ }
+ }
+
+ public String getFormatedSystemProperty(String systemProperty){
+ return systemProperty.replaceAll(":", ": ");
+ }
+%>
+
+<h1>Axis2 Happiness Page</h1>
+
+<h2>Examining webapp configuration</h2>
+
+<blockquote>
+
+<h4>Essential Components</h4>
+
+<%
+ int needed = 0,wanted = 0;
+
+ /**
+ * the essentials, without these Axis is not going to work
+ */
+ needed = needClass(out, "org.apache.axis2.transport.http.AxisServlet",
+ "axis2-1.0.jar",
+ "Apache-Axis",
+ "Axis2 will not work",
+ "http://xml.apache.org/axis2/");
+ needed += needClass(out, "org.apache.commons.logging.Log",
+ "commons-logging.jar",
+ "Jakarta-Commons Logging",
+ "Axis2 will not work",
+ "http://jakarta.apache.org/commons/logging.html");
+ needed += needClass(out, "javax.xml.stream.XMLStreamReader",
+ "stax-api-1.0.1.jar",
+ "Streaming API for XML",
+ "Axis2 will not work",
+ "http://dist.codehaus.org/stax/jars/");
+ needed += needClass(out, "org.codehaus.stax2.XMLStreamWriter2",
+ "wstx-asl-3.0.1.jar",
+ "Streaming API for XML implementation",
+ "Axis2 will not work",
+ "http://dist.codehaus.org/stax/jars/");
+
+%>
+<%
+ /*
+ * resources on the classpath path
+ */
+ /* broken; this is a file, not a resource
+ wantResource(out,"/server-config.wsdd",
+ "There is no server configuration file;"
+ +"run AdminClient to create one");
+ */
+ /* add more libraries here */
+
+ //is everything we need here
+ if (needed == 0) {
+ //yes, be happy
+ out.write("<p><font color='green'><strong>The core
axis2 libraries are present.</strong></font></p>");
+ } else {
+ //no, be very unhappy
+ response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ out.write("<font color='red'><i>"
+ + needed
+ + " core axis2 librar"
+ + (needed == 1 ? "y is" : "ies are")
+ + " missing</i></font>");
+ }
+ //now look at wanted stuff
+%>
+<p>
+ <B><I>Note:</I></B> Even if everything this page probes for
is present,
+ there is no guarantee your Axis Service will work, because there are many
configuration options
+ that we do not check for. These tests are <i>necessary</i> but not
<i>sufficient</i>
+</p>
+</blockquote>
+<h2>Examining Version Service</h2>
+<%
+ boolean serviceStatus = invokeTheService();
+ if (serviceStatus) {
+%>
+<blockquote>
+ <font color="green"><strong>
+ Found Axis2 default Version service and Axis2 is working
+ properly.</strong></font>
+ <p>Now you can drop a service archive in axis2/WEB-INF/services.
+ Following output was produced while invoking Axis2 version service
+ </p>
+ <p><%= value%></p>
+</blockquote>
+
+<%
+} else {
+%>
+<p>
+ <font color="brown"> There was a problem in Axis2 version service ,
may be
+ the service not available or some thing has gone wrong. But this does
+ not mean system is not working !
+ Try to upload some other service and check to see whether it is
+ working.
+ <br>
+ </font>
+</p>
+
+<%
+ }
+%>
+<h2>Examining Application Server</h2>
+<blockquote>
+<table>
+ <tr><td>Servlet
version</td><td><%=getServletVersion()%></td></tr>
+ <tr><td>Platform</td>
+
<td><%=getServletConfig().getServletContext().getServerInfo()%></td>
+ </tr>
+</table>
+</blockquote>
+<h2>Examining System Properties</h2>
+<%
+ /**
+ * Dump the system properties
+ */
+ java.util.Enumeration e = null;
+ try {
+ e = System.getProperties().propertyNames();
+ } catch (SecurityException se) {
+ }
+ if (e != null) {
+ out.write("<pre>");
+ out.write("<table cellpadding='5px' cellspacing='0px'
style='border: .5px blue solid;'>");
+ for (; e.hasMoreElements();) {
+ out.write("<tr>");
+ String key = (String) e.nextElement();
+ out.write("<th style='border: .5px #A3BBFF solid;'>"
+ key + "</th>");
+ out.write("<td style='border: .5px #A3BBFF solid;'>"
+ getFormatedSystemProperty(System.getProperty(key)) +
" </td>");
+ out.write("<tr>");
+ }
+ out.write("</table>");
+ out.write("</pre><p>");
+ } else {
+ out.write("System properties are not accessible<p>");
+ }
+%>
+
+<jsp:include page="include/footer.inc"/>
+</body>
+</html>
+
+
Added: sqlquerywebservice/src/main/webapp/axis2-web/InActivateService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/InActivateService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/InActivateService.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,82 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisService,
+ java.util.Collection,
+ java.util.HashMap,
+ java.util.Iterator"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Deactivate Service</h1>
+<form method="get" name="serviceInActivate"
action="axis2-admin/deactivateService">
+ <table width="100%" border="0">
+<tr>
+ <td colspan="2" >
+ <p>Only the services that are active are listed below. Note that although you
can activate a service from this page, once system is restarted the service will be active
again</p>
+ </td>
+ </tr>
+ <tr>
+<%
+HashMap services = (HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+Collection col = services.values();
+String html = "";
+int count = 0;
+
+for (Iterator iterator = col.iterator(); iterator.hasNext();) {
+ AxisService axisServices = (AxisService) iterator.next();
+ if(axisServices.isActive()){
+ count++;
+ html += "<option value='" + axisServices.getName() +
"'>";
+ html += axisServices.getName() + "</option>";
+ }
+}
+request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+if (count > 0) {
+%>
+
+ <td width="20%"> Select Service : </td>
+ <td width="80%">
+ <select name="axisService" class="selectBoxes">
+<%=html%>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td width="20%">Deactivate Service </td>
+ <td width="80%"><input type="checkbox"
name="turnoff">
+ </td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td>
+ <input name="submit" type="submit" value=" Deactivate
" >
+ <input name="reset" type="reset" value=" Clear "
>
+ </td>
+<%
+} else {
+ %>
+ <td colspan="2">No active services present.</td>
+ <%
+}
+%>
+ </tr>
+
+</table>
+</form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/LeftFrame.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/LeftFrame.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/LeftFrame.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,183 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<table width="100%" style="border-right:1px solid #CCCCCC;">
+ <tr>
+ <td colspan="2" >
+ <b>Tools </b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/upload">Upload Service</a>
+ </td>
+ </tr>
+<tr>
+ <td colspan="2" >
+ <b><nobr>System
Components </nobr></b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td >
+ <a href="axis2-admin/listService">Available Services</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td >
+ <a href="axis2-admin/listServiceGroups">Available Service
Groups</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td >
+ <a href="axis2-admin/listModules">Available Modules</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/globalModules">Globally Engaged
Modules</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td >
+ <a href="axis2-admin/listPhases">Available Phases</a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" >
+ <b>Execution Chains</b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/viewGlobalHandlers">Global
Chains</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/selectService">Operation Specific
Chains</a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" >
+ <b>Engage Module</b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/engagingglobally">For all
Services</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/engageToServiceGroup">For a Service
Group</a>
+ </td>
+ </tr>
+
+
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/engageToService">For a Service</a>
+ </td>
+ </tr>
+
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/listOperation">For an Operation</a>
+ </td>
+ </tr>
+
+ <tr>
+ <td colspan="2" >
+ <b>Services</b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/deactivateService">Deactivate
Service</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/activateService">Activate
Service</a>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/selectServiceParaEdit">Edit
Parameters</a>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2" >
+ <b>Contexts</b>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ </td>
+ <td>
+ <a href="axis2-admin/listContexts">View Hierarchy</a>
+ </td>
+ </tr>
+</table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/ListServiceGroup.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ListServiceGroup.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ListServiceGroup.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,68 @@
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.AxisServiceGroup" %>
+<%@ page import="javax.xml.namespace.QName" %>
+<%@ page import="java.util.ArrayList" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="org.apache.axis2.description.AxisModule" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"/>
+<h1>Available Service Groups</h1>
+<%
+ Iterator axisServiceGroupIter = (Iterator) request.getSession().getAttribute(
+ Constants.SERVICE_GROUP_MAP);
+ request.getSession().setAttribute(Constants.SERVICE_GROUP_MAP,null);
+ while (axisServiceGroupIter.hasNext()) {
+ AxisServiceGroup axisServiceGroup = (AxisServiceGroup)
axisServiceGroupIter.next();
+ String groupName = axisServiceGroup.getServiceGroupName();
+ Collection modules = axisServiceGroup.getEngagedModules();
+ Iterator axisServiceIter = axisServiceGroup.getServices();
+%>
+<h2><%=groupName%></h2><ul>
+ <%
+ while (axisServiceIter.hasNext()){
+ AxisService axisService = (AxisService) axisServiceIter.next();
+ String serviceName = axisService.getName();
+ %>
+ <li><font color="blue"><a
href="axis2-admin/ListSingleService?serviceName=<%=serviceName%>">
+ <%=serviceName%></a></font></li>
+ <%
+ }
+ %>
+</ul>
+<%
+ if (modules.size() > 0) {
+%>
+<I>Engaged modules</I><ul>
+ <%
+ for (Iterator iterator = modules.iterator(); iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ String modulDesc = axisOperation.getName();
+ %>
+ <li><%=modulDesc%></li>
+ <%
+ }
+ %></ul><%
+ }
+ }
+%>
+<jsp:include page="include/adminfooter.inc"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/Login.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/Login.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/Login.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,89 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<html>
+ <head>
+ <jsp:include page="include/httpbase.jsp"/>
+ <title>Login to Axis2 :: Administration page</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css">
+ </head>
+
+ <body onload="javascript:document.LoginForm.userName.focus();">
+ <jsp:include page="include/header.inc"/>
+ <jsp:include page="include/link-footer.jsp"/>
+ <table class="FULL_BLANK">
+ <tr>
+ <td valign="top">
+ <h2>Welcome :</h2>
+ <p>Welcome to the Axis2 administration console. From inside the Axis2
administration console you can :</p>
+ <ul style="list-style: none;" class="loginUL">
+ <li>Check on the health of your Axis2 deployment.</li>
+ <li>Change any parameters at run time.</li>
+ <li>Upload new services into Axis2 [Service hot-deployment].</li>
+ </ul>
+ <font color="orange">Warning: Please note that configuration
changes done through the administration console
+ will be lost when the server is restarted.</font>
+ </td>
+ <td valign="top" align="left">
+ <form method="post" name="LoginForm"
action="axis2-admin/login">
+ <table class="LOG_IN_FORM">
+ <tr>
+ <td align="center" colspan="2"
bgcolor="#b0b0b0" color="#FFFFFF"><font
color="#FFFFFF">Login</font></td>
+ </tr>
+ <tr>
+ <td align="center"
colspan="2"> </td>
+ </tr>
+ <tr>
+ <td align="right">Username:</td>
+ <td><input align="left" type="text"
name="userName" tabindex="1">
+ </td>
+ </tr>
+ <tr>
+ <td align="right">Password : </td>
+ <td><input align="left" type="password"
name="password" tabindex="2">
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <br>
+ </td>
+ </tr>
+ <tr>
+ <td align="center" colspan="2">
+ <input name="cancel" type="reset" value="
Clear ">
+ <input name="submit" type="submit" value="
Login ">
+ </td>
+ </tr>
+ <tr>
+ <td align="center" colspan="2">
+ <font color="red"> <% if
(request.getAttribute("errorMessage") != null) {%><%=
request.getAttribute("errorMessage")%><% } %> </font>
+ </td>
+ </tr>
+ </table>
+ </form>
+ <br/><br/><br/><br/><br/><br/>
+ </td>
+ </tr>
+ </table>
+ <p>Test</p>
+ <jsp:include page="include/footer.inc"/>
+ </body>
+</html>
+
+
Added: sqlquerywebservice/src/main/webapp/axis2-web/MainFrame.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/MainFrame.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/MainFrame.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,28 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+ <title>Axis2 Administration </title>
+ <style type="text/css">
+ </style></head>
+
+ <body>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/SelectService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/SelectService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/SelectService.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,78 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisService,
+ java.util.Collection,
+ java.util.HashMap,
+ java.util.Iterator"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+
+ <%
+ String action ="";
+ String buttonName="" ;
+ String status =
(String)request.getSession().getAttribute(Constants.SELECT_SERVICE_TYPE);
+ String heading = "";
+ String disc = "";
+ if(status != null && status.equals("MODULE")) {
+ action = "listOperations";
+ buttonName = " View Operations";
+ heading = "Select a service to view operation specific chains";
+ disc = "Select an Axis service from the combo and click on the 'View
Operations' button to view operation specific Chains.";
+ } else if(status != null && status.equals("VIEW")){
+ buttonName = " View ";
+ action = "viewServiceHandlers";
+ heading = "Select a service to view service handlers";
+ disc = "Select an Axis service from the combo and click on the
'View' button to view service handlers.";
+ } else if (status != null &&
status.equals("SERVICE_PARAMETER")){
+ buttonName = " Edit Parameters ";
+ action = "editServicePara"; // Constants.EDIR_SERVICE_PARA;
+ heading = "Select a Service to Edit Parameters";
+ disc = "Select an Axis service from the combo and click on the 'Edit
Parameters' button to edit parameters.";
+ }
+ %>
+<h1><%=heading%></h1>
+<p><%=disc%></p>
+<form method="get" name="selectServiceForm"
action="axis2-admin/<%=action%>">
+<table border="0" width="50%" cellspacing="1"
cellpadding="1">
+ <tr>
+ <td width="35%">Select a Service :</td><td
width="65%">
+ <select name="axisService">
+ <%
+ HashMap services =
(HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+ Collection serviceCol = services.values();
+ for (Iterator iterator = serviceCol.iterator(); iterator.hasNext();) {
+ AxisService axisService = (AxisService)iterator.next();
+ String serviceName = axisService.getName();
+ %> <option align="left"
value="<%=serviceName%>"><%=serviceName%></option>
+ <%
+ }
+ request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+ %>
+ </td>
+ </tr>
+ <tr><td colspan="2"> </td></tr>
+ <tr><td> </td>
+ <td colspan="2" align="left">
+ <input name="submit" type="submit"
value="<%=buttonName%>" >
+ </td>
+ </tr>
+ </table>
+ </form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/ServiceParaEdit.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ServiceParaEdit.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ServiceParaEdit.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,121 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisOperation,
+ org.apache.axis2.description.AxisService,
+ org.apache.axis2.description.Parameter,
+ java.util.ArrayList,
+ java.util.Iterator"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Edit Service Parameters</h1>
+ <form method="get" name="editServicepara"
action="axis2-admin/editServicepara">
+ <%
+ AxisService axisService = (AxisService)request.getSession().
+ getAttribute(Constants.SERVICE);
+ if(axisService != null ){
+ %> <table width="100%">
+
+ <tr>
+ <td colspan="2" ><b>
+ <%
+ String servicName = axisService.getName();
+ %>Service Parameters :: <%=servicName%>
+ </b></td>
+ </tr>
+ <tr>
+ <td colspan="2" ><input style="display:none"
name="axisService" value="<%=servicName%>"></td>
+ </tr>
+ <%
+ ArrayList service_para = axisService.getParameters();
+ for (int i = 0; i < service_para.size(); i++) {
+ Parameter parameter = (Parameter) service_para.get(i);
+ if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
+ continue;
+ }
+ %>
+ <tr>
+ <td><%=parameter.getName()%></td>
+ <td><input type="text"
value="<%=parameter.getValue()%>"
+ name="<%=(servicName + "_" +
parameter.getName())%>" size="50">
+ </td>
+ </tr>
+ <%
+ }
+ Iterator operations = axisService.getOperations();
+ if(operations.hasNext()){
+ %>
+ <tr>
+ <td> </td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td colspan="2" > <b>Operation Paramaters ::
</b>
+ </td>
+ </tr>
+ <%
+ }
+
+ ArrayList op_paras ;
+ operations = axisService.getOperations();
+ while (operations.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) operations.next();
+ String operationName = axisOperation.getName().getLocalPart();
+ %>
+ <tr>
+ <td colspan="2" >
</td>
+ </tr>
+ <tr>
+ <td colspan="2" ><b>Operation :
<%=operationName%></b></td>
+ </tr>
+ <%
+ op_paras = axisOperation.getParameters();
+ for (int i = 0; i < op_paras.size(); i++) {
+ Parameter parameter = (Parameter) op_paras.get(i);
+ if (parameter.getParameterType()==Parameter.OM_PARAMETER) {
+ continue;
+ }
+ %>
+ <tr>
+ <td><%=parameter.getName()%></td>
+ <td><input type="text"
value="<%=parameter.getValue()%>"
+ name="<%=(operationName + "_" +
parameter.getName())%>" size="50">
+ </td>
+ </tr>
+ <%
+ }
+ }
+ %>
+ <tr>
+ <td> </td>
+ <td>
+ <input name="changePara" type="submit"
value=" Change " >
+ </td>
+ </tr>
+ </table>
+ <%
+ } else {
+ %>
+ <p><%=request.getAttribute("status")%></p>
+ <%
+ }
+
+ %>
+ <form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/TopFrame.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/TopFrame.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/TopFrame.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,30 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+ <title>Untitled Document</title>
+ <style type="text/css">
+ </style></head>
+
+ <body>
+ <jsp:include page="include/adminheader.inc">
+ </jsp:include>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/ViewContexts.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ViewContexts.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ViewContexts.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,64 @@
+<%@ page import="org.apache.axis2.Constants"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.apache.axis2.context.ServiceContext"%>
+<%@ page import="org.apache.axis2.context.ServiceGroupContext"%>
+<%@ page import="java.util.Hashtable"%>
+<%@ page import="java.util.Iterator"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Running Context Hierarchy</h1>
+<%
+ ConfigurationContext configContext = (ConfigurationContext)
request.getSession().getAttribute(
+ Constants.CONFIG_CONTEXT);
+
+ String[] serviceGroupIds = configContext.getServiceGroupContextIDs();
+ if (serviceGroupIds.length > 0) {
+%>
+<ul>
+ <%
+
+ for (int i = 0; i < serviceGroupIds.length; i++) {
+ String groupContextID = serviceGroupIds[i];
+ ServiceGroupContext groupContext =
configContext.getServiceGroupContext(groupContextID);
+ %>
+ <li><%=groupContextID%><font color="blue"><a
href="axis2-admin/viewServiceGroupConetxt?TYPE=VIEW&ID=<%=groupContextID%>">
+ View</a></font> <font color="red"><a
href="axis2-admin/viewServiceGroupConetxt?TYPE=DELETE&ID=<%=groupContextID%>">
+ Remove</a> </font></li>
+ <%
+ Iterator serviceContextItr = groupContext.getServiceContexts();
+ %><ul><%
+ while (serviceContextItr.hasNext()) {
+ ServiceContext serviceContext = (ServiceContext)serviceContextItr.next();
+ String serviceConID = serviceContext.getAxisService().getName();
+ %>
+ <li><%=serviceConID%><font color="blue"><a
href="axis2-admin/viewServiceContext?TYPE=VIEW&ID=<%=serviceConID%>&PID=<%=groupContextID%>">
+ View</a></font></li>
+ <%
+ }
+ %></ul><hr><%
+ }
+ %> </ul>
+ <%
+ } else {%>
+ <p>No running contexts were found on the system.</p>
+ <%}
+%>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/ViewGlobalHandlers.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ViewGlobalHandlers.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ViewGlobalHandlers.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,136 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.engine.AxisConfiguration,
+ org.apache.axis2.engine.Handler,
+ org.apache.axis2.engine.Phase,
+ java.util.ArrayList"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>View Global Execution Chains</h1>
+ <%
+ AxisConfiguration axisConfig = (AxisConfiguration)request.getSession().
+ getAttribute(Constants.GLOBAL_HANDLERS);
+ if(axisConfig != null ){
+ ArrayList handlers ;
+ ArrayList phases = axisConfig.getInFlowPhases();
+ %>
+ <h3> In Flow Up To and Including Dispatcher </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ phases = axisConfig.getInFaultFlowPhases();
+ %>
+ <h3> In Fault Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+
+ phases = axisConfig.getOutFlowPhases();
+ %>
+ <h3> Out Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ phases = axisConfig.getOutFaultFlowPhases();
+ %>
+ <h3> Out Fault Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+
+ }
+ %>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/ViewServiceHandlers.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/ViewServiceHandlers.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/ViewServiceHandlers.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,145 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisOperation,
+ org.apache.axis2.description.AxisService,
+ org.apache.axis2.engine.Handler,
+ org.apache.axis2.engine.Phase,
+ java.util.ArrayList,
+ java.util.Iterator"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<html>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>View Operation Specific Chains</h1>
+ <%
+ AxisService axisService = (AxisService)request.getSession().
+ getAttribute(Constants.SERVICE_HANDLERS);
+ if(axisService != null ){
+ ArrayList handlers ;
+ Iterator operations = axisService.getOperations();
+ while (operations.hasNext()) {
+ AxisOperation axisOperationon = (AxisOperation) operations.next();
+ %><h2>Operation Name :
<%=axisOperationon.getName().getLocalPart()%></h2><%
+ ArrayList phases = axisOperationon.getRemainingPhasesInFlow();
+ %>
+ <h3> In Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ phases = axisOperationon.getPhasesInFaultFlow();
+ %>
+ <h3> In Fault Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+
+ phases = axisOperationon.getPhasesOutFlow();
+ %>
+ <h3> Out Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ phases = axisOperationon.getPhasesOutFaultFlow();
+ %>
+ <h3> Out Fault Flow </h3>
+ <ul>
+ <%
+ for (int i = 0; i < phases.size(); i++) {
+ Phase phase = (Phase) phases.get(i);
+ %>
+ <li>Phase Name : <%=phase.getPhaseName()%></li>
+ <ul>
+ <%
+ handlers = phase.getHandlers();
+ for (int j = 0; j < handlers.size(); j++) {
+ Handler handler = (Handler) handlers.get(j);
+ %>
+ <li>Handler Name :
<%=handler.getHandlerDesc().getName()%></li>
+ <%
+ }
+ %>
+ </ul>
+ <%
+ }
+ %>
+ </ul>
+ <%
+
+ }
+ }
+
+ %>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/admin.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/admin.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/admin.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,30 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Welcome to Axis2 Web Admin Module !!</h1>
+<p>You are now logged into the Axis2 administration console from inside
+the console you will be able to</p>
+ <ul>
+ <li>to check on the health of your Axis2 deployment.</li>
+ <li>to change any parameters at run time.</li>
+ <li>to upload new services into Axis2 [Service hot-deployment].</li>
+ </ul>
+
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/css/axis-style.css
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/css/axis-style.css
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/css/axis-style.css 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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.
+ */
+BODY {
+ background-color : "#FFFFFF";
+ leftmargin:"0";
+ topmargin:"0";
+ font-family:Arial;
+ font-size:11pt;
+}
+h1 { font-family: Arial; font-size: 16pt; font-weight: bold }
+h2 { font-family: Arial; font-size: 13pt; font-weight: bold; color: #5D0D7D }
+ul { font-family: Arial; font-size: 11pt }
+input { font-family: Arial; font-size: 8pt; font-weight: bold }
+td { font-family: Arial; font-size: 10pt }
+h3 { font-family: Arial; font-size: 12pt; font-weight:bold }
+TABLE.FULL_BLANK {
+ width : 100%;
+ height : 100%;
+ border : 0;
+ padding : 0;
+}
+
+TABLE.LOG_IN_FORM{
+ height: 200px%;
+ border:1px solid #000000;
+ width: 300px%;
+ cellspacing:1px;
+ cellpadding:1px;
+ background-color: #f7f7f7 ;
+}
+
+UL.loginUL LI{
+ padding: 10pt;
+}
Added: sqlquerywebservice/src/main/webapp/axis2-web/disengage.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/disengage.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/disengage.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,30 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisModule" %>
+<%@ page import="org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
+<%@ page import="org.apache.axis2.util.JavaUtils" %>
+<%@ page import="java.util.*" %>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"/>
+<%=request.getSession().getAttribute("status")%>
+<jsp:include page="include/adminfooter.inc" />
Added: sqlquerywebservice/src/main/webapp/axis2-web/engagingglobally.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/engagingglobally.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/engagingglobally.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,68 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisModule,
+ java.util.Collection,
+ java.util.HashMap,
+ java.util.Iterator" %>
+<html>
+<jsp:include page="include/adminheader.jsp"/>
+<%
+ String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS);
+%>
+<h1>Engage Module Globally</h1>
+
+<p>To engage a module on all services across the system, select a module from the
combo box below
+ and click on the "Engage" button. Any module that needs to place handlers
into the pre-dispatch
+ phase needs to be engaged globally.</p>
+
+<form method="get" name="selectModuleForm"
action="axis2-admin/engagingglobally">
+ <table border="0" width="100%" cellspacing="1"
cellpadding="1">
+ <tr>
+ <td width="15%">Select a Module :</td>
+ <td width="75%" align="left">
+ <select name="modules">
+ <%
+ HashMap moduels = (HashMap)
request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP,null);
+ Collection moduleCol = moduels.values();
+ for (Iterator iterator = moduleCol.iterator();
iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ String modulename = axisOperation.getName();
+ %> <option align="left"
value="<%=modulename%>"><%=modulename%></option>
+ <%
+ }
+ %>
+ </select>
+ </td>
+ </tr>
+ <tr><td> </td>
+ <td>
+ <input name="submit" type="submit" value="
Engage ">
+ </td>
+ </tr>
+ </table>
+</form>
+<%
+ if (status != null) {
+%>
+<p><font color="blue"><%=status%></font></p>
+<%
+ } %>
+<jsp:include page="include/adminfooter.inc"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/engagingtoanoperation.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/engagingtoanoperation.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/engagingtoanoperation.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,124 @@
+<%@ page contentType="text/html; charset=iso-8859-1"
language="java" import="org.apache.axis2.Constants,
+
org.apache.axis2.description.AxisModule,
+
org.apache.axis2.description.AxisOperation,
+
java.util.Collection,
+
java.util.HashMap,
+
java.util.Iterator"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<%
+ String status = (String)request.getSession().getAttribute(Constants.ENGAGE_STATUS);
+%>
+<h1>Engage Module for an Operation</h1>
+<p>To engage a module for an axis operation,</p>
+ <ol>
+ <li>select the module you want to engage </li>
+ <li>select the axis operation you like the module to be
engaged.</li>
+ <li>click "Engage".</li>
+ </ol>
+
+<form method="get" name="selectModuleForm"
action="axis2-admin/listOperations">
+<table border="0" width="100%" cellspacing="1"
cellpadding="1">
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>Select a Module :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="modules">
+ <%
+ HashMap moduels =
(HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP,null);
+ Collection moduleCol = moduels.values();
+ for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ String modulename = axisOperation.getName();
+ %> <option align="left"
value="<%=modulename%>"><%=modulename%></option>
+ <%
+ }
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>Select an Operation :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="axisOperation">
+ <%
+ Iterator operations =
(Iterator)request.getSession().getAttribute(Constants.OPERATION_MAP);
+ while (operations.hasNext()) {
+ AxisOperation axisOperationtion = (AxisOperation)operations.next();
+ String opname = axisOperationtion.getName().getLocalPart();
+ %> <option align="left"
value="<%=opname%>"><%=opname%></option>
+ <%
+ }
+ request.getSession().setAttribute(Constants.OPERATION_MAP,null);
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="submit" type="submit" value="
Engage " >
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <textarea cols="50" <%
+ if(status == null){
+ %>
+ style="display:none"
+ <%
+ } %>
+ ><%=status%></textarea>
+ </td>
+ </tr>
+ </table>
+ </form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/engagingtoaservice.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/engagingtoaservice.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/engagingtoaservice.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,142 @@
+<%@ page contentType="text/html; charset=iso-8859-1"
language="java" import="org.apache.axis2.Constants,
+
org.apache.axis2.description.AxisModule,
+
org.apache.axis2.description.AxisService,
+
java.util.Collection,
+
java.util.HashMap,
+
java.util.Iterator"
+ %>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<%
+ String status = (String) request.getSession().getAttribute(Constants.ENGAGE_STATUS);
+%>
+<h1>Engage Module for a Service</h1>
+
+<p>To engage a module for a axis service,</p>
+
+ <ol>
+ <li>select the module you want to engage</li>
+ <li>select the axis service you like the module to be engaged.</li>
+ <li>click "Engage".</li>
+ </ol>
+
+<form method="get" name="selectModuleForm"
action="axis2-admin/engageToService">
+ <table border="0" width="100%" cellspacing="1"
cellpadding="1">
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>Select a Module :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="modules">
+ <%
+
+ HashMap moduels =
(HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP,null);
+ Collection moduleCol = moduels.values();
+ for (Iterator iterator = moduleCol.iterator();
iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ String modulename = axisOperation.getName();
+
+ %>
+ <option align="left"
value="<%=modulename%>"><%=modulename%>
+ </option>
+ <%
+
+ }
+
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>Select a Service :</td>
+ </tr>
+ <tr>
+ <td>
+ <select name="axisService">
+ <%
+
+ HashMap services =
(HashMap)request.getSession().getAttribute(Constants.SERVICE_MAP);
+ Collection serviceCol = services.values();
+ for (Iterator iterator = serviceCol.iterator();
iterator.hasNext();) {
+ AxisService axisService = (AxisService)iterator.next();
+ String serviceName = axisService.getName();
+
+ %>
+ <option align="left"
value="<%=serviceName%>"><%=serviceName%>
+ </option>
+ <%
+
+ }
+ request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+
+ %>
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <input name="submit" type="submit" value="
Engage ">
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <textarea cols="50" <%
+ if (status == null) {
+ %>
+ style="display:none"
+ <%
+ } %>
+ ><%=status%>
+ </textarea>
+ </td>
+ </tr>
+ </table>
+</form>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
+
Added: sqlquerywebservice/src/main/webapp/axis2-web/error.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/error.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/error.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,30 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%@page isErrorPage="true" %>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+ <table>
+ <tr>
+ <td align="center">An error has occured!. Please check the details
below</td>
+ </tr>
+ <tr>
+ <td align="center"><%=exception.getMessage()%></td>
+ </tr>
+ </table>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/errorModule.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/errorModule.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/errorModule.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,29 @@
+<%@ page import="org.apache.axis2.Constants,
+ java.util.Hashtable"%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+ <%
+ Hashtable errornessModules
=(Hashtable)request.getSession().getAttribute(Constants.ERROR_MODULE_MAP);
+ String moduleName = request.getParameter("moduleName");
+ %> <h3>The Module has deployment faults</h3><%
+ %><font color="red" ><%=(String)errornessModules.get(moduleName)
%></font><%
+ %>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/globalModules.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/globalModules.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/globalModules.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,57 @@
+ <%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page import="org.apache.axis2.Constants,
+ javax.xml.namespace.QName,
+ java.util.Collection,
+ java.util.Iterator"%>
+ <%@ page import="org.apache.axis2.description.AxisModule" %>
+ <%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Globally Engaged Modules</h1>
+ <%
+ boolean foundModules = false;
+ boolean wroteUL = false;
+ String modulename = "";
+ Collection moduleCol = (Collection)
request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP, null);
+ if (moduleCol != null && moduleCol.size() > 0) {
+ for (Iterator iterator = moduleCol.iterator(); iterator.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iterator.next();
+ modulename = axisOperation.getName();
+ if (!wroteUL) {
+ wroteUL = true;
+ %>
+ <ul>
+<%
+ }
+ %><li><%=modulename%></li>
+ <br> <%
+ }
+ if (wroteUL){
+%>
+ </ul>
+<%
+ }
+ } else{
+ %>
+ <h2><font color="blue">There are no modules engaged
globally</font></h2>
+ <%
+ }
+ %>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/images/asf-logo.gif
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/axis2-web/images/asf-logo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/axis2-web/images/axis.gif
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/axis2-web/images/axis.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/axis2-web/images/axis.jpg
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/axis2-web/images/axis.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/axis2-web/images/axis_l.jpg
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/axis2-web/images/axis_l.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/adminfooter.inc
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/adminfooter.inc
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/adminfooter.inc 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,23 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+</td></tr>
+</table>
+<jsp:include page="footer.inc"></jsp:include>
+</body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.inc
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.inc
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.inc 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,28 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<table width="100%">
+ <tr>
+ <td align="left"><img
src="axis2-web/images/asf-logo.gif"/><h1>Axis 2</h1></td>
+ <td align="right"><img
src="axis2-web/images/axis.jpg"/></td>
+ </tr>
+ <tr>
+ <td>.</td>
+ <td align="right"><a href="logout"
target="_parent" >Log out</a></td>
+ </tr>
+</table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/adminheader.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,42 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=iso-8859-1"
language="java" %>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <jsp:include page="../include/httpbase.jsp"/>
+ <title>Axis2 :: Administration Page</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css"/>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"/>
+ </head>
+
+ <body>
+ <jsp:include page="header.inc"/>
+ <table class="FULL_BLANK">
+ <tr>
+ <td valign="top" width="20%">
+ <jsp:include page="../LeftFrame.jsp"/>
+ </td>
+ <td valign="top" align="left" width="80%">
+ <table width="100%">
+ <tr>
+ <td align="right" colspan="2"><a
href="#"
onclick="javaacript:history.back();">Back</a> | <a
+ href="axis2-admin/logout">Log out</a></td>
+ </tr>
+ </table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/footer.inc
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/footer.inc
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/footer.inc 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,37 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+</td>
+</tr>
+<tr height="20px">
+ <td>
+ <table width="100%">
+ <tr><td>
+ <table width="950px">
+ <tr><td><hr size="1" noshade=""
/></td></tr>
+ <tr>
+ <td align="center">Copyright © 1999-2006, The Apache
Software Foundation<br />Licensed under the <a
href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version
2.0</a>.</td>
+ </tr>
+ </table>
+ </td>
+ <td> </td>
+ </tr>
+ </table>
+ </td>
+</tr>
+</table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/header.inc
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/header.inc
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/header.inc 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,29 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<table class="FULL_BLANK"><tr height="100%"><td
valign="top">
+<table width="100%">
+<tr><td>
+<table width="950px">
+ <tr>
+ <td align="left"><img
src="axis2-web/images/asf-logo.gif"/></td>
+ <td align="right"><img
src="axis2-web/images/axis_l.jpg"/></td>
+ </tr>
+</table>
+</td>
+<td> </td></tr></table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/httpbase.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/httpbase.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/httpbase.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,66 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.transport.http.AxisServlet" %>
+<%@ page import="javax.servlet.ServletContext" %>
+<%@ page import="javax.servlet.http.HttpServletRequest" %>
+<%!
+ private String frontendHostUrl;
+
+ public void jspInit() {
+ ServletContext context = this.getServletConfig().getServletContext();
+ ConfigurationContext configctx = (ConfigurationContext)
context.getAttribute(AxisServlet.CONFIGURATION_CONTEXT);
+ if (configctx != null){
+ Parameter parameter =
configctx.getAxisConfiguration().getParameter(Constants.HTTP_FRONTEND_HOST_URL);
+ if (parameter != null) {
+ frontendHostUrl = (String) parameter.getValue();
+ }
+ }
+ }
+
+ public String calculateHttpBase(HttpServletRequest aRequest) {
+ StringBuffer stringBuffer = new StringBuffer();
+ if (frontendHostUrl != null) {
+ stringBuffer.append(frontendHostUrl);
+ } else {
+ String scheme = aRequest.getScheme();
+ stringBuffer.append(scheme);
+ stringBuffer.append("://");
+ stringBuffer.append(aRequest.getServerName());
+ if (("http".equalsIgnoreCase(scheme) && aRequest.getServerPort()
!= 80) || "https".equalsIgnoreCase(scheme) && aRequest.getServerPort()
!= 443)
+ {
+ stringBuffer.append(":");
+ stringBuffer.append(aRequest.getServerPort());
+ }
+ // I think i saw web containers return null for root web context
+ if (aRequest.getContextPath() != null) {
+ stringBuffer.append(aRequest.getContextPath());
+ }
+ }
+ // append / char if needed
+ if (stringBuffer.charAt(stringBuffer.length() - 1) != '/') {
+ stringBuffer.append("/");
+ }
+ String curentUrl = stringBuffer.toString();
+ aRequest.setAttribute("frontendHostUrl", curentUrl);
+ return curentUrl;
+ }
+%><base href="<%= calculateHttpBase(request)%>"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.inc
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.inc
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.inc 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,23 @@
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ -->
+<table width="100%">
+ <tr>
+ <td align="center"><a href="index.jsp">Back
Home</a></td>
+ </tr>
+</table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/include/link-footer.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,28 @@
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<table width="100%">
+ <tr><td>
+ <table width="950px">
+ <tr>
+ <td align="right"><a href="axis2-web/index.jsp">Back
Home</a> | <a href="#"
onclick="javascript:window.location.reload(true);return
false;">Refresh</a></td>
+ </tr>
+ </table>
+ </td>
+ <td> </td></tr>
+</table>
Added: sqlquerywebservice/src/main/webapp/axis2-web/index.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/index.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/index.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,57 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<html>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+ <head>
+ <jsp:include page="include/httpbase.jsp"/>
+ <title>Axis 2 - Home</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css"/>
+ </head>
+
+ <body>
+ <jsp:include page="include/header.inc" />
+ <br/>
+
+ <h1>Welcome!</h1>
+ Welcome to the new generation of Axis. If you can see this page you have
+ successfully deployed the Axis2 Web Application. However, to ensure that Axis2
+ is properly working, we encourage you to click on the validate link.
+ <br/>
+ <ul>
+ <li><a href="services/listServices">Services</a>
+ <br/>
+ View the list of all the available services deployed in this server.
+ </li>
+ <li><a href="axis2-web/HappyAxis.jsp">Validate</a>
+ <br/>
+ Check the system to see whether all the required libraries are in place
+ and view the system information.
+ </li>
+ <%--<li><a href="interop.jsp">Do an interop
test</a>
+ <br/>
+ You can run Interoperability tests here
+ </li>--%>
+ <li><a href="axis2-admin/">Administration</a>
+ <br/>
+ Console for administering this Axis2 installation.
+ </li>
+ </ul>
+ <jsp:include page="include/footer.inc"/>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/listFaultyService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listFaultyService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listFaultyService.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,85 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisOperation"%>
+<%@ page import="org.apache.axis2.description.AxisService"%>
+<%@ page import="java.util.Hashtable"%>
+<%@ page import="java.util.Iterator"%>
+<%@ page import="org.apache.axis2.transport.http.AxisServlet"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<html>
+ <head>
+ <jsp:include page="include/httpbase.jsp"/>
+ <title>List Single service</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css">
+ </head>
+ <body>
+ <jsp:include page="include/header.inc"></jsp:include>
+ <jsp:include page="include/link-footer.jsp"></jsp:include>
+ <%
+ String prifix = request.getAttribute("frontendHostUrl") +
(String)request.getSession().getAttribute(Constants.SERVICE_PATH) +"services/";
+ %>
+ <%
+ String isFault =
(String)request.getSession().getAttribute(Constants.IS_FAULTY);
+ String servicName = request.getParameter("serviceName");
+ if(Constants.IS_FAULTY.equals(isFault)){
+ Hashtable errornessservices
=(Hashtable)request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
+ %>
+ <h3>This Web axisService has deployment faults</h3><%
+ %><font color="red"
><%=(String)errornessservices.get(servicName) %></font>
+ <%
+
+ }else {
+
+ AxisService axisService =
+ (AxisService)
request.getSession().getAttribute(Constants.SINGLE_SERVICE);
+ if(axisService!=null){
+ Iterator opItr = axisService.getOperations();
+ //operationsList = operations.values();
+ String serviceName = axisService.getName();
+ %><h2><font color="blue"><a
href="<%=prifix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
+ <font color="blue">Service EPR : </font><font
color="black"><%=prifix +
axisService.getName()%></font><br>
+ <h4>Service Description : <font
color="black"><%=axisService.getServiceDescription()%></h4>
+ <i><font color="blue">Service Status :
<%=axisService.isActive()?"Active":"InActive"%></font></i><br>
+ <%
+ if (opItr.hasNext()) {
+ %><i>Available operations</i><%
+ } else {
+ %><i> There are no Operations specified</i><%
+ }
+ opItr = axisService.getOperations();
+ %><ul><%
+ while (opItr.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) opItr.next();
+
%><li><%=axisOperation.getName().getLocalPart()%></li>
+ <%
+ }
+ %></ul>
+ <%
+ } else{
+ %>
+ <h3><font color="red" >No services found in this
location.</font></h3>
+ <%
+ }
+
+ }
+ %>
+<jsp:include page="include/footer.inc"></jsp:include>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/listGroupService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listGroupService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listGroupService.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,107 @@
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.description.AxisModule" %>
+<%@ page import="org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="java.util.Collection" %>
+<%@ page import="java.util.HashMap" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="org.apache.axis2.transport.http.AxisServlet"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<html>
+<head>
+ <jsp:include page="include/httpbase.jsp"/>
+ <title>List Services</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css" />
+</head>
+
+<body>
+<jsp:include page="include/adminheader.jsp">
+</jsp:include>
+<h1>Available services</h1>
+<%
+ String prifix = request.getAttribute("frontendHostUrl") +
(String)request.getSession().getAttribute(Constants.SERVICE_PATH) +"/";
+%>
+<%
+ HashMap serviceMap = (HashMap)
request.getSession().getAttribute(Constants.SERVICE_MAP);
+ request.getSession().setAttribute(Constants.SERVICE_MAP,null);
+ String servicName = request.getParameter("serviceName");
+ AxisService axisService = (AxisService) serviceMap.get(servicName);
+ if (axisService != null) {
+ Iterator operations;
+ String serviceName;
+ operations = axisService.getOperations();
+ serviceName = axisService.getName();
+%><hr>
+
+<h2><font color="blue"><a href="<%=prifix +
axisService.getName()%>?wsdl"><%=serviceName%></a>
+</font></h2>
+<font color="blue">Service EPR :</font><font
color="black"><%=prifix + axisService.getName()%></font>
+<h4>Service Description : <font
color="black"><%=axisService.getServiceDescription()%></h4>
+<i><font color="blue">Service Status : <%=axisService.isActive()
? "Active" : "InActive"%></font></i><br/>
+<%
+ Collection engagedModules = axisService.getEngagedModules();
+ String moduleName;
+ if (engagedModules.size() > 0) {
+%>
+<i>Engaged Modules for the Axis Service</i><ul>
+ <%
+ for (Iterator iteratorm = engagedModules.iterator(); iteratorm.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iteratorm.next();
+ moduleName = axisOperation.getName();
+ %><li><%=moduleName%></li>
+ <%
+ }%>
+</ul>
+<%
+ }
+ if (operations.hasNext()) {
+%><br><i>Available operations</i><%
+} else {
+%><i> There are no operations specified</i><%
+ }
+%><ul><%
+ operations = axisService.getOperations();
+ while (operations.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) operations.next();
+%><li><%=axisOperation.getName().getLocalPart()%></li>
+ <%
+ engagedModules = axisOperation.getEngagedModules();
+ if (engagedModules.size() > 0) {
+ %>
+ <br><i>Engaged Modules for the Operation</i><ul>
+ <%
+ for (Iterator iterator2 = engagedModules.iterator(); iterator2.hasNext();) {
+ AxisModule moduleDecription = (AxisModule) iterator2.next();
+ moduleName = moduleDecription.getName();
+ %><li><%=moduleName%></li><br><%
+ }
+%></ul><%
+ }
+
+ }
+%></ul>
+<%
+ }
+%>
+<jsp:include page="include/adminfooter.inc">
+</jsp:include>
+</body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/listModules.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listModules.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listModules.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,82 @@
+ <%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisModule,
+ java.util.Collection"%>
+ <%@ page import="java.util.Enumeration"%>
+ <%@ page import="java.util.HashMap"%>
+ <%@ page import="java.util.Hashtable"%>
+ <%@ page import="java.util.Iterator"%>
+ <%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+ <h1>Available Modules</h1>
+ <%
+ boolean foundModules = false;
+ boolean wroteUL = false;
+ HashMap moduleMap =
(HashMap)request.getSession().getAttribute(Constants.MODULE_MAP);
+ request.getSession().setAttribute(Constants.MODULE_MAP,null);
+ Hashtable errornesModules
=(Hashtable)request.getSession().getAttribute(Constants.ERROR_MODULE_MAP);
+ if (moduleMap!=null && !moduleMap.isEmpty()){
+ String modulename ;
+ String moduleDescription ;
+ Collection moduleNames = moduleMap.values();
+ for (Iterator iterator = moduleNames.iterator(); iterator.hasNext();) {
+ foundModules = true;
+ AxisModule moduleQName = (AxisModule) iterator.next();
+ modulename = moduleQName.getName();
+ moduleDescription = moduleQName.getModuleDescription();
+ if(moduleDescription==null){
+ moduleDescription = "[ -- No module description found
--]";
+ }
+ if (!wroteUL){
+ wroteUL = true;
+%>
+ <ul>
+<%
+ }
+ %><li><b><%=modulename%></b> :
<%=moduleDescription%></li>
+ <%
+ }
+ if (wroteUL){
+%>
+ </ul>
+<%
+ }
+ }
+ %>
+ <%if(errornesModules.size()>0){
+ %>
+ <h3><font color="red">Faulty Modules</font></h3>
+ <%
+ Enumeration faultyModules = errornesModules.keys();
+ while (faultyModules.hasMoreElements()) {
+ foundModules = true;
+ String faultyModuleName = (String) faultyModules.nextElement();
+ %><a
href="errorModule.jsp?moduleName=<%=faultyModuleName%>">
+ <%=faultyModuleName%></a>
+ <%
+ }
+ }
+ if(! foundModules) {
+ %>
+ <h2><font color="blue">There are no modules
deployed in the system.</font></h2>
+ <%
+ }
+ %>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/listService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listService.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,152 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisModule" %>
+<%@ page import="org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
+<%@ page import="org.apache.axis2.util.JavaUtils" %>
+<%@ page import="java.util.*" %>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"/>
+
+<h1>Available Services</h1>
+<% String prefix = request.getAttribute("frontendHostUrl") +
(String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
+%>
+<%
+ HashMap serviceMap = (HashMap)
request.getSession().getAttribute(Constants.SERVICE_MAP);
+ request.getSession().setAttribute(Constants.SERVICE_MAP, null);
+ Hashtable errornessservice = (Hashtable)
request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
+ boolean status = false;
+ if (serviceMap != null && !serviceMap.isEmpty()) {
+ Iterator operations;
+ String serviceName;
+ Collection servicecol = serviceMap.values();
+ for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
+ AxisService axisService = (AxisService) iterator.next();
+ operations = axisService.getOperations();
+ serviceName = axisService.getName();
+%><h2><font color="blue"><a href="<%=prefix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
+<font color="blue">Service EPR : </font><font
color="black"><%=prefix +
axisService.getName()%></font><br>
+<%
+ // do we need to enable REST in the main servlet so that it handles both REST and
SOAP messages
+ boolean disableREST = false;
+ AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
+
+ Parameter parameter ;
+
+ // do we need to completely disable REST support
+ parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
+ if (parameter != null) {
+ disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
+ }
+ if (!disableREST) {
+%>
+
+<%
+%>
+<%
+ }
+
+
+ String serviceDescription = axisService.getServiceDescription();
+ if (serviceDescription == null || "".equals(serviceDescription)) {
+ serviceDescription = "No description available for this service";
+ }
+%>
+ <h4>Service Description : <font
color="black"><%=serviceDescription%></h4>
+<i><font color="blue">Service Status : <%=axisService.isActive()
? "Active" : "InActive"%></font></i><br>
+<%
+ Collection engagedModules = axisService.getEngagedModules();
+ String moduleName;
+ boolean modules_present = false;
+ if (engagedModules.size() > 0) {
+%>
+<i>Engaged modules for the service</i>
+<%
+ for (Iterator iteratorm = engagedModules.iterator(); iteratorm.hasNext();) {
+ AxisModule axisOperation = (AxisModule) iteratorm.next();
+ moduleName = axisOperation.getName();
+ if (!modules_present) {
+ modules_present = true;
+%>
+<ul>
+ <% }
+ %><li><%=moduleName%> :: <a
href="axis2-admin/disengageModule?type=service&serviceName=<%=serviceName%>&module=<%=moduleName%>">Disengage</a></li>
+ <br>
+ <%
+ }
+ if (modules_present) {%>
+</ul>
+<%
+ }
+ }
+ if (operations.hasNext()) {
+%><br><i>Available operations</i><%
+} else {
+%><i> There are no Operations specified</i><%
+ }
+%><ul><%
+ operations = axisService.getOperations();
+ while (operations.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) operations.next();
+%><li><%=axisOperation.getName().getLocalPart()%></li>
+ <%-- <br>Operation EPR : <%=prifix +
axisService.getName().getLocalPart() + "/"+
axisOperation.getName().getLocalPart()%>--%>
+ <%
+ engagedModules = axisOperation.getEngagedModules();
+ if (engagedModules.size() > 0) {
+ %>
+ <br><i>Engaged Modules for the Operation</i><ul>
+ <%
+ for (Iterator iterator2 = engagedModules.iterator(); iterator2.hasNext();) {
+ AxisModule moduleDecription = (AxisModule) iterator2.next();
+ moduleName = moduleDecription.getName();
+ %><li><%=moduleName%> :: <a
href="axis2-admin/disengageModule?type=operation&serviceName=<%=serviceName%>&operation=<%=axisOperation.getName().getLocalPart()%>&module=<%=moduleName%>">Disengage</a></li><br><%
+ }
+%></ul><%
+ }
+
+ }
+%></ul>
+<%
+ status = true;
+ }
+ }
+ if (errornessservice != null) {
+ if (errornessservice.size() > 0) {
+ request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
+%>
+<h3><font color="red">Faulty Services</font></h3>
+<%
+ Enumeration faultyservices = errornessservice.keys();
+ while (faultyservices.hasMoreElements()) {
+ String faultyserviceName = (String) faultyservices.nextElement();
+%><h3><font color="blue"><a
href="services/ListFaultyServices?serviceName=<%=faultyserviceName%>">
+ <%=faultyserviceName%></a></font></h3>
+<%
+ }
+ }
+ status = true;
+ }
+ if (!status) {
+%> No services listed! Try hitting refresh. <%
+ }
+%>
+<jsp:include page="include/adminfooter.inc" />
Added: sqlquerywebservice/src/main/webapp/axis2-web/listServices.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listServices.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listServices.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,126 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
+<%@ page import="org.apache.axis2.util.JavaUtils" %>
+<%@ page import="java.util.*" %>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<html>
+<jsp:include page="include/httpbase.jsp"/>
+<head><title>List Services</title>
+ <link href="axis2-web/css/axis-style.css" rel="stylesheet"
type="text/css"/>
+</head>
+
+<body>
+<jsp:include page="include/header.inc" />
+<jsp:include page="include/link-footer.jsp" />
+<h1>Available services</h1>
+<% String prefix = request.getAttribute("frontendHostUrl") +
(String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
+%>
+<%
+ HashMap serviceMap = (HashMap)
request.getSession().getAttribute(Constants.SERVICE_MAP);
+ request.getSession().setAttribute(Constants.SERVICE_MAP, null);
+ Hashtable errornessservice = (Hashtable)
request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
+ boolean status = false;
+ if (serviceMap != null && !serviceMap.isEmpty()) {
+ Iterator opItr;
+ //HashMap operations;
+ String serviceName;
+ Collection servicecol = serviceMap.values();
+ // Collection operationsList;
+ for (Iterator iterator = servicecol.iterator(); iterator.hasNext();) {
+ AxisService axisService = (AxisService) iterator.next();
+ opItr = axisService.getOperations();
+ //operationsList = operations.values();
+ serviceName = axisService.getName();
+%><h2><font color="blue"><a href="<%=prefix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
+<font color="blue">Service EPR : </font><font
color="black"><%=prefix +
axisService.getName()%></font><br>
+<%
+ boolean disableREST = false;
+ AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
+
+ Parameter parameter ;
+
+ // do we need to completely disable REST support
+ parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
+ if (parameter != null) {
+ disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
+ }
+
+ if (!disableREST ) {
+
+%>
+<%
+ }
+
+
+ String serviceDescription = axisService.getServiceDescription();
+ if (serviceDescription == null || "".equals(serviceDescription)) {
+ serviceDescription = "No description available for this service";
+ }
+%>
+<h4>Service Description : <font
color="black"><%=serviceDescription%></h4>
+<i><font color="blue">Service Status : <%=axisService.isActive()
? "Active" : "InActive"%></font></i><br>
+<%
+ if (opItr.hasNext()) {
+%><i>Available Operations</i><%
+} else {
+%><i> There are no Operations specified</i><%
+ }
+ opItr = axisService.getOperations();
+%><ul><%
+ while (opItr.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) opItr.next();
+%><li><%=axisOperation.getName().getLocalPart()%></li>
+ <%-- <br>Operation EPR : <%=prifix +
axisService.getName().getLocalPart() + "/"+
axisOperation.getName().getLocalPart()%>--%>
+ <%
+ }
+ %></ul>
+<%
+ status = true;
+ }
+ }
+ if (errornessservice != null) {
+ if (errornessservice.size() > 0) {
+ request.getSession().setAttribute(Constants.IS_FAULTY, Constants.IS_FAULTY);
+%>
+<hr>
+
+<h3><font color="blue">Faulty Services</font></h3>
+<%
+ Enumeration faultyservices = errornessservice.keys();
+ while (faultyservices.hasMoreElements()) {
+ String faultyserviceName = (String) faultyservices.nextElement();
+%><h3><font color="blue"><a
href="services/ListFaultyServices?serviceName=<%=faultyserviceName%>">
+ <%=faultyserviceName%></a></font></h3>
+<%
+ }
+ }
+ status = true;
+ }
+ if (!status) {
+%> No services listed! Try hitting refresh. <%
+ }
+%>
+<jsp:include page="include/footer.inc" />
+</body>
+</html>
Added: sqlquerywebservice/src/main/webapp/axis2-web/listSingleService.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/listSingleService.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/listSingleService.jsp 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,103 @@
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.description.AxisOperation" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="org.apache.axis2.description.Parameter" %>
+<%@ page import="org.apache.axis2.engine.AxisConfiguration" %>
+<%@ page import="org.apache.axis2.transport.http.AxisServlet" %>
+<%@ page import="org.apache.axis2.util.JavaUtils" %>
+<%@ page import="java.util.Hashtable" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"/>
+<h1>List Single Service</h1>
+<%
+ String prefix = request.getAttribute("frontendHostUrl") +
(String)request.getSession().getAttribute(Constants.SERVICE_PATH) + "/";
+%>
+<%
+ String isFault = (String) request.getSession().getAttribute(Constants.IS_FAULTY);
+ String servicName = request.getParameter("serviceName");
+ if (Constants.IS_FAULTY.equals(isFault)) {
+ Hashtable errornessservices = (Hashtable)
request.getSession().getAttribute(Constants.ERROR_SERVICE_MAP);
+%>
+<h3>This Axis service has deployment faults.</h3><%
+%><font color="red"><%=(String) errornessservices.get(servicName)
%></font>
+<%
+
+} else {
+
+ AxisService axisService =
+ (AxisService) request.getSession().getAttribute(Constants.SINGLE_SERVICE);
+ if (axisService != null) {
+ Iterator opItr = axisService.getOperations();
+ //operationsList = operations.values();
+ String serviceName = axisService.getName();
+%><h2><font color="blue"><a href="<%=prefix +
axisService.getName()%>?wsdl"><%=serviceName%></a></font></h2>
+<font color="blue">Service EPR : </font><font
color="black"><%=prefix +
axisService.getName()%></font><br>
+<%
+ boolean disableREST = false;
+ AxisConfiguration axisConfiguration = axisService.getAxisConfiguration();
+
+ Parameter parameter;
+
+ // do we need to completely disable REST support
+ parameter = axisConfiguration.getParameter(Constants.Configuration.DISABLE_REST);
+ if (parameter != null) {
+ disableREST = !JavaUtils.isFalseExplicitly(parameter.getValue());
+ }
+ if (!disableREST ) {
+%>
+<%
+ }
+
+
+ String serviceDescription = axisService.getServiceDescription();
+ if (serviceDescription == null || "".equals(serviceDescription)) {
+ serviceDescription = "No description available for this service";
+ }
+%>
+<h4>Service Description : <font
color="black"><%=serviceDescription%></h4>
+
+<i><font color="blue">Service Status : <%=axisService.isActive()
? "Active" : "InActive"%></font></i><br>
+<%
+ if (opItr.hasNext()) {
+%><i>Available operations</i><%
+} else {
+%><i> There are no Operations specified</i><%
+ }
+ opItr = axisService.getOperations();
+%><ul><%
+ while (opItr.hasNext()) {
+ AxisOperation axisOperation = (AxisOperation) opItr.next();
+%><li><%=axisOperation.getName().getLocalPart()%></li>
+ <%-- <br>Operation EPR : <%=prifix +
axisService.getName().getLocalPart() + "/"+
axisOperation.getName().getLocalPart()%>--%>
+ <%
+ }
+ %></ul>
+<%
+} else {
+%>
+<h3><font color="red">No services found in this
location</font></h3>
+<%
+ }
+
+ }
+%>
+<jsp:include page="include/adminfooter.inc"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/upload.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/upload.jsp (rev
0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/upload.jsp 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,68 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+
+<jsp:include page="include/adminheader.jsp"/>
+<script type="text/javascript">
+<!--
+ function checkFileUpload(){
+ if (document.getElementById('serviceUpload').value == '') {
+ alert('Please select a file before clicking the upload button.');
+ return false;
+ } else {
+ document.Axis2upload.submit();
+ }
+ }
+//-->
+</script>
+<h1>Upload an Axis Service Archive File</h1>
+
+<p>You can upload a packaged Axis2 service from this page in two small
steps.</p>
+<ul>
+ <li>Browse to the location and select the axis service archive file you wish to
upload</li>
+ <li>Click "Upload" button</li>
+</ul>
+<p>Simple as that!</p>
+
+<% if ("success".equals(request.getAttribute("status"))) { %>
+<font color="green">File <%=
request.getAttribute("filename") %> successfully uploaded
</font><br/><br/>
+<%
+} else if ("failure".equals(request.getAttribute("status"))) {
+%>
+<font color="red">The following error occurred <br/> <%=
request.getAttribute("cause") %></font><br/>
+<% } %>
+
+<form method="post" name="Axis2upload" id="Axis2upload"
action="axis2-admin/upload"
+ enctype="multipart/form-data">
+ <table>
+ <tr>
+ <td>Service archive : </td>
+ <td><input id="serviceUpload" type="file"
name="filename" size="50"/></td>
+ </tr>
+ <tr>
+ <td> </td>
+ <td><input name="upload" type="button"
onclick="javascript:checkFileUpload();" value=" Upload
"/></td>
+ </tr>
+ </table>
+</form>
+<blockquote>
+<p>Hot deployment of new service archives is
<%=request.getAttribute("hotDeployment") %></p>
+<p>Hot update of existing service archives is
<%=request.getAttribute("hotUpdate") %></p>
+</blockquote>
+<jsp:include page="include/adminfooter.inc"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/viewServiceContext.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/viewServiceContext.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/viewServiceContext.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,55 @@
+<%@ page import="org.apache.axis2.Constants" %>
+<%@ page import="org.apache.axis2.context.ConfigurationContext" %>
+<%@ page import="org.apache.axis2.context.ServiceContext" %>
+<%@ page import="org.apache.axis2.context.ServiceGroupContext" %>
+<%@ page import="org.apache.axis2.description.AxisService" %>
+<%@ page import="java.util.Hashtable" %>
+<%@ page import="java.util.Iterator" %>
+<%@ page import="java.util.Map" %>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"/>
+<h1>Running Context Hierarchy</h1>
+<%
+ ServiceContext serviceContext = (ServiceContext)
request.getSession().getAttribute("ServiceContext");
+ String type = (String) request.getSession().getAttribute("TYPE");
+ if (serviceContext != null) {
+ if (type != null) {
+ if ("VIEW".equals(type)) {
+ Iterator propertyNames = serviceContext.getPropertyNames();
+%>
+<h4>Persistance Properties</h4><ul>
+ <%
+ while (propertyNames.hasNext()) {
+ String key = (String) propertyNames.next();
+ Object property = serviceContext.getProperty(key);
+ %>
+ <li><%=key%> : <%=property.toString()%></li>
+ <%
+ }
+ %></ul>
+<%
+ }
+} else {
+%> <h4>No Service Context Found</h4><%
+ }
+ }
+%>
+<jsp:include page="include/adminfooter.inc"/>
Added: sqlquerywebservice/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/viewServiceGroupContext.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/viewServiceGroupContext.jsp 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,57 @@
+<%@ page import="org.apache.axis2.Constants"%>
+<%@ page import="org.apache.axis2.context.ConfigurationContext"%>
+<%@ page import="org.apache.axis2.context.ServiceGroupContext"%>
+<%@ page import="java.util.Hashtable"%>
+<%@ page import="java.util.Iterator"%>
+<%@ page import="java.util.Map"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Runing Context hierachy</h1>
+<%
+ String type = (String) request.getSession().getAttribute("TYPE");
+ ConfigurationContext configCtx = (ConfigurationContext)
request.getSession().getAttribute("ConfigurationContext");
+ ServiceGroupContext sgContext = (ServiceGroupContext)
request.getSession().getAttribute("ServiceGroupContext");
+ if (sgContext != null) {
+ if (type != null) {
+ if ("VIEW".equals(type)) {
+ Iterator propertyNames = sgContext.getPropertyNames();
+%>
+ <h4>Persistance properties</h4><ul>
+ <%
+ while (propertyNames.hasNext()) {
+ String key = (String) propertyNames.next();
+ Object property = sgContext.getProperty(key);
+ %>
+ <li><%=key%> : <%=property.toString()%></li>
+ <%
+ }
+ %></ul>
+ <%
+ } else if("DELETE".equals(type)){
+ configCtx.removeServiceGroupContext(sgContext.getId());
+ %>Removed the context<%
+ }
+ }
+ } else {
+%> <h4>No service group context found</h4><%
+ }
+%>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/axis2-web/viewphases.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/axis2-web/viewphases.jsp
(rev 0)
+++ sqlquerywebservice/src/main/webapp/axis2-web/viewphases.jsp 2010-06-08 21:26:55 UTC
(rev 2208)
@@ -0,0 +1,112 @@
+ <%--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you 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.
+ --%>
+<%@ page import="org.apache.axis2.Constants,
+ org.apache.axis2.engine.Phase,
+ java.util.ArrayList"%>
+ <%@ page import="org.apache.axis2.deployment.util.PhasesInfo"%>
+<%@ page contentType="text/html;charset=UTF-8" language="java"
%>
+<jsp:include page="include/adminheader.jsp"></jsp:include>
+<h1>Available Phases</h1>
+ <%
+ PhasesInfo phases =
(PhasesInfo)request.getSession().getAttribute(Constants.PHASE_LIST);
+ request.getSession().setAttribute(Constants.PHASE_LIST,null);
+ ArrayList tempList = phases.getGlobalInflow();
+ %><h2><font color="blue">System Pre-defined
Phases</font></h2>
+ <b>InFlow Up to Dispatcher</b>
+ <blockquote>
+ <%
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>InFaultFlow </b>
+ <blockquote>
+ <%
+ tempList = phases.getGlobalInFaultPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>OutFlow </b>
+ <blockquote>
+ <%
+ tempList = phases.getGlobalOutPhaseList();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>OutFaultFlow </b>
+ <blockquote>
+ <%
+ tempList = phases.getOUT_FaultPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <br>
+ <h2><font color="blue">User Defined
Phases</font></h2>
+ <b>Inflow after Dispatcher</b>
+ <blockquote>
+ <%
+ tempList = phases.getOperationInPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>InFaultFlow after Dispatcher</b>
+ <blockquote>
+ <%
+ tempList = phases.getOperationInFaultPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>OutFlow </b>
+ <blockquote>
+ <%
+ tempList = phases.getOperationOutPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+ <b>OutFaultFlow </b>
+ <blockquote>
+ <%
+ tempList = phases.getOperationOutFaultPhases();
+ for (int i = 0; i < tempList.size(); i++) {
+ Phase phase = (Phase) tempList.get(i);
+ %><%=phase.getPhaseName()%><br><%
+ }
+ %>
+ </blockquote>
+<jsp:include page="include/adminfooter.inc"></jsp:include>
Added: sqlquerywebservice/src/main/webapp/images/mmlogo.gif
===================================================================
(Binary files differ)
Property changes on: sqlquerywebservice/src/main/webapp/images/mmlogo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: sqlquerywebservice/src/main/webapp/index.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/index.jsp (rev 0)
+++ sqlquerywebservice/src/main/webapp/index.jsp 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,187 @@
+<%@ page import="com.metamatrix.common.util.WSDLServletUtil" %>
+
+<!--
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+-->
+<html>
+ <head>
+ <title>JBEDSP Web Service Utilities</title>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+ <style type="text/css">
+ <!--
+ .MMSOAPTitle {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 18pt;
+ font-style: normal;
+ font-weight: bold
+ }
+
+ .deprecated {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12pt;
+ font-style: italic;
+ color: red;
+ font-weight: bold
+ }
+
+ a {
+ visited : #666699; link: #666699; active: #666699;
+ hover: #1E90FF; text-decoration: none;
+ }
+}
+
+ -->
+ </style>
+ </head>
+ <body bgcolor="#FFFFFF">
+ <div align="center">
+ <p><table width="900" border="0"
cellspacing="0" cellpadding="0">
+ <tr bgcolor="#edf0f6">
+ <td colspan="2" align="center">
+ <span class="MMSOAPTitle"><a
href="http://www.jboss.com/products/platforms/dataservices/"
target="_blank">JBoss Enterprise Data Services Platform
(JBEDSP)</a></span>
+ </td>
+ </tr>
+ <tr bgcolor="#edf0f6">
+ <td colspan="2" align="center">
+ <span class="MMSOAPTitle"> Web Service
Utilities</span>
+ </td>
+ </tr>
+ <tr>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"
class="MMSOAPTitle"><b><u>JBEDSP Web Service WSDL URL
Generator</u></b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"><b>VDBs that contain Web Service models
expose WSDL when deployed to a JBEDSP Server that describes the web service operations in
those models. This form can be used to generate a parameterized WSDL URL for such a
VDB.</b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td><a href="wsdlurlframe.htm" target="_self"
title="Web Service WSDL URL Generator">Web Service WSDL URL
Generator</a><td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"
class="MMSOAPTitle"><b><u>Discover JBEDSP Web
Services</u></b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"><b>To auto discover web service VDB WSDL
URLs using predefined JBEDSP server values, the JBEDSP Server or cluster of JBEDSP servers
must be defined in the web.xml file of the JBEDSP SOAP web application. This WSDL URL is
more concise than the parameterized version, but is only valid with JBEDSP SOAP web
applications were the JBEDSP server values have been defined.</b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td><a href="<%= request.getContextPath()
%>/servlet/DiscoverWSDLServlet" target="wsdlUrls" title="Discover
MetaMatrix Web Services">Discover JBEDSP Web Services</a><td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"
class="MMSOAPTitle"><b><u>SQL Query Web Service
WSDL</u></b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"><b>Click on the link below to view the SQL
Query Web Service WSDL for this server.</b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td align="left"><a target="_blank"
href="<%= WSDLServletUtil.getSqlQueryWebServiceUrl(request.getServerName(),
request.getContextPath(), false) %>" title="SQL Query Web Service WSDL
(Non-secure)">SQL Query Web Service WSDL (Non-secure)</a><td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td align="left"><a target="_blank"
href="<%= WSDLServletUtil.getSqlQueryWebServiceUrl(request.getServerName(),
request.getContextPath(), true) %>" title="SQL Query Web Service WSDL (Secure
SSL)">SQL Query Web Service WSDL (Secure SSL)</a><td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td colspan="2"><hr><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+<!-- <tr>
+ <td colspan="2"><b>Click on the link below to view the Web
Service Utilites page for the <span
class="deprecated">DEPRECATED</span> SQL Query Web
Service</b><td>
+ </tr>
+ <tr>
+ <td> <td>
+ <td> <td>
+ </tr>
+ <tr>
+ <td align="left" colspan="2"><a
href="deprecated.jsp" alt="Deprecated SQL Query Web Service Utilities
Page"><span class="deprecated">(DEPRECATED)</span> SQL Query
Web Service Web Service Utilies Page</a><td>
+ </tr>
+ -->
+ </table>
+</div>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/wsdlurlframe.htm
===================================================================
--- sqlquerywebservice/src/main/webapp/wsdlurlframe.htm (rev 0)
+++ sqlquerywebservice/src/main/webapp/wsdlurlframe.htm 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,38 @@
+<!--
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+-->
+<HTML>
+ <HEAD>
+ <TITLE>Teiid Data Services Platform WSDL URL Generator</TITLE>
+ </HEAD>
+<FRAMESET name="mainframeset" rows="85%,*"
framespacing="2" >
+ <FRAME name="form" src="wsdlurlgen.jsp"
MARGINHEIGHT="3" frameborder="1">
+ <FRAME name="wsdlUrl" src="" MARGINHEIGHT="3"
scrolling=yes frameborder="1">
+</FRAMESET>
+<noframes>
+ <body bgcolor="#FFFFFF" text="#000000">
+ This application requires frame support from the browser.
+ </body>
+</noframes>
+</html>
+
Added: sqlquerywebservice/src/main/webapp/wsdlurlgen.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/wsdlurlgen.jsp (rev 0)
+++ sqlquerywebservice/src/main/webapp/wsdlurlgen.jsp 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,141 @@
+<%@ page import="com.metamatrix.soap.util.ServletClientConstants" %>
+<%@ page import="com.metamatrix.soap.util.SOAPConstants" %>
+<%@ page import="javax.naming.Context" %>
+<%@ page import="javax.naming.InitialContext" %>
+<%@ page import="javax.naming.NamingException" %>
+<html>
+<!--
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+-->
+<%
+ String targetServer = request.getServerName();
+ int targetPort = request.getServerPort();
+ %>
+ <head>
+
+
+ <title>Teiid Data Services Platform WSDL URL Generator</title>
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+ <style type="text/css">
+ <!--
+ .MMSOAPTitle {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 18pt;
+ font-style: normal;
+ font-weight: bold;
+ }
+
+ a {
+ visited : #666699; link: #666699; active: #666699;
+ hover: #1E90FF; text-decoration: none;
+ }
+ -->
+ .required { font-family: Arial, Helvetica, sans-serif; font-size: 10pt; color: red;
font-weight: bold; }
+ </style>
+ </head>
+
+ <body bgcolor="#FFFFFF">
+ <div align="center">
+ <p>
+ <table width="900" border="0" cellspacing="0"
cellpadding="0">
+ <tr bgcolor="#edf0f6">
+ <td align="center"><span class="MMSOAPTitle">
+ <a
href="http://www.jboss.com/products/platforms/dataservices/"
target="_blank">JBoss Enterprise Data Services Platform
(JBEDSP)</a></span>
+ </td>
+ </tr>
+ <tr bgcolor="#edf0f6">
+ <td align="center"><span class="MMSOAPTitle">
WSDL URL Generator</span>
+ </td>
+ </tr>
+ </table>
+ </p>
+ <p> </p>
+ <form name="form" method="post" target="wsdlUrl"
ACTION="<%= request.getContextPath() %>/servlet/WSDLURLGenerator">
+ <p><b>JBEDSP Server Information</b> (use commas to delimit
multiple host:port combinations)</p>
+ <table width="66%" border="0" cellspacing="0"
cellpadding="0" bgcolor="#edf0f6">
+ <tr>
+ <td width="48%"><b>JBEDSP Server
host:port</b><span class='required'> *</span>
</td>
+ <td width="52%">
+ <input type="text" name="MMServerHostAndPort"
value="<mmServerHost>:<mmServerPort>" size="80">
+ </td>
+ </tr>
+ </table>
+ <p><b>JBEDSP VDB Information</b> </p>
+ <table width="25%" border="0" cellspacing="0"
cellpadding="0" bgcolor="#edf0f6">
+ <tr>
+ <td width="54%">
+ <div align="center"><b>VDB Name</b><span
class='required'> *</span> </div>
+ </td>
+ <td width="46%">
+ <div align="center" title="Optional - the latest active
version will be used if not entered."><b>VDB Version
<br/></b></div>
+ </td>
+ </tr>
+ <tr>
+ <td width="54%">
+ <input type="text" name="VDBName"
value="<vdbName>">
+ </td>
+ <td width="46%">
+ <input type="text" name="VDBVersion"
value="" title="Optional - the latest active version will be used if not
entered.">
+ </td>
+ </tr>
+ </table>
+ <p><b>WSDL URL Options</b></p>
+ <table width="66%" border="0" cellspacing="0"
cellpadding="0" bgcolor="#edf0f6">
+ <tr>
+ <td width="48%"><b>Target Webservice
Host</b><span class='required'> *</span> </td>
+ <td width="52%">
+ <input type="text" name="TargetHost"
value="<%=targetServer%>" size="80">
+ </td>
+ </tr>
+ <tr>
+ <td width="48%"><b>Target Webservice Port</b>
</td>
+ <td width="52%">
+ <input type="text" name="TargetPort"
value="<%=targetPort%>" size="10">
+ </td>
+ </tr>
+ <tr>
+ <td width="48%"><b>Use Secure JBEDSP Protocol (mms)
</b><span class='required'> *</span></td>
+ <td width="52%">
+ <input type="checkbox" name="Secure"
value="Secure">
+ </td>
+ </tr>
+ <tr>
+ <TD ALIGN="center" colspan='3'> </TD>
+ </TR>
+ </tr>
+ <TR ALIGN="center" VALIGN="middle">
+ <TD ALIGN="center" colspan='3'><span
class='required'>* = Required Field</span></TD>
+ </TR>
+ </div>
+ </table>
+ <p> </p>
+ <p>
+ <input type="submit" name="submit" value="Get WSDL
URL">
+ </p>
+ <p>
+ <a href="index.jsp" target="_top">Back to Web Service
Utilities page</a>
+ </p>
+ </form>
+ </div>
+ </body>
+</html>
Added: sqlquerywebservice/src/main/webapp/wsdlurls.jsp
===================================================================
--- sqlquerywebservice/src/main/webapp/wsdlurls.jsp (rev 0)
+++ sqlquerywebservice/src/main/webapp/wsdlurls.jsp 2010-06-08 21:26:55 UTC (rev 2208)
@@ -0,0 +1,90 @@
+<%@ page import="com.metamatrix.common.util.WSDLServletUtil"%>
+<%@ page import="com.metamatrix.soap.object.WSDLUrl"%>
+<%@ page import="java.util.List"%>
+<%@ page import="java.util.Iterator"%>
+<!--
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+-->
+<html>
+<%
+
+ List wsdlUrls = (List) session
+ .getAttribute(WSDLServletUtil.DISCOVERED_WSDL);
+
+ %>
+<head>
+
+
+<title>JBoss Enterprise Data Services Platform (JBEDSP) WSDL URLs for Active
Deployed Web Service Virtual
+Databases</title>
+<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
+<style type="text/css">
+ <!--
+ .MMSOAPTitle {
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 18pt;
+ font-style: normal;
+ font-weight: bold
+ }
+
+ a {
+ visited : #666699; link: #666699; active: #666699;
+ hover: #1E90FF; text-decoration: none;
+ }
+}
+
+ -->
+ </style>
+</head>
+
+<body bgcolor="#FFFFFF">
+<table width="900" border="0" cellspacing="1"
cellpadding="1">
+ <tr bgcolor="#edf0f6">
+ <td width="300"><span class="MMSOAPTitle"><a
href="http://www.jboss.com/products/platforms/dataservices/">...
+ <td width="600">JBEDSP Active Web Service VDB
+ URLs</span></td>
+ </tr>
+ <tr>
+ <td colspan="2">
+ <hr />
+ </td>
+ </tr>
+ <tr width="900">
+ <%Iterator wsdlUrlIter = wsdlUrls.listIterator();
+ if (wsdlUrls.size() == 0) {
+
+ %>
+ <td colspan="2">No active MetaMatrix Web Service VDBs were
discovered.</td>
+ <%} else {
+ while (wsdlUrlIter.hasNext()) {
+ WSDLUrl wsdlUrl = (WSDLUrl) wsdlUrlIter.next();
+ %>
+ <td colspan="2"><a href="<%= wsdlUrl.toString()
%>"><%=wsdlUrl.toString()%></a></td>
+ </tr>
+ <%}
+ }
+
+ %>
+</table>
+</body>
+</html>
Added: sqlquerywebservice/src/main/wsdl/SqlQueryWebService.wsdl
===================================================================
--- sqlquerywebservice/src/main/wsdl/SqlQueryWebService.wsdl (rev
0)
+++ sqlquerywebservice/src/main/wsdl/SqlQueryWebService.wsdl 2010-06-08 21:26:55 UTC (rev
2208)
@@ -0,0 +1,532 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
targetNamespace="http://service.sqlquerywebservice.soap.metamatrix.com"
xmlns:axis2="http://service.sqlquerywebservice.soap.metamatrix.com"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:ns="http://service.sqlquerywebservice.soap.metamatrix.com/xsd&...
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://helper.sqlquerywebservice.soap.metamatrix.co...
xmlns:ax21="http://helper.sqlquerywebservice.soap.metamatrix.com/xsd...
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="LogInParameters"
type="ax21:LogInParameters"/>
+<xs:complexType name="LogInParameters">
+<xs:sequence>
+<xs:element name="connectionPayload" nillable="true"
type="xs:string"/>
+<xs:element name="mmServerUrl" nillable="true"
type="xs:string"/>
+<xs:element maxOccurs="unbounded" name="optionalProperties"
nillable="true" type="ax21:Property"/>
+<xs:element name="vdbName" nillable="true"
type="xs:string"/>
+<xs:element name="vdbVersion" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Property" type="ax21:Property"/>
+<xs:complexType name="Property">
+<xs:sequence>
+<xs:element name="propertyName" nillable="true"
type="xs:string"/>
+<xs:element name="propertyValue" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Connection" type="ax21:Connection"/>
+<xs:complexType name="Connection">
+<xs:sequence>
+<xs:element name="connectionId" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="ConnectionContextualRequest"
type="ax21:ConnectionContextualRequest"/>
+<xs:complexType name="ConnectionContextualRequest">
+<xs:sequence>
+<xs:element name="connection" nillable="true"
type="ax21:Connection"/>
+<xs:element name="requestInfo" nillable="true"
type="ax21:RequestInfo"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="RequestInfo" type="ax21:RequestInfo"/>
+<xs:complexType name="RequestInfo">
+<xs:sequence>
+<xs:element maxOccurs="unbounded" name="bindParameters"
nillable="true" type="xs:string"/>
+<xs:element name="commandPayload" nillable="true"
type="xs:string"/>
+<xs:element name="cursorType" nillable="true"
type="ax21:CursorType"/>
+<xs:element name="fetchSize" type="xs:int"/>
+<xs:element name="partialResults" type="xs:boolean"/>
+<xs:element name="requestType" nillable="true"
type="ax21:RequestType"/>
+<xs:element name="sqlString" nillable="true"
type="xs:string"/>
+<xs:element name="transactionAutoWrapMode" minoccurs="0"
nillable="true" type="ax21:TransactionAutoWrapType"/>
+<xs:element name="useResultSetCache" type="xs:boolean"/>
+<xs:element name="xmlFormat" nillable="true"
type="xs:string"/>
+<xs:element name="xmlStyleSheet" nillable="true"
type="xs:string"/>
+<xs:element name="xmlValidationMode" type="xs:boolean"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="CursorType" type="ax21:CursorType"/>
+<xs:complexType name="CursorType">
+<xs:sequence>
+<xs:element name="discriminator" type="xs:int"/>
+<xs:element name="value" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="RequestType" type="ax21:RequestType"/>
+<xs:complexType name="RequestType">
+<xs:sequence>
+<xs:element name="discriminator" type="xs:int"/>
+<xs:element name="value" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="TransactionAutoWrapType"
type="ax21:TransactionAutoWrapType"/>
+<xs:complexType name="TransactionAutoWrapType">
+<xs:sequence>
+<xs:element name="discriminator" type="xs:int"/>
+<xs:element name="value" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="RequestId" type="ax21:RequestId"/>
+<xs:complexType name="RequestId">
+<xs:sequence>
+<xs:element name="connectionId" nillable="true"
type="xs:string"/>
+<xs:element name="id" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="ConnectionlessRequest"
type="ax21:ConnectionlessRequest"/>
+<xs:complexType name="ConnectionlessRequest">
+<xs:sequence>
+<xs:element name="includeMetadata" type="xs:boolean"/>
+<xs:element name="maxRowsReturned" type="xs:int"/>
+<xs:element name="parameters" nillable="true"
type="ax21:LogInParameters"/>
+<xs:element name="requestInfo" nillable="true"
type="ax21:RequestInfo"/>
+<xs:element name="timeToWait" type="xs:int"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Results" type="ax21:Results"/>
+<xs:complexType name="Results">
+<xs:sequence>
+<xs:element name="beginRow" type="xs:int"/>
+<xs:element name="data" nillable="true"
type="ax21:Data"/>
+<xs:element name="endRow" type="xs:int"/>
+<xs:element name="hasData" type="xs:boolean"/>
+<xs:element maxOccurs="unbounded" name="outputParameters"
type="xs:anyType"/>
+<xs:element maxOccurs="unbounded" name="sqlWarnings"
nillable="true" type="ax21:SqlWarning"/>
+<xs:element name="updateCount" type="xs:int"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Data" type="ax21:Data"/>
+<xs:complexType name="Data">
+<xs:sequence>
+<xs:element name="last" type="xs:boolean"/>
+<xs:element maxOccurs="unbounded" name="metadataArray"
nillable="true" type="ax21:ColumnMetadata"/>
+<xs:element maxOccurs="unbounded" name="rows"
nillable="true" type="ax21:Row"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="ColumnMetadata" type="ax21:ColumnMetadata"/>
+<xs:complexType name="ColumnMetadata">
+<xs:sequence>
+<xs:element name="autoIncrement" type="xs:boolean"/>
+<xs:element name="caseSensitive" type="xs:boolean"/>
+<xs:element name="columnClassName" nillable="true"
type="xs:string"/>
+<xs:element name="columnDataType" nillable="true"
type="xs:string"/>
+<xs:element name="columnDisplaySize" type="xs:int"/>
+<xs:element name="columnName" nillable="true"
type="xs:string"/>
+<xs:element name="currency" type="xs:boolean"/>
+<xs:element name="getColumnLabel" nillable="true"
type="xs:string"/>
+<xs:element name="nullable" type="xs:boolean"/>
+<xs:element name="precision" type="xs:int"/>
+<xs:element name="readOnly" type="xs:boolean"/>
+<xs:element name="scale" type="xs:int"/>
+<xs:element name="searchable" type="xs:boolean"/>
+<xs:element name="signed" type="xs:boolean"/>
+<xs:element name="tableName" nillable="true"
type="xs:string"/>
+<xs:element name="virtualDatabaseName" nillable="true"
type="xs:string"/>
+<xs:element name="virtualDatabaseVersion" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Row" type="ax21:Row"/>
+<xs:complexType name="Row">
+<xs:sequence>
+<xs:element maxOccurs="unbounded" name="cells"
nillable="true" type="ax21:Cell"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="Cell" type="ax21:Cell"/>
+<xs:complexType name="Cell">
+<xs:sequence>
+<xs:element name="value" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="SqlWarning" type="ax21:SqlWarning"/>
+<xs:complexType name="SqlWarning">
+<xs:sequence>
+<xs:element name="message" nillable="true"
type="xs:string"/>
+</xs:sequence>
+</xs:complexType>
+<xs:element name="ResultsRequest" type="ax21:ResultsRequest"/>
+<xs:complexType name="ResultsRequest">
+<xs:sequence>
+<xs:element name="endRow" type="xs:int"/>
+<xs:element name="includeMetadata" type="xs:boolean"/>
+<xs:element name="requestId" nillable="true"
type="ax21:RequestId"/>
+<xs:element name="startRow" type="xs:int"/>
+<xs:element name="timeToWait" type="xs:int"/>
+</xs:sequence>
+</xs:complexType>
+</xs:schema>
+ <xs:schema attributeFormDefault="qualified"
elementFormDefault="qualified"
targetNamespace="http://service.sqlquerywebservice.soap.metamatrix.c...
xmlns:ns0="http://helper.sqlquerywebservice.soap.metamatrix.com/xsd&...
xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="getConnectionFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="getConnectionFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getConnection">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="params" nillable="true"
type="ns0:LogInParameters"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getConnectionResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="return" nillable="true"
type="ns0:Connection"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="executeFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="executeFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="execute">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="request" nillable="true"
type="ns0:ConnectionContextualRequest"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="executeResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="return" nillable="true"
type="ns0:RequestId"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="executeBlockingFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="executeBlockingFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="executeBlocking">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="request" nillable="true"
type="ns0:ConnectionlessRequest"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="executeBlockingResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="return" nillable="true"
type="ns0:Results"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getResultsFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="getResultsFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getResults">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="resultsRequest" nillable="true"
type="ns0:ResultsRequest"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="getResultsResponse">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="return" nillable="true"
type="ns0:Results"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="closeConnectionFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="closeConnectionFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="closeConnection">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="connection" nillable="true"
type="ns0:Connection"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="terminateRequestFault">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="terminateRequestFault" type="xs:anyType"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+<xs:element name="terminateRequest">
+<xs:complexType>
+<xs:sequence>
+<xs:element name="requestId" nillable="true"
type="ns0:RequestId"/>
+</xs:sequence>
+</xs:complexType>
+</xs:element>
+</xs:schema>
+ </wsdl:types>
+ <wsdl:message name="terminateRequestFault">
+ <wsdl:part name="part1"
element="ns:terminateRequestFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="closeConnectionFault">
+ <wsdl:part name="part1" element="ns:closeConnectionFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeBlockingMessage">
+ <wsdl:part name="part1" element="ns:executeBlocking">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeBlockingResponseMessage">
+ <wsdl:part name="part1"
element="ns:executeBlockingResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="closeConnectionMessage">
+ <wsdl:part name="part1" element="ns:closeConnection">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getConnectionMessage">
+ <wsdl:part name="part1" element="ns:getConnection">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeFault">
+ <wsdl:part name="part1" element="ns:executeFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getResultsMessage">
+ <wsdl:part name="part1" element="ns:getResults">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getResultsResponseMessage">
+ <wsdl:part name="part1" element="ns:getResultsResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeBlockingFault">
+ <wsdl:part name="part1" element="ns:executeBlockingFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getConnectionFault">
+ <wsdl:part name="part1" element="ns:getConnectionFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getResultsFault">
+ <wsdl:part name="part1" element="ns:getResultsFault">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="terminateRequestMessage">
+ <wsdl:part name="part1" element="ns:terminateRequest">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="getConnectionResponseMessage">
+ <wsdl:part name="part1"
element="ns:getConnectionResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeMessage">
+ <wsdl:part name="part1" element="ns:execute">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:message name="executeResponseMessage">
+ <wsdl:part name="part1" element="ns:executeResponse">
+ </wsdl:part>
+ </wsdl:message>
+ <wsdl:portType name="SqlQueryWebServicePortType">
+ <wsdl:operation name="getConnection">
+ <wsdl:input message="axis2:getConnectionMessage">
+ </wsdl:input>
+ <wsdl:output message="axis2:getConnectionResponseMessage">
+ </wsdl:output>
+ <wsdl:fault name="getConnectionFault"
message="axis2:getConnectionFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="execute">
+ <wsdl:input message="axis2:executeMessage">
+ </wsdl:input>
+ <wsdl:output message="axis2:executeResponseMessage">
+ </wsdl:output>
+ <wsdl:fault name="executeFault"
message="axis2:executeFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="executeBlocking">
+ <wsdl:input message="axis2:executeBlockingMessage">
+ </wsdl:input>
+ <wsdl:output message="axis2:executeBlockingResponseMessage">
+ </wsdl:output>
+ <wsdl:fault name="executeBlockingFault"
message="axis2:executeBlockingFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getResults">
+ <wsdl:input message="axis2:getResultsMessage">
+ </wsdl:input>
+ <wsdl:output message="axis2:getResultsResponseMessage">
+ </wsdl:output>
+ <wsdl:fault name="getResultsFault"
message="axis2:getResultsFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="closeConnection">
+ <wsdl:input message="axis2:closeConnectionMessage">
+ </wsdl:input>
+ <wsdl:fault name="closeConnectionFault"
message="axis2:closeConnectionFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="terminateRequest">
+ <wsdl:input message="axis2:terminateRequestMessage">
+ </wsdl:input>
+ <wsdl:fault name="terminateRequestFault"
message="axis2:terminateRequestFault">
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="SqlQueryWebServiceSOAP11Binding"
type="axis2:SqlQueryWebServicePortType">
+ <soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getConnection">
+ <soap:operation soapAction="urn:getConnection"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="getConnectionFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="execute">
+ <soap:operation soapAction="urn:execute"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="executeFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="executeBlocking">
+ <soap:operation soapAction="urn:executeBlocking"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="executeBlockingFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getResults">
+ <soap:operation soapAction="urn:getResults"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="getResultsFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="closeConnection">
+ <soap:operation soapAction="urn:closeConnection"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:fault name="closeConnectionFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="terminateRequest">
+ <soap:operation soapAction="urn:terminateRequest"
style="document"/>
+ <wsdl:input>
+ <soap:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:fault name="terminateRequestFault">
+ <soap:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="SqlQueryWebServiceSOAP12Binding"
type="axis2:SqlQueryWebServicePortType">
+ <soap12:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
+ <wsdl:operation name="getConnection">
+ <soap12:operation soapAction="urn:getConnection"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="getConnectionFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="execute">
+ <soap12:operation soapAction="urn:execute"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="executeFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="executeBlocking">
+ <soap12:operation soapAction="urn:executeBlocking"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="executeBlockingFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="getResults">
+ <soap12:operation soapAction="urn:getResults"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:output>
+ <wsdl:fault name="getResultsFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="closeConnection">
+ <soap12:operation soapAction="urn:closeConnection"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:fault name="closeConnectionFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ <wsdl:operation name="terminateRequest">
+ <soap12:operation soapAction="urn:terminateRequest"
style="document"/>
+ <wsdl:input>
+ <soap12:body use="literal"
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"/>
+ </wsdl:input>
+ <wsdl:fault name="terminateRequestFault">
+ <soap12:body
namespace="http://service.sqlquerywebservice.soap.metamatrix.com"
use="literal"/>
+ </wsdl:fault>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="SqlQueryWebService">
+ <wsdl:port name="SqlQueryWebServiceSOAP11port"
binding="axis2:SqlQueryWebServiceSOAP11Binding">
+ <soap:address
location="http://192.168.10.120:8080/metamatrix-soap/services/SqlQueryWebService"/>
+ </wsdl:port>
+ <wsdl:port name="SqlQueryWebServiceSOAP12port"
binding="axis2:SqlQueryWebServiceSOAP12Binding">
+ <soap12:address
location="http://slwxp156:8080/metamatrix-soap/services/SqlQueryWebServiceSqlQueryWebService"/>
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/handler/TestActionUpdateHandler.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/handler/TestActionUpdateHandler.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/handler/TestActionUpdateHandler.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.handler;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.context.MessageContext;
+
+import com.metamatrix.common.util.WSDLServletUtil;
+
+public class TestActionUpdateHandler extends TestCase{
+
+ public void testgetServerPropertyMap1() {
+
+ Map expectedMap = new HashMap();
+ expectedMap.put(WSDLServletUtil.VDB_NAME_KEY, "BooksWsdl"); //$NON-NLS-1$
+ expectedMap.put(WSDLServletUtil.VDB_VERSION_KEY, "1"); //$NON-NLS-1$
+ expectedMap.put(WSDLServletUtil.ADD_PROPS, null);
+ expectedMap.put(ActionUpdateHandler.VIRTUAL_PROCEDURE,
"BooksWebService.Books.getBookCollection"); //$NON-NLS-1$
+
+ MessageContext messageContext = new MessageContext();
+ messageContext.getOptions().setAction("VDBName=BooksWsdl&VDBVersion=1&AdditionalProperties=&procedure=BooksWebService.Books.getBookCollection");
//$NON-NLS-1$
+ Map actualMap = ActionUpdateHandler.getServerPropertyMap(null, messageContext);
+
+ assertEquals(expectedMap.get(WSDLServletUtil.VDB_NAME_KEY),
actualMap.get(WSDLServletUtil.VDB_NAME_KEY));
+ assertEquals(expectedMap.get(WSDLServletUtil.VDB_VERSION_KEY),
actualMap.get(WSDLServletUtil.VDB_VERSION_KEY));
+ assertEquals(expectedMap.get(WSDLServletUtil.ADD_PROPS),
actualMap.get(WSDLServletUtil.ADD_PROPS));
+ assertEquals(expectedMap.get(ActionUpdateHandler.VIRTUAL_PROCEDURE),
actualMap.get(ActionUpdateHandler.VIRTUAL_PROCEDURE));
+ }
+
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestBasicConnectionPoolFactory.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestBasicConnectionPoolFactory.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestBasicConnectionPoolFactory.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @since 4.3
+ */
+public class TestBasicConnectionPoolFactory extends TestCase {
+
+
+ private static final String TEST_PROPERTY_VALUE = "test"; //$NON-NLS-1$
+
+ /*
+ * Test method for
'com.metamatrix.soap.service.BasicConnectionPoolFactory.getProperty(String)'
+ */
+ public void testGetPropertyWSystemPropertySet() {
+ System.setProperty(ConnectionPoolFactory.INITIAL_POOL_SIZE_PROPERTY_KEY,
TEST_PROPERTY_VALUE);
+ assertEquals(TEST_PROPERTY_VALUE,
BasicConnectionPoolFactory.createMergedProperties(new
Properties()).getProperty(ConnectionPoolFactory.INITIAL_POOL_SIZE_PROPERTY_KEY));
+ }
+
+ public void testGetPropertyRetreiveDefault() {
+
assertEquals(String.valueOf(BasicConnectionPoolFactory.MAX_ACTIVE_CONNECTIONS_DEFAULT),
BasicConnectionPoolFactory.createMergedProperties(new
Properties()).getProperty(ConnectionPoolFactory.MAX_ACTIVE_CONNECTIONS_PROPERTY_KEY));
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestDataServiceWebServiceImpl.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestDataServiceWebServiceImpl.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestDataServiceWebServiceImpl.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.AxisFault;
+
+import com.metamatrix.common.util.WSDLServletUtil;
+
+/**
+ *
+ */
+public class TestDataServiceWebServiceImpl extends TestCase {
+
+ private DataServiceWebServiceImpl impl = new DataServiceWebServiceImpl();
+
+
+ public void testGetAuthenticationProperties() {
+ DataServiceWebServiceImpl impl = new DataServiceWebServiceImpl();
+ Properties props = impl.getAuthenticationProperties("test",
"this"); //$NON-NLS-1$ //$NON-NLS-2$
+
+ if
(!("test".equals(props.getProperty(DataServiceWebServiceImpl.USER_NAME))
&&
"this".equals(props.getProperty(DataServiceWebServiceImpl.PASSWORD)))) {
//$NON-NLS-1$ //$NON-NLS-2$
+ fail();
+ }
+
+ }
+
+ public void testGetQueryTimeoutWOutValue() {
+
+ int queryTimeout = getDataServiceWebServiceImpl().getQueryTimeout();
+ assertEquals(0,queryTimeout);
+ }
+
+ public void testCreateFault() {
+ try{
+ getDataServiceWebServiceImpl().createSOAPFaultMessage(new Exception("Something
bad happened"),"Really, something bad happened","Server");
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }catch(AxisFault fault){
+ assertEquals("Really, something bad happened",fault.getMessage());
//$NON-NLS-1$
+ }
+
+ }
+
+ public void testGetQueryTimeoutWNonIntegerValue() {
+
+ System.setProperty(WSDLServletUtil.MM_WEBSERVICE_QUERY_TIMEOUT,
"V");//$NON-NLS-1$
+ int queryTimeout = getDataServiceWebServiceImpl().getQueryTimeout();
+ assertEquals(0,queryTimeout);
+ }
+
+ public void testGetQueryTimeoutWGoodValue() {
+
+ System.setProperty(WSDLServletUtil.MM_WEBSERVICE_QUERY_TIMEOUT,
"600000");//$NON-NLS-1$
+ int queryTimeout = getDataServiceWebServiceImpl().getQueryTimeout();
+ assertEquals(600000,queryTimeout);
+ }
+
+ public void testGetQueryTimeoutWNULLValue() {
+
+ System.setProperty(WSDLServletUtil.MM_WEBSERVICE_QUERY_TIMEOUT,
"");//$NON-NLS-1$
+ int queryTimeout = getDataServiceWebServiceImpl().getQueryTimeout();
+ assertEquals(0,queryTimeout);
+ }
+
+ private DataServiceWebServiceImpl getDataServiceWebServiceImpl() {
+ return impl;
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestPoolingConnectionSource.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestPoolingConnectionSource.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/service/TestPoolingConnectionSource.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,74 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.service;
+
+import java.sql.SQLException;
+import java.util.Properties;
+
+import javax.sql.DataSource;
+
+import junit.framework.TestCase;
+
+import com.metamatrix.core.util.SimpleMock;
+
+
+/**
+ * @since 4.3
+ */
+public class TestPoolingConnectionSource extends TestCase {
+
+ private static final Properties connectionProperties = new Properties();
+
+ static {
+ connectionProperties.setProperty(ConnectionSource.USERNAME,
"fakeUsername"); //$NON-NLS-1$
+ connectionProperties.setProperty(ConnectionSource.PASSWORD,
"fakePassword"); //$NON-NLS-1$
+ connectionProperties.setProperty(ConnectionSource.SERVER_URL,
"jdbc:metamatrix:vdbName@Host:port;password=xxx"); //$NON-NLS-1$
+
+ }
+
+ /*
+ * Test method for
'com.metamatrix.soap.service.PoolingConnectionSource.getConnection(Properties)'
+ */
+ public void testGetConnection() throws SQLException {
+ PoolingConnectionSource source = new PoolingConnectionSource(new
ConnectionPoolFactory() {
+
+ public javax.sql.DataSource createConnectionPool(Properties
connectionProperties) {
+ return SimpleMock.createSimpleMock(DataSource.class);
+ }
+
+ });
+
+ assertFalse(source.hasPool(connectionProperties));
+
+ source.getConnection(connectionProperties);
+
+ Properties retreivalProps = new Properties();
+ retreivalProps.setProperty(ConnectionSource.USERNAME, "fakeUsername");
//$NON-NLS-1$
+ retreivalProps.setProperty(ConnectionSource.PASSWORD, "fakePassword");
//$NON-NLS-1$
+ retreivalProps.setProperty(ConnectionSource.SERVER_URL,
"jdbc:metamatrix:vdbName@Host:port;password=xxx"); //$NON-NLS-1$
+
+ assertTrue(source.hasPool(retreivalProps));
+
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetVDBResourceServlet.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetVDBResourceServlet.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetVDBResourceServlet.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.servlet;
+
+import java.util.Map;
+import java.util.TreeMap;
+
+import com.metamatrix.common.util.WSDLServletUtil;
+
+import junit.framework.TestCase;
+
+
+/**
+ * @since 4.3
+ */
+public class TestMMGetVDBResourceServlet extends TestCase {
+
+ private final MMGetVDBResourceServlet servlet = new MMGetVDBResourceServlet();
+
+ private static String KEY_1 = "key1"; //$NON-NLS-1$
+ private static String KEY_2 = "key2"; //$NON-NLS-1$
+ private static String KEY_3 = "key3"; //$NON-NLS-1$
+ private static String KEY_4 = "key4";//$NON-NLS-1$
+ private static String KEY_5 = "key5";//$NON-NLS-1$
+
+
+ private static String[] VALUE_1 = new String[] {"value1=new"};
//$NON-NLS-1$
+ private static String[] VALUE_1_ENCODED = new String[] {"value1%3Dnew"};
//$NON-NLS-1$
+ private static String[] VALUE_2 = new String[] {"value2"};//$NON-NLS-1$
+ private static String[] VALUE_3 = new String[] {"value3"};//$NON-NLS-1$
+ private static String[] VALUE_4 = new String[] {"value4"};//$NON-NLS-1$
+ private static String[] VALUE_5 = new String[] {"value5"};//$NON-NLS-1$
+
+ private static String EXPECTED_SUFFIX_STRING = KEY_1 + "=" +
VALUE_1_ENCODED[0] + "&" + KEY_2 + "=" + VALUE_2[0] +
"&" + KEY_3 + "=" + VALUE_3[0] + "&" + KEY_4 +
"=" + VALUE_4[0] + "&" + KEY_5 + "=" + VALUE_5[0];
//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
//$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$
+
+ private static String EXPECTED_HTTP_SUFFIX_STRING = "httptype=http&" +
KEY_1 + "=" + VALUE_1_ENCODED[0] + "&" + KEY_2 + "=" +
VALUE_2[0] + "&" + KEY_3 + "=" + VALUE_3[0] + "&" +
KEY_4 + "=" + VALUE_4[0] + "&" + KEY_5 + "=" +
VALUE_5[0]; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$
//$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$
+
+ public void testBuildEndpointSuffixStringNoHttpTypeParam() {
+ Map map = new TreeMap();
+ map.put(KEY_1, VALUE_1);
+ map.put(KEY_2, VALUE_2);
+ map.put(KEY_3, VALUE_3);
+ map.put(KEY_4, VALUE_4);
+ map.put(KEY_5, VALUE_5);
+ assertEquals(servlet.buildEndpointSuffixString(map), EXPECTED_SUFFIX_STRING);
+
+ }
+
+ public void testBuildEndpointSuffixStringWithHttpTypeParam() {
+ Map map = new TreeMap();
+ map.put(KEY_1, VALUE_1);
+ map.put(KEY_2, VALUE_2);
+ map.put(KEY_3, VALUE_3);
+ map.put(KEY_4, VALUE_4);
+ map.put(KEY_5, VALUE_5);
+ map.put(WSDLServletUtil.HTTP_TYPE_PARAMETER_KEY, new String[]
{WSDLServletUtil.HTTP_PARAMETER_VALUE});
+ assertEquals(servlet.buildEndpointSuffixString(map),
EXPECTED_HTTP_SUFFIX_STRING);
+
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetWSDLServlet.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetWSDLServlet.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/servlet/TestMMGetWSDLServlet.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.servlet;
+
+import junit.framework.TestCase;
+
+import com.metamatrix.core.util.StringUtil;
+
+
+/**
+ * @since 5.6
+ */
+public class TestMMGetWSDLServlet extends TestCase {
+
+ private static String EXPECTED_VDB_NAME = "myVDB"; //$NON-NLS-1$
+
+ public void testGetVdbName() {
+
+ String vdbName = StringUtil.Constants.EMPTY_STRING;
+ vdbName = MMGetWSDLServlet.getVdbName("/myVDB/1"); //$NON-NLS-1$
+ assertEquals(EXPECTED_VDB_NAME, vdbName);
+ vdbName = MMGetWSDLServlet.getVdbName("/myVDB"); //$NON-NLS-1$
+ assertEquals(EXPECTED_VDB_NAME, vdbName);
+ }
+
+ public void testGetVdbVersion() {
+
+ String vdbVersion = StringUtil.Constants.EMPTY_STRING;
+ vdbVersion = MMGetWSDLServlet.getVdbVersion("/myVDB/2"); //$NON-NLS-1$
+ assertEquals("2", vdbVersion); //$NON-NLS-1$
+ vdbVersion = MMGetWSDLServlet.getVdbVersion("/myVDB"); //$NON-NLS-1$
+ assertEquals("", vdbVersion); //$NON-NLS-1$
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/sqlquerywebservice/TestSqlQueryWebService.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/sqlquerywebservice/TestSqlQueryWebService.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/sqlquerywebservice/TestSqlQueryWebService.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,144 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.sqlquerywebservice;
+
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.Properties;
+
+import junit.framework.TestCase;
+
+import org.mockito.Mockito;
+
+import com.metamatrix.common.api.MMURL;
+import com.metamatrix.jdbc.MMConnection;
+import com.metamatrix.jdbc.MMStatement;
+import com.metamatrix.jdbc.api.ResultSet;
+import com.metamatrix.soap.security.Credential;
+import com.metamatrix.soap.service.ConnectionSource;
+import com.metamatrix.soap.sqlquerywebservice.helper.ConnectionlessRequest;
+import com.metamatrix.soap.sqlquerywebservice.helper.CursorType;
+import com.metamatrix.soap.sqlquerywebservice.helper.LogInParameters;
+import com.metamatrix.soap.sqlquerywebservice.helper.RequestInfo;
+import com.metamatrix.soap.sqlquerywebservice.helper.RequestType;
+import com.metamatrix.soap.sqlquerywebservice.helper.Results;
+import com.metamatrix.soap.sqlquerywebservice.helper.TransactionAutoWrapType;
+import com.metamatrix.soap.sqlquerywebservice.service.SqlQueryWebService;
+import com.metamatrix.soap.sqlquerywebservice.service.SqlQueryWebServiceFault;
+import
com.metamatrix.soap.sqlquerywebservice.service.SqlQueryWebService.CredentialProvider;
+
+public class TestSqlQueryWebService extends TestCase {
+
+ public void testBlockingExecute_NullLogInParameters() throws SqlQueryWebServiceFault {
+ SqlQueryWebService sqws = new SqlQueryWebService();
+ setFakeCredentialProvider(sqws);
+ sqws.setConnectionSource(new ConnectionSource() {
+ @Override
+ public Connection getConnection(Properties connectionProperties)
+ throws SQLException {
+ assertNull(connectionProperties.getProperty(MMURL.CONNECTION.SERVER_URL));
+ throw new SQLException("expected");
+ }
+ });
+
+ ConnectionlessRequest connectionlessRequest = new ConnectionlessRequest();
+ connectionlessRequest.setParameters(new LogInParameters());
+
+ try {
+ sqws.executeBlocking(connectionlessRequest);
+ fail("exception expected");
+ } catch (SqlQueryWebServiceFault f) {
+ //this will be thrown after we have setup the initial connection properties
+ assertEquals("expected", f.getMessage());
+ }
+ }
+
+ public void testBlockingExecute_BadConnection() throws SqlQueryWebServiceFault {
+ SqlQueryWebService sqws = new SqlQueryWebService();
+
+ sqws.setConnectionSource(new ConnectionSource() {
+
+ @Override
+ public Connection getConnection(Properties connectionProperties)
+ throws SQLException {
+ throw new SQLException("expected");
+ }
+ });
+
+ setFakeCredentialProvider(sqws);
+
+ ConnectionlessRequest connectionlessRequest = new ConnectionlessRequest();
+ connectionlessRequest.setParameters(new LogInParameters());
+
+ try {
+ sqws.executeBlocking(connectionlessRequest);
+ fail("exception expected");
+ } catch (SqlQueryWebServiceFault f) {
+ assertEquals("expected", f.getMessage());
+ assertEquals("Client", f.getFaultCode().getLocalPart());
+ }
+ }
+
+ private void setFakeCredentialProvider(SqlQueryWebService sqws) {
+ sqws.setCredentialProvider(new CredentialProvider() {
+ @Override
+ public Credential getCredentials() throws SqlQueryWebServiceFault {
+ return new Credential("ted", "jones".getBytes());
+ }
+ });
+ }
+
+ public void testBlockingExecute() throws SqlQueryWebServiceFault {
+ SqlQueryWebService sqws = new SqlQueryWebService();
+ setFakeCredentialProvider(sqws);
+
+ sqws.setConnectionSource(new ConnectionSource() {
+ @Override
+ public Connection getConnection(Properties connectionProperties)
+ throws SQLException {
+ assertEquals("ted",
connectionProperties.getProperty(MMURL.CONNECTION.USER_NAME));
+ MMConnection conn = Mockito.mock(MMConnection.class);
+ MMStatement stmt = Mockito.mock(MMStatement.class);
+ Mockito.stub(stmt.unwrap(MMStatement.class)).toReturn(stmt);
+ Mockito.stub(stmt.getUpdateCount()).toReturn(1);
+ Mockito.stub(conn.createStatement(ResultSet.TYPE_FORWARD_ONLY,
ResultSet.CONCUR_READ_ONLY)).toReturn(stmt);
+ return conn;
+ }
+ });
+
+ ConnectionlessRequest connectionlessRequest = new ConnectionlessRequest();
+ connectionlessRequest.setParameters(new LogInParameters());
+ RequestInfo ri = new RequestInfo();
+ ri.setCursorType(new CursorType(String.valueOf(ResultSet.TYPE_FORWARD_ONLY)));
+ ri.setRequestType(new RequestType(String.valueOf(0)));
+ ri.setTransactionAutoWrapMode(new TransactionAutoWrapType(String.valueOf(0)));
+
+ connectionlessRequest.setRequestInfo(ri);
+
+ Results results = sqws.executeBlocking(connectionlessRequest);
+
+ assertFalse(results.isHasData());
+ assertEquals(new Integer(1), results.getUpdateCount());
+ }
+
+}
Added:
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestEndpointUrlTranslatorStrategyImpl.java
===================================================================
---
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestEndpointUrlTranslatorStrategyImpl.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestEndpointUrlTranslatorStrategyImpl.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+
+import com.metamatrix.core.util.StringUtil;
+import com.metamatrix.soap.exceptions.SOAPProcessingException;
+
+import junit.framework.TestCase;
+
+/**
+ * @author jpoulsen
+ *
+ * TODO To change the template for this generated type comment go to
+ * Window - Preferences - Java - Code Style - Code Templates
+ */
+public class TestEndpointUrlTranslatorStrategyImpl extends TestCase {
+ private static final String urlEncoding = "UTF-8"; //$NON-NLS-1$
+
+ public void testCreateJdbcUrlWVDBVersion(){
+ String url1=StringUtil.Constants.EMPTY_STRING;
+ try {
+ url1 = EndpointUriTranslatorStrategyImpl.createJdbcUrl("mm://slntmm05:7000",
"DesignTimeCatalog", "1",
"txnAutoWrap=PESSIMISTIC");//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
+ } catch (SOAPProcessingException e) {
+ e.printStackTrace();
+ }
+ assertEquals("jdbc:metamatrix:DesignTimeCatalog@mm://slntmm05:7000;version=1;txnAutoWrap=PESSIMISTIC",
url1); //$NON-NLS-1$
+ }
+
+ public void testCreateJdbcUrlWVDBVersionWithUrlEncoding(){
+ String url1=StringUtil.Constants.EMPTY_STRING;
+ try {
+ url1 =
EndpointUriTranslatorStrategyImpl.createJdbcUrl(URLEncoder.encode("mm://slntmm05:7000",urlEncoding),
URLEncoder.encode("Design&TimeCatalog",urlEncoding), "1",
URLEncoder.encode("txnAutoWrap=PESSIMISTIC",urlEncoding));//$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ } catch (SOAPProcessingException e) {
+ e.printStackTrace();
+ } catch (UnsupportedEncodingException e){
+ e.printStackTrace();
+ }
+ assertEquals("jdbc:metamatrix:Design&TimeCatalog@mm://slntmm05:7000;version=1;txnAutoWrap=PESSIMISTIC",
url1); //$NON-NLS-1$
+ }
+
+}
Added: sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWSDLServletUtil.java
===================================================================
--- sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWSDLServletUtil.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWSDLServletUtil.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import com.metamatrix.common.util.WSDLServletUtil;
+
+import junit.framework.TestCase;
+
+/**
+ */
+public class TestWSDLServletUtil extends TestCase {
+
+ public static String HTTP = "http"; //$NON-NLS-1$
+ public static String HTTPS = "https"; //$NON-NLS-1$
+ public static String DEFAULT_APP_CONTEXT = "/metamatrix-soap"; //$NON-NLS-1$
+ public static String OTHER_APP_CONTEXT = "/metamatrix-soapiness";
//$NON-NLS-1$
+
+ public TestWSDLServletUtil(String name) {
+ super(name);
+ }
+
+ public void testGetMMSAPIUrlAllNullServerNameSecure() {
+ String url = WSDLServletUtil.getSqlQueryWebServiceUrl(null, DEFAULT_APP_CONTEXT,
true);
+
assertEquals("https://null:8443/metamatrix-soap/services/SqlQueryWebService?wsdl",
url); //$NON-NLS-1$
+ }
+
+ public void testGetMMSAPIUrlAllNullServerNameNonSecure() {
+ String url = WSDLServletUtil.getSqlQueryWebServiceUrl(null, DEFAULT_APP_CONTEXT,
false);
+
assertEquals("http://null:8080/metamatrix-soap/services/SqlQueryWebService?wsdl",
url); //$NON-NLS-1$
+ }
+
+ public void testGetMMSAPIUrlValidParametersSecure() {
+ String url = WSDLServletUtil.getSqlQueryWebServiceUrl("slntmm01",
DEFAULT_APP_CONTEXT, true); //$NON-NLS-1$
+
assertEquals("https://slntmm01:8443/metamatrix-soap/services/SqlQueryWebService?wsdl",
url); //$NON-NLS-1$
+ }
+
+ public void testGetMMSAPIUrlValidParametersNonSecure() {
+ String url = WSDLServletUtil.getSqlQueryWebServiceUrl("slntmm01",
OTHER_APP_CONTEXT,false); //$NON-NLS-1$
+
assertEquals("http://slntmm01:8080/metamatrix-soapiness/services/SqlQueryWebService?wsdl",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlValidParametersNonSecure() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mm://chicago:31000"); //$NON-NLS-1$
+ String url = WSDLServletUtil.formatURL(HTTP,"chicago","8080",
DEFAULT_APP_CONTEXT, serverURLs,"testVDB","1"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
assertEquals("http://chicago:8080/metamatrix-soap/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mm://chicago:31000&VDBName=testVDB&VDBVersion=1",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlValidParametersSecure() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mms://chicago:31000"); //$NON-NLS-1$
+ String url =
WSDLServletUtil.formatURL(HTTPS,"chicago","8443", DEFAULT_APP_CONTEXT,
serverURLs,"testVDB","1"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
+
assertEquals("https://chicago:8443/metamatrix-soap/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mms://chicago:31000&VDBName=testVDB&VDBVersion=1",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlValidParametersSecureNoPort() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mms://chicago:31000"); //$NON-NLS-1$
+ String url = WSDLServletUtil.formatURL(HTTPS,"chicago",null,
DEFAULT_APP_CONTEXT, serverURLs,"testVDB","1"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$
+
assertEquals("https://chicago/metamatrix-soap/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mms://chicago:31000&VDBName=testVDB&VDBVersion=1",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlValidParametersSecureNoPortNoVdbVersion() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mms://chicago:31000"); //$NON-NLS-1$
+ String url = WSDLServletUtil.formatURL(HTTPS,"chicago",null,
OTHER_APP_CONTEXT, serverURLs,"testVDB",null); //$NON-NLS-1$ //$NON-NLS-2$
+
assertEquals("https://chicago/metamatrix-soapiness/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mms://chicago:31000&VDBName=testVDB",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlValidParametersSecureNoVdbVersion() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mms://chicago:31000"); //$NON-NLS-1$
+ String url =
WSDLServletUtil.formatURL(HTTPS,"chicago","8443", DEFAULT_APP_CONTEXT,
serverURLs,"testVDB",""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
//$NON-NLS-4$
+
assertEquals("https://chicago:8443/metamatrix-soap/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mms://chicago:31000&VDBName=testVDB",
url); //$NON-NLS-1$
+ }
+
+ public void testFormatUrlMultipleServers() {
+ List serverURLs = new ArrayList();
+ serverURLs.add("mm://chicago:31000"); //$NON-NLS-1$
+ serverURLs.add("boston:31000"); //$NON-NLS-1$
+ String url = WSDLServletUtil.formatURL(HTTP,"chicago","8080",
DEFAULT_APP_CONTEXT, serverURLs,"testVDB","1"); //$NON-NLS-1$
//$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+
assertEquals("http://chicago:8080/metamatrix-soap/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl?ServerURL=mm://chicago:31000%2Cboston:31000&VDBName=testVDB&VDBVersion=1",
url); //$NON-NLS-1$
+ }
+
+}
Added: sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWebServiceUtil.java
===================================================================
--- sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWebServiceUtil.java
(rev 0)
+++
sqlquerywebservice/src/test/java/org/metamatrix/soap/util/TestWebServiceUtil.java 2010-06-08
21:26:55 UTC (rev 2208)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * See the COPYRIGHT.txt file distributed with this work for information
+ * regarding copyright ownership. Some portions may be licensed
+ * to Red Hat, Inc. under one or more contributor license agreements.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+ * 02110-1301 USA.
+ */
+
+package com.metamatrix.soap.util;
+
+import junit.framework.TestCase;
+
+import com.metamatrix.soap.exceptions.SOAPProcessingException;
+
+public class TestWebServiceUtil extends TestCase {
+
+ private static String ERROR = "The SOAP Action and WSAW Action are null or empty.
Please format the action as follows:
VDBName=MyVDB&ServerURL=mm://mmHost:mmPort&VDBVersion=<optional>&AdditionalProperties=<optional>&procedure=fully.qualified.procedureName";
//$NON-NLS-1$
+
+ public void testValidateCorrectAction() {
+
+ try {
+ WebServiceUtil.validateActionIsSet("VDBName=MyVDB&ServerURL=mm://mmHost:mmPort&VDBVersion=<optional>&AdditionalProperties=<optional>&procedure=fully.qualified.procedureName");//$NON-NLS-1$
+ } catch (SOAPProcessingException e) {
+ e.printStackTrace();
+ }
+ }
+
+ public void testValidateNullAction() {
+ try {
+ WebServiceUtil.validateActionIsSet(null);
+ } catch (SOAPProcessingException e) {
+ assertEquals(ERROR, e.getMessage());
+ }
+ }
+
+ public void testValidateEmptyAction() {
+ try {
+ WebServiceUtil.validateActionIsSet("");//$NON-NLS-1$
+ } catch (SOAPProcessingException e) {
+ assertEquals(ERROR, e.getMessage());
+ }
+ }
+
+ public void testValidateEmptySpacesAction() {
+ try {
+ WebServiceUtil.validateActionIsSet(" ");//$NON-NLS-1$
+ } catch (SOAPProcessingException e) {
+ assertEquals(ERROR, e.getMessage());
+ }
+ }
+}
Added: sqlquerywebservice/target/classes/com/teiid/soap/i18n.properties
===================================================================
--- sqlquerywebservice/target/classes/com/teiid/soap/i18n.properties
(rev 0)
+++ sqlquerywebservice/target/classes/com/teiid/soap/i18n.properties 2010-06-08 21:26:55
UTC (rev 2208)
@@ -0,0 +1,174 @@
+#
+# JBoss, Home of Professional Open Source.
+# See the COPYRIGHT.txt file distributed with this work for information
+# regarding copyright ownership. Some portions may be licensed
+# to Red Hat, Inc. under one or more contributor license agreements.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA.
+#
+
+# authentication (001)
+ERR.018.001.0001 = Session ID parameter cannot be null.
+ERR.018.001.0002 = Server URL parameter cannot be null.
+ERR.018.001.0003 = Virtual database parameter cannot be null.
+ERR.018.001.0004 = Maximum number of anonymous connections reached.
+
+# servlet (002)
+ERR.018.002.0001 = The metadata type ({0}) is not a valid type.
+ERR.018.002.0002 = Unexpected type for current index for stored procedure parameters
received from form page, was expecting type of Integer but was ({0}) instead: {1}
+ERR.018.002.0003 = The SOAP Call failed. The details are: {0}
+ERR.018.002.0004 = Required parameter ({0}) not found in form data.
+ERR.018.002.0005 = Unable to get metadata data types: {0}
+ERR.018.002.0006 = Unable to get a connection.
+ERR.018.002.0007 = Unable to use anonymous login as a dedicated session.
+ERR.018.002.0008 = Unable to obtain the connection pool controller: {0}
+ERR.018.002.0009 = Unable to logoff from server: {0}
+ERR.018.002.0010 = The stored procedure cannot be null.
+ERR.018.002.0011 = The stored procedure name cannot be null
+ERR.018.002.0012 = The results returned from the data service were null.
+ERR.018.002.0013 = SQL cannot be null for SOAP method submitXMLQuery
+ERR.018.002.0014 = Unable to read the returned result set.
+ERR.018.002.0015 = Unable to retreive metadata from the Query Results.
+ERR.018.002.0016 = The current user session is invalid, please login again.
+ERR.018.002.0017 = The user connection cannot be established.
+ERR.018.002.0018 = Connection is not available, check server to make sure it is running.
+ERR.018.002.0019 = Unable to establish a connection: {0}
+ERR.018.002.0020 = The specified port {0} is invalid.
+ERR.018.002.0021 = The specified host {0} is invalid.
+ERR.018.002.0022 = Recheck the parameters provided.\n\nThe generated URL: {0}\n\nCould
not be used to get WSDL due to error: {1}
+ERR.018.002.0023 = The user entered a negative number.
+ERR.018.002.0024 = The specified version {0} is invalid.
+ERR.018.002.0025 = Did not find a colon delimiter between the server host and port for
the supplied list item {0}
+ERR.018.002.0026 = The supplied server host and port list is invalid.
+
+
+# xml (011)
+ERR.018.011.0001 = No children expected when star is chosen.
+ERR.018.011.0002 = Invalid value for {0} element: "{1}" must be either
"{2}" or "{3}"
+ERR.018.011.0003 = Invalid input format
+ERR.018.011.0004 = Unable to parse the value for {0} element: "{1}"
+ERR.018.011.0005 = The starting row cannot be negetive.
+ERR.018.011.0006 = The starting row cannot be less than the ending row.
+ERR.018.011.0007 = Null object reference
+ERR.018.011.0008 = The starting row cannot be less than 1.
+ERR.018.011.0009 = Unable to translate result documents.
+ERR.018.011.0010 = Schema cannot be null when attempting to translate.
+ERR.018.011.0011 = Schema is not available.
+ERR.018.011.0012 = index attribute of {0} in stored procedure parameter is not a valid
integer.
+ERR.018.011.0013 = index attribute not found in stored procedure attribute.
+ERR.018.011.0014 = Unable to translate the stored procedure parameters due to: {0}
+ERR.018.011.0015 = Parameter name cannot be null.
+ERR.018.011.0016 = Index cannot be null.
+ERR.018.011.0017 = Unable to translate metadata due to: {0}
+ERR.018.011.0018 = element name cannot be null in getNewElement method.
+ERR.018.011.0019 = Unable to create new w3c document due to a parser configuration
exception: {0}
+ERR.018.011.0020 = node name cannot be null in getNewTextNode method.
+ERR.018.011.0021 = Unable to execute Stored Procedure due to: {0}
+ERR.018.011.0022 = Unable to execute query due to: {0}
+ERR.018.011.0023 = Unable to execute update due to: {0}
+ERR.018.011.0024 = Unable to execute XMLQuery due to: {0}
+
+# MMSOAPClientServlet
+MMSOAPClientServlet.There_was_a_problem_creating_the_SOAPAuthentication_object._61=There
was a problem creating the SOAPAuthentication object.
+
+# MMSOAPServlet
+MMSOAPServlet.Unexpected_error_while_processing_JMS_SOAP_request._4=Unexpected error
while processing JMS SOAP request.
+MMSOAPServlet.Unable_to_get_an_Axis_server_engine._5=Unable to get an Axis server
engine.
+MMSOAPServlet.Unable_to_set_the_target_service._The_service_name_is_not_correctly_configured._7=Unable
to set the target service. The service name is not correctly configured.
+MMSOAPServlet.Failed_to_retrieve_the_response_destination_from_the_JMS_message._No_response_will_be_sent._8=Failed
to retrieve the response destination from the JMS message. No response will be sent.
+MMSOAPServlet.Unable_to_send_a_JMS_response_message_to_the_reply_destination._9=Unable to
send a JMS response message to the reply destination.
+MMSOAPServlet.Unable_to_initialize_the_JMS_MessageListener_for_data_service_requests_to___{0}__._The_JMS_transport_will_not_function_properly_for_data_service_requests._11=Unable
to initialize the JMS MessageListener for data service requests to {0}. The JMS transport
will not function properly for data service requests.
+MMSOAPServlet.Unable_to_start_the_JMS_service._The_JMS_transport_will_not_function_properly_for_SOAP_requests._12=Unable
to start the JMS service. The JMS transport will not function properly for SOAP requests.
+MMSOAPServlet.Unable_to_obtain_a_connector_with_connection_factory_{0}._The_JMS_transport_will_not_function._1=Unable
to obtain a connector with connection factory {0}. The JMS transport will not function.
+MMSOAPServlet.Unable_to_initialize_the_JMS_MessageListener_for_SOAP_service_requests_to_{0}._The_JMS_transport_will_not_function_properly_for_SOAP_requests._1=Unable
to initialize the JMS MessageListener for SOAP service requests to {0}. The JMS transport
will not function properly for SOAP requests.
+MMSOAPServlet.MMDriver_init_failed=Teiid SOAP service initialization failed because it
could not find the requisite Teiid JDBC driver. Please ensure that this driver is in your
classpath
+
+# MMSoapQueryService
+MMSoapQueryService.document_name_cannot_be_null_2=document name cannot be null
+MMSoapQueryService.Unable_to_get_metadata_data_types___{0}_4=Unable to get metadata data
types : {0}
+MMSoapQueryService.Exception_when_attempting_to_close_the_ResultSet_2=Exception when
attempting to close the ResultSet
+MMSoapQueryService.Exception_when_attempting_to_close_the_statement._1=Exception when
attempting to close the statement.
+MMSoapQueryService.Exception_when_attempting_to_close_the_connection._2=Exception when
attempting to close the connection.
+
+# BytesMessageInputStream
+BytesMessageInputStream.Unable_to_read_a_byte_from_the_BytesMessage__{0}_1=Unable to read
a byte from the BytesMessage: {0}
+
+# DataServiceWebServiceImpl
+DataServiceWebServiceImpl.0=The incoming Message Context was null. Cannot authenticate
user.
+DataServiceWebServiceImpl.1=The result message from executing the Web Service operation *
{0} * contained more than one xml document in the result returned from the Teiid Server.
This behavior is not supported by a Data Service type web service.
+DataServiceWebServiceImpl.2=The input Data Service Request message had more than one root
element in the body section. This structural anomaly is not supported by the Data Service
web service.
+DataServiceWebServiceImpl.3=Exception closing connection.
+DataServiceWebServiceImpl.4=SOAP Action is not present.
+DataServiceWebServiceImpl.6=Exception in executeDataservice: {0}
+DataServiceWebServiceImpl.7=No response document returned. Please check your inputs.
+DataServiceWebServiceImpl.8=There was no row returned in the ResultSet.
+DataServiceWebServiceImpl.9=A processing error occurred for the following xml document:
{0}
+DataServiceWebServiceImpl.10=There was a problem parsing the xml result document returned
from the server. Here is the error: {0} Please see the log for more details.
+DataServiceWebServiceImpl.11=No security results. Token was not found.
+DataServiceWebServiceImpl.12=Unable to create connection for username: {0} due to {1}.
+DataServiceWebServiceImpl.16=Query Timeout not set or not a valid integer. Using zero for
query timeout (NO TIMOUT).
+
+# MMGetVDBResourceServlet
+MMGetVDBResourceServlet.0=Exception closing connection: {0}
+MMGetVDBResourceServlet.1=IOException in decrypt
+MMGetVDBResourceServlet.2=Exception in decrypt
+MMGetVDBResourceServlet.3=Exception in get decrypt key
+MMGetVDBResourceServlet.4=Exception in Cipher.getInstance()
+MMGetVDBResourceServlet.5=InvalidKeyException in decrypt.init()
+MMGetVDBResourceServlet.6=IllegalStateException in decrypt.doFinal()
+MMGetVDBResourceServlet.7=SQLException retrieving VDB Resource
+MMGetVDBResourceServlet.8=Exception retrieving VDB Resource
+MMGetVDBResourceServlet.9=BadPaddingException in decrypt.doFinal()
+MMGetVDBResourceServlet.10=Class Not Found
+MMGetVDBResourceServlet.11=IllegalBlockSizeException in decrypt.doFinal()
+MMGetVDBResourceServlet.12=No results from procedure
+MMGetVDBResourceServlet.13=FileNotFoundException in decrypt
+MMGetVDBResourceServlet.14=Resource Not Found
+MMGetVDBResourceServlet.15=There was an error encoding the query string.
+MMGetVDBResourceServlet.Application_Name=Teiid WSDL Resource Client
+
+# LicenseInfo
+LicenseInfo.UnverifiedLicenseException=UnverifiedLicenseException: {0}
+LicenseInfo.UnlicensedProductException=UnlicensedProductException: {0}
+LicenseInfo.InvalidLicenseException=InvalidLicenseException: {0}
+LicenseInfo.LicenseVerificationException=LicenseVerificationException: {0}
+LicenseInfo.ErrorMessage= Please contact your System Administrator or Teiid for a valid
license.
+
+
+PoolingConnectionSource.The_connection_pool_factory_given_the_Pooling_Connection_Source=The
connection pool factory given the Pooling Connection Source for the Data Service
implementation was null. Please check configuration properties.
+PoolingConnectionSource.The_DataSource_instance_pulled_from_the=The DataSource instance
pulled from the map of connection pools was null.
+
+WebServiceUtil.0=The SOAP Action and WSAW Action are null or empty. Please format the
action as follows:
VDBName=MyVDB&ServerURL=mm://mmHost:mmPort&VDBVersion=<optional>&AdditionalProperties=<optional>&procedure=fully.qualified.procedureName
+WebServiceUtil.1=The NamePasswordCredentials from the SOAP request message were null.
The incoming SOAP request cannot be authenticated.
+
+# MMDiscoverWSDLServlet
+MMDiscoverWSDLServlet.1=Error retrieving WSDL Urls. Please verify that the Teiid Server
information is correctly defined in the web.xml.
+MMDiscoverWSDLServlet.2=Error retrieving WSDL Urls:
+
+# SqlQueryWebService
+SqlQueryWebService.0=The incoming Message Context was null. Cannot authenticate user.
+Unable_to_close_session_with_id_due_to=Unable to close session with id {0} due to: {1}
+The_time_to_wait_submitted_with_the_executeBlocking_request=The ''time to
wait'' submitted with the executeBlocking request was reached. The request has
timed out. If results are desired, please revise the ''time to wait''
parameter in the request message and try again.
+
+# SqlQueryWebServiceFault
+Unable_to_create_the_Detail_for_the_exception_due_to=Unable to create the
''Detail'' for the exception due to the following: {0}
+
+# LicenseInfo
+LicenseInfo.UnverifiedLicenseException=UnverifiedLicenseException: {0}
+LicenseInfo.UnlicensedProductException=UnlicensedProductException: {0}
+LicenseInfo.InvalidLicenseException=InvalidLicenseException: {0}
+LicenseInfo.LicenseVerificationException=LicenseVerificationException: {0}
+