diff options
Diffstat (limited to 'qpid/java/management')
90 files changed, 4475 insertions, 4492 deletions
diff --git a/qpid/java/management/client/bin/qman-wsdm-start.cmd b/qpid/java/management/client/bin/qman-wsdm-start.cmd index 4e80177521..df30ce8617 100644 --- a/qpid/java/management/client/bin/qman-wsdm-start.cmd +++ b/qpid/java/management/client/bin/qman-wsdm-start.cmd @@ -58,7 +58,6 @@ SET CLASSPATH=%QMAN_HOME%\etc SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\start.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\jetty-6.1.14.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\jetty-util-6.1.14.jar
-SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\jetty-util-6.1.14.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\geronimo-servlet_2.5_spec-1.2.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\slf4j-api-1.4.0.jar
SET CLASSPATH=%CLASSPATH%;%QMAN_LIBS%\slf4j-log4j12-1.4.0.jar
diff --git a/qpid/java/management/client/bin/qman-wsdm-start.sh b/qpid/java/management/client/bin/qman-wsdm-start.sh index 239d1bf2f0..39a4cba66e 100644 --- a/qpid/java/management/client/bin/qman-wsdm-start.sh +++ b/qpid/java/management/client/bin/qman-wsdm-start.sh @@ -58,7 +58,7 @@ ADMIN_KEY=gazzax QMAN_LIBS=$QMAN_HOME/lib JETTY_CONFIG_FILE=$QMAN_HOME/etc/jetty.xml -QMAN_CLASSPATH=$QMAN_HOME/etc:$QMAN_LIBS/start.jar:$QMAN_LIBS/jetty-6.1.14.jar:$QMAN_LIBS/jetty-util-6.1.14.jar:$QMAN_LIBS/jetty-util-6.1.14.jar:$QMAN_LIBS/geronimo-servlet_2.5_spec-1.2.jar:$QMAN_LIBS/slf4j-api-1.4.0.jar:$QMAN_LIBS/slf4j-log4j12-1.4.0.jar:$QMAN_LIBS/log4j-1.2.12.jar +QMAN_CLASSPATH=$QMAN_HOME/etc:$QMAN_LIBS/start.jar:$QMAN_LIBS/jetty-6.1.14.jar:$QMAN_LIBS/jetty-util-6.1.14.jar:$QMAN_LIBS/geronimo-servlet_2.5_spec-1.2.jar:$QMAN_LIBS/slf4j-api-1.4.0.jar:$QMAN_LIBS/slf4j-log4j12-1.4.0.jar:$QMAN_LIBS/log4j-1.2.12.jar echo "===============================================================================" echo"" diff --git a/qpid/java/management/client/build.xml b/qpid/java/management/client/build.xml index 6543a569ee..729c15e2a6 100644 --- a/qpid/java/management/client/build.xml +++ b/qpid/java/management/client/build.xml @@ -25,7 +25,6 @@ <import file="../../module.xml"/> - <property name="war.name" value="qman.war"/> <property name="build.root" value="${module.build}"/> <property name="web.module" value="${module.build}${file.separator}wsdm-module"/> <property name="web-inf.folder" value="${web.module}${file.separator}WEB-INF"/> @@ -49,7 +48,6 @@ </copy> </target> - <target name="libs-release" description="copy dependencies into module release"> <copy todir="${module.release}${file.separator}" failonerror="true" verbose="true"> <fileset dir="${build}" casesensitive="yes" includes="${module.libs}"> @@ -59,6 +57,8 @@ <not><filename name="**/*xalan*"/></not> <not><filename name="**/*wsdl*"/></not> <not><filename name="**/*muse*"/></not> + <not><filename name="**/*jsp*"/></not> + <not><filename name="**/*core-3.1.1.jar*"/></not> </fileset> </copy> <copy todir="${module.release}${file.separator}lib" failonerror="true"> @@ -195,7 +195,7 @@ <batchtest fork="${test.fork}" todir="${module.results}"> <fileset dir="${module.test.src}" excludes="${module.test.excludes}"> - <include name="**/${test}.java"/> + <include name="**/${test}.java"/> </fileset> </batchtest> </junit> diff --git a/qpid/java/management/client/console/brokers_management.jsp b/qpid/java/management/client/console/brokers_management.jsp index ab9da15d29..449eabfcc1 100644 --- a/qpid/java/management/client/console/brokers_management.jsp +++ b/qpid/java/management/client/console/brokers_management.jsp @@ -97,7 +97,7 @@ Virtual Host :
</td>
<td>
- <input type="text" name="port"/>
+ <input type="text" name="virtualHost"/>
</td>
<td style="font-size: x-small;">
The virtual host name.
diff --git a/qpid/java/management/client/console/fragments/menu.jsp b/qpid/java/management/client/console/fragments/menu.jsp index 5833f209ad..971123e996 100644 --- a/qpid/java/management/client/console/fragments/menu.jsp +++ b/qpid/java/management/client/console/fragments/menu.jsp @@ -3,8 +3,8 @@ <a href="<%=request.getContextPath()%>/console"> > System Overview</a>
<a href="<%=request.getContextPath()%>/brokers_management"> > Brokers Management</a>
<a href="<%=request.getContextPath()%>/resources_management"> > Resources Management</a>
- <a href="<%=request.getContextPath()%>/tbd.jsp"> > Subscriptions Management</a>
- <a href="<%=request.getContextPath()%>/tbd.jsp"> > System Health</a>
+ <a> > Subscriptions Management</a>
+ <a> > System Health</a>
<a href="<%=request.getContextPath()%>/logging_configuration"> > Logging Configuration</a>
</div>
</div>
diff --git a/qpid/java/management/client/console/wsdl-viewer.xsl b/qpid/java/management/client/console/wsdl-viewer.xsl deleted file mode 100644 index c3c9767e10..0000000000 --- a/qpid/java/management/client/console/wsdl-viewer.xsl +++ /dev/null @@ -1,2523 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-/**
- * 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.
- */
--->
-
-
-<!--
-* ====================================================================
-* wsdl-viewer.xsl
-* Version: 3.1.02
-*
-* URL: http://tomi.vanek.sk/xml/wsdl-viewer.xsl
-*
-* Author: tomi vanek
-* Inspiration: Uche Ogbui - WSDL processing with XSLT
-* http://www-106.ibm.com/developerworks/library/ws-trans/index.html
-* ====================================================================
--->
-
-
-<!--
-* ====================================================================
-* Description:
-* wsdl-viewer.xsl is a lightweight XSLT 1.0 transformation with minimal
-* usage of any hacks that extend the possibilities of the transformation
-* over the XSLT 1.0 constraints but eventually would harm the engine independance.
-*
-* The transformation has to run even in the browser offered XSLT engines
-* (tested in IE 6 and Firefox) and in ANT "batch" processing.
-* ====================================================================
-* How to add the HTML look to a WSDL:
-* <?xml version="1.0" encoding="utf-8"?>
-* <?xml-stylesheet type="text/xsl" href="wsdl-viewer.xsl"?>
-* <wsdl:definitions ...>
-* ... Here is the service declaration
-* </wsdl:definitions>
-*
-* The web-browsers (in Windows) are not able by default automatically recognize
-* the ".wsdl" file type (suffix). For the type recognition the WSDL file has
-* to be renamed by adding the suffix ".xml" - i.e. "myservice.wsdl.xml".
-* ====================================================================
-* Constraints:
-* 1. Processing of imported files
-* 1.1 Only 1 imported WSDL and 1 imported XSD is processed
-* (well, maybe with a smarter recursive strategy this restriction could be overcome)
-* 1.2 No recursive including is supported (i.e. includes in included XSD are ignored)
-* 2. Namespace support
-* 2.1 Namespaces are not taken in account by processing (references with NS)
-* 3. Source code
-* 3.1 Only the source code allready processed by the XML parser is rendered - implications:
-* == no access to the XML head line (<?xml version="1.0" encoding="utf-8"?>)
-* == "expanded" CDATA blocks (parser processes the CDATA,
-* XSLT does not have access to the original code)
-* == no control over the code page
-* == processing of special characters
-* == namespace nodes are not rendered (just the namespace aliases)
-* ====================================================================
-* Possible improvements:
-* * Functional requirements
-* + SOAP 1.2 binding (http://schemas.xmlsoap.org/wsdl/soap12/WSDL11SOAP12.pdf)
-* + WSDL 2.0 (http://www.w3.org/TR/2006/CR-wsdl20-primer-20060327/)
-* + Recognition of WSDL patterns (interface, binding, service instance, ...)
-* - Creating an xsd-viewer.xsl for XML-Schema file viewing
-* (extracting the functionality from wsdl-viewer into separate XSLT)
-* - Check the full support of the WSDL and XSD going through the standards
-* - Real-world WSDL testing
-* - XSLT 2.0 (http://www-128.ibm.com/developerworks/library/x-xslt20pt5.html) ???
-* ? Adding more derived information
-* * to be defined, what non-trivial information can we read out from the WSDL
-* * XSLT
-* + Modularization
-* - Is it meaningful?
-* - Maybe more distribution alternatives (modular, fat monolithic, thin performance monolithic)?
-* - Distribution build automatization
-* + Dynamic page: JavaSript
-* + Performance
-* - Better code comments / documentation
-* - SOAP client form - for testing the web service (AJAX based)
-* - New XSD parser - clean-up the algorithm
-* - Complete (recursive, multiple) include support
-* ? Namespace-aware version (no string processing hacks ;-)
-* * I think, because of the goal to support as many engines as possible,
-* this requirement is unrealistic. Maybe when XSLT 2.0 will be supported
-* in a huge majority of platforms, we can rethink this point....
-* (problems with different functionality of namespace-uri XPath function by different engines)
-* * Development architecture
-* - Setup of the development infrastructure
-* - Unit testing
-* ? Collaboration platform
-* * Documentation, web
-* - Better user guide
-* ? Forum, Wiki
-* ====================================================================
--->
-
-
-<!--
-* ====================================================================
-* History:
-* 2005-04-15 - Initial implementation
-* 2005-09-12 - Removed xsl:key to be able to use the James Clark's XT engine on W3C web-site
-* 2006-10-06 - Removed the Oliver Becker's method of conditional selection
-* of a value in a single expression (in Xalan/XSLTC this hack does not work!)
-* 2005-10-07 - Duplicated operations
-* 2006-12-08 - Import element support
-* 2006-12-14 - Displays all fault elements (not just the first one)
-* 2006-12-28 - W3C replaced silently the James Clark's XT engine with Michael Kay's closed-source Saxon!
-* wsdl-viewer.xsl will no longer support XT engine
-* 2007-02-28 - Stack-overflow bug (if the XSD element @name and @type are identic)
-* 2007-03-08 - 3.0.00 - New parsing, new layout
-* 2007-03-28 - 3.0.01 - Fix: New anti-recursion defense (no error message by recursion
-* because of dirty solution of namespace processing)
-* - Added: variables at the top to turn on/off certain details
-* 2007-03-29 - 3.0.02 - Layout clean-up for IE
-* 2007-03-29 - 3.0.03 - Fix: Anti-recursion algorithm
-* 2007-03-30 - 3.0.04 - Added: source code rendering of imported WSDL and XSD
-* 2007-04-15 - 3.0.05 - Fix: Recursive calls in element type rendering
-* - Fix: Rendering of messages (did not render the message types of complex types)
-* - Fix: Links in src. by arrays
-* - Fix: $binding-info
-* 2007-04-15 - 3.0.06 - Added: Extended rendering control ENABLE-xxx parameters
-* - Changed: Anti-recursion algorithm has recursion-depth parameter
-* 2007-07-19 - 3.0.07 - Fix: Rendering of array type in detail
-* 2007-08-01 - 3.0.08 - Fix: xsl:template name="render-type"
-* Fix: typo - "Impotred WSDL" should be "Impotred WSDL"
-* 2007-08-16 - 3.0.09 - Fix: xsl:template name="render-type" - anti recursion
-* 2007-12-05 - 3.1.00 - Modularized
-* 2007-12-23 - 3.1.01 - Terminating message by WS without interface or service definition was removed
-* (seems to be a correct state)
-* 2008-08-20 - 3.1.02 - Woden-214: Anti-recursion bypassed in xsd:choice element
-* ====================================================================
--->
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ws="http://schemas.xmlsoap.org/wsdl/"
- xmlns:ws2="http://www.w3.org/ns/wsdl"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
- xmlns:local="http://tomi.vanek.sk/xml/wsdl-viewer"
- version="1.0"
- exclude-result-prefixes="ws ws2 xsd soap local">
-
- <xsl:output method="xml" version="1.0" encoding="utf-8" indent="no"
- omit-xml-declaration="no"
- media-type="text/html"
- doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
- doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>
-
- <xsl:strip-space elements="*"/>
-
- <xsl:param name="wsdl-viewer.version">3.1.01</xsl:param>
-
-
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-global.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:param name="ENABLE-SERVICE-PARAGRAPH" select="true()"/>
- <xsl:param name="ENABLE-OPERATIONS-PARAGRAPH" select="true()"/>
- <xsl:param name="ENABLE-SRC-CODE-PARAGRAPH" select="true()"/>
- <xsl:param name="ENABLE-ABOUT-PARAGRAPH" select="false()"/>
- <xsl:param name="ENABLE-OPERATIONS-TYPE" select="true()"/>
- <xsl:param name="ENABLE-LINK" select="true()"/>
- <xsl:param name="ENABLE-INOUTFAULT" select="true()"/>
- <xsl:param name="ENABLE-STYLEOPTYPEPATH" select="true()"/>
- <xsl:param name="ENABLE-DESCRIPTION" select="true()"/>
- <xsl:param name="ENABLE-PORTTYPE-NAME" select="true()"/>
- <xsl:param name="ENABLE-ANTIRECURSION-PROTECTION" select="true()"/>
- <xsl:param name="ANTIRECURSION-DEPTH">3</xsl:param>
- <xsl:variable name="GENERATED-BY">Generated by wsdl-viewer.xsl</xsl:variable>
- <xsl:variable name="PORT-TYPE-TEXT">Port type</xsl:variable>
- <xsl:variable name="IFACE-TEXT">Interface</xsl:variable>
- <xsl:variable name="SOURCE-CODE-TEXT">Source code</xsl:variable>
- <xsl:variable name="RECURSIVE"> ... is recursive</xsl:variable>
- <xsl:variable name="SRC-PREFIX">src.</xsl:variable>
- <xsl:variable name="SRC-FILE-PREFIX">src.file.</xsl:variable>
- <xsl:variable name="OPERATIONS-PREFIX">op.</xsl:variable>
- <xsl:variable name="PORT-PREFIX">port.</xsl:variable>
- <xsl:variable name="IFACE-PREFIX">iface.</xsl:variable>
- <xsl:variable name="global.wsdl-name"
- select="/*/*[(local-name() = 'import' or local-name() = 'include') and @location][1]/@location"/>
- <xsl:variable name="consolidated-wsdl" select="/* | document($global.wsdl-name)/*"/>
- <xsl:variable name="global.xsd-name"
- select="($consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation] | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation])[1]/@schemaLocation"/>
- <xsl:variable name="consolidated-xsd"
- select="(document($global.xsd-name)/xsd:schema/xsd:*|/*/*[local-name() = 'types']/xsd:schema/xsd:*)[local-name() = 'complexType' or local-name() = 'element' or local-name() = 'simpleType']"/>
- <xsl:variable name="global.service-name"
- select="concat($consolidated-wsdl/ws:service/@name, $consolidated-wsdl/ws2:service/@name)"/>
- <xsl:variable name="global.binding-name"
- select="concat($consolidated-wsdl/ws:binding/@name, $consolidated-wsdl/ws2:binding/@name)"/>
- <xsl:variable name="html-title">
- <xsl:apply-templates select="/*" mode="html-title.render"/>
- </xsl:variable>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-global.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-css.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:variable name="css">
-
-/**
- wsdl-viewer.css
-*/
-
-/**
-=========================================
- Body
-=========================================
-
-html {
- background-color: #FFFFFF;
-}
-
-body {
- margin: 0;
- padding: 0;
- height: auto;
- color: white;
- background-color: #FFFFFF;
- font: normal Tahoma;
-}
-*/
-#outer_box {
- padding: 3px 3px 3px 194px;
- width: 400px;
-}
-
-#inner_box {
-
- background-color: white;
- color: black;
- font: normal Tahoma;
- font-size : x-small;
-}
-
-/**
-=========================================
- Fixed box with links
-=========================================
-*/
-#outer_links {
- position: fixed;
- left: 0px;
- top: 0px;
- margin: 3px;
- padding: 1px;
- z-index: 200;
- width: 180px;
- height: auto;
- background-color: gainsboro;
- padding-top: 2px;
- border: 1px solid navy;
-}
-
-* html #outer_links /* Override above rule for IE */
-{
- position: absolute;
- width: 188px;
- top: expression(offsetParent.scrollTop + 0);
-}
-
-#links {
- margin: 1px;
- padding: 3px;
- background-color: white;
- height: 350px;
- overflow: auto;
- border: 1px solid navy;
-}
-
-#links ul {
- left: -999em;
- list-style: none;
- margin: 0;
- padding: 0;
- z-index: 100;
-}
-
-#links li {
- margin: 0;
- padding: 2px 4px;
- width: auto;
- z-index: 100;
-}
-
-#links ul li {
- margin: 0;
- padding: 2px 4px;
- width: auto;
- z-index: 100;
-}
-
-#links a {
- display: block;
- padding: 0 2px;
- color: blue;
- width: auto;
- border: 1px solid white;
- text-decoration: none;
- white-space: nowrap;
-}
-
-#links a:hover {
- color: white;
- background-color: gray;
- border: 1px solid gray;
-}
-
-
-/**
-=========================================
- Navigation tabs
-=========================================
-*/
-
-#outer_nav {
- background-color: yellow;
- padding: 0;
- margin: 0;
-}
-
-#nav {
- height: 100%;
- width: auto;
- margin: 0;
- padding: 0;
- background-color: gainsboro;
- border-top: 1px solid gray;
- border-bottom: 3px solid gray;
- z-index: 100;
- font: bold Tahoma;
- letter-spacing: 2px;
-}
-
-#nav ul {
- background-color: gainsboro;
- height: auto;
- width: auto;
- list-style: none;
- margin: 0;
- padding: 0;
- z-index: 100;
-
- border: 1px solid silver;
- border-top-color: black;
- border-width: 1px 0 9px;
-}
-
-#nav li {
- display: inline;
- padding: 0;
- margin: 0;
-}
-
-#nav a {
- position: relative;
- top: 3px;
- float:left;
- width:auto;
- padding: 8px 10px 6px 10px;
- margin: 3px 3px 0;
- border: 1px solid gray;
- border-width: 2px 2px 3px 2px;
-
- color: black;
- background-color: silver;
- text-decoration:none;
- text-transform: uppercase;
-}
-
-#nav a:hover {
- margin-top: 1px;
- padding-top: 9px;
- padding-bottom: 7px;
- color: blue;
- background-color: gainsboro;
-}
-
-#nav a.current:link,
-#nav a.current:visited,
-#nav a.current:hover {
- background: white;
- color: black;
- text-shadow:none;
- margin-top: 0;
- padding-top: 11px;
- padding-bottom: 9px;
- border-bottom-width: 0;
- border-color: #A5CE77;
-}
-
-#nav a:active {
- background-color: silver;
- color: white;
-}
-
-
-
-/**
-=========================================
- Content
-=========================================
-*/
-#header {
- margin: 0;
- padding: .5em 4em;
- color: white;
- background-color: #369;
-}
-
-#content {
- margin: 0;
- padding: 0 2em .5em;
-}
-
-#footer {
- clear: both;
- margin: 0;
- padding: .5em 2em;
- color: gray;
- background-color: gainsboro;
- font-size: 80%;
- border-top: 1px dotted gray;
- text-align: right
-}
-
-.single_column {
- padding: 10px 10px 10px 10px;
- /*margin: 0px 33% 0px 0px; */
- margin: 3px 0;
-}
-
-#flexi_column {
- padding: 10px 10px 10px 10px;
- /*margin: 0px 33% 0px 0px; */
- margin: 0px 212px 0px 0px;
-}
-
-#fix_column {
- float: right;
- padding: 10px 10px 10px 10px;
- margin: 0px;
- width: 205px;
- /*width: 30%; */
- voice-family: "\"}\"";
- voice-family:inherit;
- /* width: 30%; */
- width: 205px;
-}
-html>body #rightColumn {
- width: 205px; /* ie5win fudge ends */
-} /* Opera5.02 shows a 2px gap between. N6.01Win sometimes does.
- Depends on amount of fill and window size and wind direction. */
-
-/**
-=========================================
- Label / value
-=========================================
-*/
-
-.page {
- border-bottom: 3px dotted navy;
- margin: 0;
- padding: 10px 0 20px 0;
-}
-
-.value, .label {
- margin: 0;
- padding: 0;
-}
-
-.label {
- float: left;
- width: 140px;
- text-align: right;
- font-weight: bold;
- padding-bottom: .5em;
- margin-right: 0;
- color: darkblue;
-}
-
-.value {
- margin-left: 147px;
- color: darkblue;
- padding-bottom: .5em;
-}
-
-strong, strong a {
- color: darkblue;
- font-weight: bold;
- letter-spacing: 1px;
- margin-left: 2px;
-}
-
-
-/**
-=========================================
- Links
-=========================================
-*/
-
-a.local:link,
-a.local:visited {
- color: blue;
- margin-left: 10px;
- border-bottom: 1px dotted blue;
- text-decoration: none;
- font-style: italic;
-}
-
-a.local:hover {
- background-color: gainsboro;
- color: darkblue;
- padding-bottom: 1px;
- border-bottom: 1px solid darkblue;
-}
-
-a.target:link,
-a.target:visited,
-a.target:hover
-{
- text-decoration: none;
- background-color: transparent;
- border-bottom-type: none;
-}
-
-/**
-=========================================
- Box, Shadow
-=========================================
-*/
-
-.box {
- padding: 6px;
- color: black;
- background-color: gainsboro;
- border: 1px solid gray;
-}
-
-.shadow {
- background: silver;
- position: relative;
- top: 5px;
- left: 4px;
-}
-
-.shadow div {
- position: relative;
- top: -5px;
- left: -4px;
-}
-
-/**
-=========================================
- Floatcontainer
-=========================================
-*/
-
-.spacer
-{
- display: block;
- height: 0;
- font-size: 0;
- line-height: 0;
- margin: 0;
- padding: 0;
- border-style: none;
- clear: both;
- visibility:hidden;
-}
-
-.floatcontainer:after {
- content: ".";
- display: block;
- height: 0;
- font-size:0;
- clear: both;
- visibility:hidden;
-}
-.floatcontainer{
- display: inline-table;
-} /* Mark Hadley's fix for IE Mac */ /* Hides from IE Mac \*/ *
-html .floatcontainer {
- height: 1%;
-}
-.floatcontainer{
- display:block;
-} /* End Hack
-*/
-
-/**
-=========================================
- Source code
-=========================================
-*/
-
-.indent {
- margin: 2px 0 2px 20px;
-}
-
-.xml-element, .xml-proc, .xml-comment {
- margin: 2px 0;
- padding: 2px 0 2px 0;
-}
-
-.xml-element {
- word-spacing: 3px;
- color: red;
- font-weight: bold;
- font-style:normal;
- border-left: 1px dotted silver;
-}
-
-.xml-element div {
- margin: 2px 0 2px 40px;
-}
-
-.xml-att {
- color: blue;
- font-weight: bold;
-}
-
-.xml-att-val {
- color: blue;
- font-weight: normal;
-}
-
-.xml-proc {
- color: darkred;
- font-weight: normal;
- font-style: italic;
-}
-
-.xml-comment {
- color: green;
- font-weight: normal;
- font-style: italic;
-}
-
-.xml-text {
- color: green;
- font-weight: normal;
- font-style: normal;
-}
-
-
-/**
-=========================================
- Heading
-=========================================
-*/
-h1, h2, h3 {
- margin: 10px 10px 2px;
- font-family: Tahoma;
- font-weight: normal;
- }
-
-h1 {
- font-weight: bold;
- letter-spacing: 3px;
- font-size: 220%;
- line-height: 100%;
-}
-
-h2 {
- font-weight: bold;
- font-size: 175%;
- line-height: 200%;
-}
-
-h3 {
- font-size: 150%;
- line-height: 150%;
- font-style: italic;
-}
-
-/**
-=========================================
- Content formatting
-=========================================
-*/
-.port {
- margin-bottom: 10px;
- padding-bottom: 10px;
- border-bottom: 1px dashed gray;
-}
-
-.operation {
- margin-bottom: 20px;
- padding-bottom: 10px;
- border-bottom: 1px dashed gray;
-}
-
-
-/* --------------------------------------------------------
- Printing
-*/
-
-/*
-@media print
-{
- #outer_links, #outer_nav {
- display: none;
- }
-*/
-
- #outer_box {
- padding: 3px;
- }
-/* END print media definition
-}
-*/
-
-</xsl:variable>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-css.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-util.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:template match="@*" mode="qname.normalized">
- <xsl:variable name="local" select="substring-after(., ':')"/>
- <xsl:choose>
- <xsl:when test="$local">
- <xsl:value-of select="$local"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="."/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="ws:definitions | ws2:description" mode="html-title.render">
- <xsl:choose>
- <xsl:when test="$global.service-name">
- <xsl:value-of select="concat('Service : ', $global.service-name)"/>
- </xsl:when>
- <xsl:when test="$global.binding-name">
- <xsl:value-of select="concat('WS Binding: ', $global.binding-name)"/>
- </xsl:when>
- <xsl:when test="ws2:interface/@name">
- <xsl:value-of select="concat('WS Interface: ', ws2:interface/@name)"/>
- </xsl:when>
- <xsl:otherwise>Web Service Fragment</xsl:otherwise>
- <!-- <xsl:otherwise><xsl:message terminate="yes">Syntax error in element <xsl:call-template name="src.syntax-error.path"/></xsl:message>
- </xsl:otherwise>
--->
- </xsl:choose>
- </xsl:template>
- <xsl:template name="src.syntax-error">
- <xsl:message terminate="yes">Syntax error by WSDL source rendering in element <xsl:call-template name="src.syntax-error.path"/>
- </xsl:message>
- </xsl:template>
- <xsl:template name="src.syntax-error.path">
- <xsl:for-each select="parent::*">
- <xsl:call-template name="src.syntax-error.path"/>
- </xsl:for-each>
- <xsl:value-of select="concat('/', name(), '[', position(), ']')"/>
- </xsl:template>
- <xsl:template match="*[local-name(.) = 'documentation']" mode="documentation.render">
- <xsl:if test="$ENABLE-DESCRIPTION and string-length(.) > 0">
- <div class="label">Description:</div>
- <div class="value">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template name="render.source-code-link">
- <xsl:if test="$ENABLE-SRC-CODE-PARAGRAPH and $ENABLE-LINK">
- <a class="local" href="{concat('#', $SRC-PREFIX, generate-id(.))}">
- <xsl:value-of select="$SOURCE-CODE-TEXT"/>
- </a>
- </xsl:if>
- </xsl:template>
- <xsl:template name="about.detail">
- <!-- <xsl:param name="version"/>
- <div>
- This page has been generated by <big>wsdl-viewer.xsl</big>, version <xsl:value-of select="$version"/>
- <br/>
- Author: <a href="http://tomi.vanek.sk/">tomi vanek</a>
- <br/>
- Download at <a href="http://tomi.vanek.sk/xml/wsdl-viewer.xsl">http://tomi.vanek.sk/xml/wsdl-viewer.xsl</a>.<br/>
- <br/>
- The transformation was inspired by the article<br/>
- Uche Ogbuji: <a href="http://www-106.ibm.com/developerworks/library/ws-trans/index.html">WSDL processing with XSLT</a>
- <br/>
- </div>
- </xsl:template>
- <xsl:template name="processor-info.render">
- <xsl:text>
-</xsl:text>
- <xsl:text>This document was generated by </xsl:text>
- <a href="{system-property('xsl:vendor-url')}">
- <xsl:value-of select="system-property('xsl:vendor')"/>
- </a>
- <xsl:text> XSLT engine.
-
-</xsl:text>
-
- <xsl:text>The engine processed the WSDL in XSLT </xsl:text>
- <xsl:value-of select="format-number(system-property('xsl:version'), '#.0')"/>
- <xsl:text> compliant mode.
-</xsl:text>
- -->
- </xsl:template>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-util.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-service.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:template match="ws:service|ws2:service" mode="service-start">
- <div class="indent">
- <div class="label">Target Namespace:</div>
- <div class="value">
- <xsl:value-of select="$consolidated-wsdl/@targetNamespace"/>
- </div>
- <xsl:apply-templates select="*[local-name(.) = 'documentation']" mode="documentation.render"/>
- <xsl:apply-templates select="ws:port|ws2:endpoint" mode="service"/>
- </div>
- </xsl:template>
- <xsl:template match="ws2:endpoint" mode="service">
- <xsl:variable name="binding-name">
- <xsl:apply-templates select="@binding" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:variable name="binding" select="$consolidated-wsdl/ws2:binding[@name = $binding-name]"/>
-
- <xsl:variable name="binding-type" select="$binding/@type"/>
- <xsl:variable name="binding-protocol" select="$binding/@*[local-name() = 'protocol']"/>
- <xsl:variable name="protocol">
- <xsl:choose>
- <xsl:when test="starts-with($binding-type, 'http://schemas.xmlsoap.org/wsdl/soap')">SOAP 1.1</xsl:when>
- <xsl:when test="starts-with($binding-type, 'http://www.w3.org/2005/08/wsdl/soap')">SOAP 1.2</xsl:when>
- <xsl:when test="starts-with($binding-type, 'http://schemas.xmlsoap.org/wsdl/mime')">MIME</xsl:when>
- <xsl:when test="starts-with($binding-type, 'http://schemas.xmlsoap.org/wsdl/http')">HTTP</xsl:when>
- <xsl:otherwise>Unknown</xsl:otherwise>
- </xsl:choose>
-
- <!-- TODO: Add all bindings to transport protocols -->
- <xsl:choose>
- <xsl:when test="starts-with($binding-protocol, 'http://www.w3.org/2003/05/soap/bindings/HTTP')"> over HTTP</xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- </xsl:variable>
-
- <div class="label">Location:</div>
- <div class="value">
- <xsl:value-of select="@address"/>
- </div>
-
- <div class="label">Protocol:</div>
- <div class="value">
- <xsl:value-of select="$protocol"/>
- </div>
-
- <xsl:apply-templates select="$binding" mode="service"/>
-
- <xsl:variable name="iface-name">
- <xsl:apply-templates select="../@interface" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface[@name = $iface-name]" mode="service"/>
-
- </xsl:template>
- <xsl:template match="ws2:interface" mode="service">
- <h3>Interface <b>
- <xsl:value-of select="@name"/>
- </b>
- <xsl:if test="$ENABLE-LINK">
- <xsl:text> </xsl:text>
- <span>
- <xsl:if test="$ENABLE-OPERATIONS-PARAGRAPH">
- <a class="local" href="#{concat($PORT-PREFIX, generate-id(.))}">
- <xsl:value-of select="$PORT-TYPE-TEXT"/>
- </a>
- </xsl:if>
- <xsl:call-template name="render.source-code-link"/>
- </span>
- </xsl:if>
- </h3>
-
- <xsl:variable name="base-iface-name">
- <xsl:apply-templates select="@extends" mode="qname.normalized"/>
- </xsl:variable>
-
- <xsl:if test="$base-iface-name">
- <div class="label">Extends: </div>
- <div class="value">
- <xsl:value-of select="$base-iface-name"/>
- </div>
- </xsl:if>
-
- <xsl:variable name="base-iface"
- select="$consolidated-wsdl/ws2:interface[@name = $base-iface-name]"/>
-
- <div class="label">Operations:</div>
- <div class="value">
- <xsl:text>
-</xsl:text>
- <ol style="line-height: 180%;">
- <xsl:apply-templates select="$base-iface/ws2:operation | ws2:operation" mode="service">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </ol>
- </div>
- </xsl:template>
- <xsl:template match="ws:port" mode="service">
- <xsl:variable name="binding-name">
- <xsl:apply-templates select="@binding" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:variable name="binding" select="$consolidated-wsdl/ws:binding[@name = $binding-name]"/>
-
- <xsl:variable name="binding-uri"
- select="namespace-uri( $binding/*[local-name() = 'binding'] )"/>
- <xsl:variable name="protocol">
- <xsl:choose>
- <xsl:when test="starts-with($binding-uri, 'http://schemas.xmlsoap.org/wsdl/soap')">SOAP</xsl:when>
- <xsl:when test="starts-with($binding-uri, 'http://schemas.xmlsoap.org/wsdl/mime')">MIME</xsl:when>
- <xsl:when test="starts-with($binding-uri, 'http://schemas.xmlsoap.org/wsdl/http')">HTTP</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="port-type-name">
- <xsl:apply-templates select="$binding/@type" mode="qname.normalized"/>
- </xsl:variable>
-
- <xsl:variable name="port-type"
- select="$consolidated-wsdl/ws:portType[@name = $port-type-name]"/>
-
-
- <h3>Port <b>
- <xsl:value-of select="@name"/>
- </b>
- <xsl:if test="$ENABLE-LINK">
- <xsl:text> </xsl:text>
- <!-- <small>-->
- <xsl:if test="$ENABLE-OPERATIONS-PARAGRAPH">
- <a class="local" href="#{concat($PORT-PREFIX, generate-id($port-type))}">
- <xsl:value-of select="$PORT-TYPE-TEXT"/>
- </a>
- </xsl:if>
- <xsl:call-template name="render.source-code-link"/>
- <!-- </small>-->
- </xsl:if>
- </h3>
-
- <div class="label">Location:</div>
- <div class="value">
- <xsl:value-of select="*[local-name() = 'address']/@location"/>
- </div>
-
- <div class="label">Protocol:</div>
- <div class="value">
- <xsl:value-of select="$protocol"/>
- </div>
-
- <xsl:apply-templates select="$binding" mode="service"/>
-
- <div class="label">Operations:</div>
- <div class="value">
- <xsl:text>
-</xsl:text>
- <ol style="line-height: 180%;">
- <xsl:apply-templates select="$consolidated-wsdl/ws:portType[@name = $port-type-name]/ws:operation"
- mode="service">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </ol>
- </div>
- </xsl:template>
- <xsl:template match="ws:operation|ws2:operation" mode="service">
- <li>
- <big>
- <i>
- <xsl:value-of select="@name"/>
- </i>
- </big>
- <xsl:if test="$ENABLE-LINK">
- <xsl:if test="$ENABLE-OPERATIONS-PARAGRAPH">
- <a class="local" href="{concat('#', $OPERATIONS-PREFIX, generate-id(.))}">Detail</a>
- </xsl:if>
- <xsl:call-template name="render.source-code-link"/>
- </xsl:if>
- </li>
- </xsl:template>
- <xsl:template match="ws:binding|ws2:binding" mode="service">
- <xsl:variable name="real-binding" select="*[local-name() = 'binding']|self::ws2:*"/>
-
- <xsl:if test="$real-binding/@style">
- <div class="label">Default style:</div>
- <div class="value">
- <xsl:value-of select="$real-binding/@style"/>
- </div>
- </xsl:if>
-
-
- <xsl:if test="$real-binding/@transport|$real-binding/*[local-name() = 'protocol']">
- <xsl:variable name="protocol"
- select="concat($real-binding/@transport, $real-binding/*[local-name() = 'protocol'])"/>
- <div class="label">Transport protocol:</div>
- <div class="value">
- <xsl:choose>
- <xsl:when test="$protocol = 'http://schemas.xmlsoap.org/soap/http'">SOAP over HTTP</xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$protocol"/>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:if>
-
- <xsl:if test="$real-binding/@verb">
- <div class="label">Default method:</div>
- <div class="value">
- <xsl:value-of select="$real-binding/@verb"/>
- </div>
- </xsl:if>
- </xsl:template>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-service.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-operations.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:template match="ws2:interface" mode="operations">
- <xsl:if test="$ENABLE-PORTTYPE-NAME">
- <h3>
- <a name="{concat($IFACE-PREFIX, generate-id(.))}">
- <xsl:value-of select="$IFACE-TEXT"/>
- <xsl:text>
-</xsl:text>
- <b>
- <xsl:value-of select="@name"/>
- </b>
- </a>
- <xsl:call-template name="render.source-code-link"/>
- </h3>
- </xsl:if>
-
- <ol>
- <xsl:apply-templates select="ws2:operation" mode="operations">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </ol>
- </xsl:template>
- <xsl:template match="ws2:operation" mode="operations">
- <xsl:variable name="binding-info"
- select="$consolidated-wsdl/ws2:binding[@interface = current()/../@name or substring-after(@interface, ':') = current()/../@name]/ws2:operation[@ref = current()/@name or substring-after(@ref, ':') = current()/@name]"/>
- <li>
- <xsl:if test="position() != last()">
- <xsl:attribute name="class">operation</xsl:attribute>
- </xsl:if>
- <big>
- <b>
- <a name="{concat($OPERATIONS-PREFIX, generate-id(.))}">
- <xsl:value-of select="@name"/>
- </a>
- </b>
- </big>
- <div class="value">
- <xsl:text>
-</xsl:text>
- <xsl:call-template name="render.source-code-link"/>
- </div>
- <xsl:apply-templates select="ws2:documentation" mode="documentation.render"/>
-
- <xsl:if test="$ENABLE-STYLEOPTYPEPATH">
- <!-- TODO: add the operation attributes - according the WSDL 2.0 spec. -->
- </xsl:if>
- <xsl:apply-templates select="ws2:input|ws2:output|../ws2:fault[@name = ws2:infault/@ref or @name = ws2:outfault/@ref]"
- mode="operations.message">
- <xsl:with-param name="binding-data" select="$binding-info"/>
- </xsl:apply-templates>
- </li>
- </xsl:template>
- <xsl:template match="ws2:input|ws2:output|ws2:fault" mode="operations.message">
- <xsl:param name="binding-data"/>
- <xsl:if test="$ENABLE-INOUTFAULT">
- <div class="label">
- <xsl:value-of select="concat(translate(substring(local-name(.), 1, 1), 'abcdefghijklmnoprstuvwxyz', 'ABCDEFGHIJKLMNOPRSTUVWXYZ'), substring(local-name(.), 2), ':')"/>
- </div>
-
- <div class="value">
- <xsl:variable name="type-name">
- <xsl:apply-templates select="@element" mode="qname.normalized"/>
- </xsl:variable>
-
- <xsl:call-template name="render-type">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
-
- <xsl:call-template name="render.source-code-link"/>
-
- <xsl:variable name="type-tree"
- select="$consolidated-xsd[@name = $type-name and not(xsd:simpleType)][1]"/>
- <xsl:apply-templates select="$type-tree" mode="operations.message.part"/>
- </div>
- </xsl:if>
- </xsl:template>
- <xsl:template match="ws:portType" mode="operations">
- <div>
- <xsl:if test="position() != last()">
- <xsl:attribute name="class">port</xsl:attribute>
- </xsl:if>
- <xsl:if test="$ENABLE-PORTTYPE-NAME">
- <h3>
- <a name="{concat($PORT-PREFIX, generate-id(.))}">
- <xsl:value-of select="$PORT-TYPE-TEXT"/>
- <xsl:text>
-</xsl:text>
- <b>
- <xsl:value-of select="@name"/>
- </b>
- </a>
- <xsl:call-template name="render.source-code-link"/>
- </h3>
- </xsl:if>
- <ol>
- <xsl:apply-templates select="ws:operation" mode="operations">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </ol>
- </div>
- </xsl:template>
- <xsl:template match="ws:operation" mode="operations">
- <xsl:variable name="binding-info"
- select="$consolidated-wsdl/ws:binding[@type = current()/../@name or substring-after(@type, ':') = current()/../@name]/ws:operation[@name = current()/@name]"/>
- <li>
- <xsl:if test="position() != last()">
- <xsl:attribute name="class">operation</xsl:attribute>
- </xsl:if>
- <big>
- <b>
- <a name="{concat($OPERATIONS-PREFIX, generate-id(.))}">
- <xsl:value-of select="@name"/>
- </a>
- </b>
- </big>
- <div class="value">
- <xsl:text>
-</xsl:text>
- <xsl:call-template name="render.source-code-link"/>
- </div>
-
- <xsl:if test="$ENABLE-DESCRIPTION and string-length(ws:documentation) > 0">
- <div class="label">Description:</div>
- <div class="value">
- <xsl:value-of select="ws:documentation" disable-output-escaping="yes"/>
- </div>
- </xsl:if>
-
- <xsl:if test="$ENABLE-STYLEOPTYPEPATH">
- <xsl:variable name="binding-operation" select="$binding-info/*[local-name() = 'operation']"/>
- <xsl:if test="$binding-operation/@style">
- <div class="label">Style:</div>
- <div class="value">
- <xsl:value-of select="$binding-operation/@style"/>
- </div>
- </xsl:if>
-
- <div class="label">Operation type:</div>
- <div class="value">
- <xsl:choose>
- <xsl:when test="$binding-info/ws:input[not(../ws:output)]">
- <i>One-way.</i> The endpoint receives a message.</xsl:when>
- <xsl:when test="$binding-info/ws:input[following-sibling::ws:output]">
- <i>Request-response.</i> The endpoint receives a message, and sends a correlated message.</xsl:when>
- <xsl:when test="$binding-info/ws:input[preceding-sibling::ws:output]">
- <i>Solicit-response.</i> The endpoint sends a message, and receives a correlated message.</xsl:when>
- <xsl:when test="$binding-info/ws:output[not(../ws:input)]">
- <i>Notification.</i> The endpoint sends a message.</xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </div>
-
- <xsl:if test="string-length($binding-operation/@soapAction) > 0">
- <div class="label">SOAP action:</div>
- <div class="value">
- <xsl:value-of select="$binding-operation/@soapAction"/>
- </div>
- </xsl:if>
-
- <xsl:if test="$binding-operation/@location">
- <div class="label">HTTP path:</div>
- <div class="value">
- <xsl:value-of select="$binding-operation/@location"/>
- </div>
- </xsl:if>
- </xsl:if>
- <xsl:apply-templates select="ws:input|ws:output|ws:fault" mode="operations.message">
- <xsl:with-param name="binding-data" select="$binding-info"/>
- </xsl:apply-templates>
- </li>
- </xsl:template>
- <xsl:template match="ws:input|ws:output|ws:fault" mode="operations.message">
- <xsl:param name="binding-data"/>
- <xsl:if test="$ENABLE-INOUTFAULT">
- <div class="label">
- <xsl:value-of select="concat(translate(substring(local-name(.), 1, 1), 'abcdefghijklmnoprstuvwxyz', 'ABCDEFGHIJKLMNOPRSTUVWXYZ'), substring(local-name(.), 2), ':')"/>
- </div>
-
- <xsl:variable name="msg-local-name" select="substring-after(@message, ':')"/>
- <xsl:variable name="msg-name">
- <xsl:choose>
- <xsl:when test="$msg-local-name">
- <xsl:value-of select="$msg-local-name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@message"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="msg" select="$consolidated-wsdl/ws:message[@name = $msg-name]"/>
- <xsl:choose>
- <xsl:when test="$msg">
- <xsl:apply-templates select="$msg" mode="operations.message">
- <xsl:with-param name="binding-data"
- select="$binding-data/ws:*[local-name(.) = local-name(current())]/*"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <div class="value">
- <i>none</i>
- </div>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
- </xsl:template>
- <xsl:template match="ws:message" mode="operations.message">
- <xsl:param name="binding-data"/>
- <div class="value">
- <xsl:value-of select="@name"/>
- <xsl:if test="$binding-data">
- <xsl:text> (</xsl:text>
- <xsl:value-of select="name($binding-data)"/>
- <xsl:variable name="use" select="$binding-data/@use"/>
- <xsl:if test="$use">
- <xsl:text>, use = </xsl:text>
- <xsl:value-of select="$use"/>
- </xsl:if>
- <xsl:variable name="part" select="$binding-data/@part"/>
- <xsl:if test="$part">
- <xsl:text>, part = </xsl:text>
- <xsl:value-of select="$part"/>
- </xsl:if>
- <xsl:text>)</xsl:text>
- </xsl:if>
- <xsl:call-template name="render.source-code-link"/>
- </div>
-
- <xsl:apply-templates select="ws:part" mode="operations.message"/>
- </xsl:template>
- <xsl:template match="ws:part" mode="operations.message">
- <div class="value box" style="margin-bottom: 3px">
- <xsl:choose>
- <xsl:when test="string-length(@name) > 0">
- <b>
- <xsl:value-of select="@name"/>
- </b>
-
- <xsl:variable name="elem-or-type">
- <xsl:choose>
- <xsl:when test="@type">
- <xsl:value-of select="@type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@element"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="type-local-name" select="substring-after($elem-or-type, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="$elem-or-type">
- <xsl:value-of select="$elem-or-type"/>
- </xsl:when>
- <xsl:otherwise>unknown</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:call-template name="render-type">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
-
- <xsl:variable name="part-type"
- select="$consolidated-xsd[@name = $type-name and not(xsd:simpleType)][1]"/>
- <xsl:apply-templates select="$part-type" mode="operations.message.part"/>
-
- </xsl:when>
- <xsl:otherwise>
- <i>none</i>
- </xsl:otherwise>
- </xsl:choose>
- </div>
- </xsl:template>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-operations.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-xsd-tree.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:template match="xsd:simpleType" mode="operations.message.part"/>
- <xsl:template name="recursion.should.continue">
- <xsl:param name="anti.recursion"/>
- <xsl:param name="recursion.label"/>
- <xsl:param name="recursion.count">1</xsl:param>
- <xsl:variable name="has.recursion" select="contains($anti.recursion, $recursion.label)"/>
- <xsl:variable name="anti.recursion.fragment"
- select="substring-after($anti.recursion, $recursion.label)"/>
- <xsl:choose>
- <xsl:when test="$recursion.count > $ANTIRECURSION-DEPTH"/>
-
- <xsl:when test="not($ENABLE-ANTIRECURSION-PROTECTION) or string-length($anti.recursion) = 0 or not($has.recursion)">
- <xsl:text>1</xsl:text>
- </xsl:when>
-
- <xsl:otherwise>
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion.fragment"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- <xsl:with-param name="recursion.count" select="$recursion.count + 1"/>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="xsd:complexType" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
-
- <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
- <xsl:variable name="recursion.test">
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="string-length($recursion.test) != 0">
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <span style="color:blue">
- <xsl:value-of select="$RECURSIVE"/>
- </span>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
- <xsl:template match="xsd:complexContent" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
-
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:complexType[descendant::xsd:attribute[ not(@*[local-name() = 'arrayType']) ]]"
- mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
- <xsl:variable name="recursion.test">
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="string-length($recursion.test) != 0">
- <ul type="circle">
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </ul>
- </xsl:when>
- <xsl:otherwise>
- <span style="color:blue">
- <xsl:value-of select="$RECURSIVE"/>
- </span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="xsd:restriction | xsd:extension" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="type-local-name" select="substring-after(@base, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="@base">
- <xsl:value-of select="@base"/>
- </xsl:when>
- <xsl:otherwise>unknown type</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="base-type" select="$consolidated-xsd[@name = $type-name][1]"/>
- <!-- xsl:if test="not($type/@abstract)">
- <xsl:apply-templates select="$type"/>
- </xsl:if -->
- <xsl:if test="$base-type != 'Array'">
- <xsl:apply-templates select="$base-type" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:if>
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:union" mode="operations.message.part">
- <xsl:call-template name="process-union">
- <xsl:with-param name="set" select="@memberTypes"/>
- </xsl:call-template>
- </xsl:template>
- <xsl:template name="process-union">
- <xsl:param name="set"/>
- <xsl:if test="$set">
- <xsl:variable name="item" select="substring-before($set, ' ')"/>
- <xsl:variable name="the-rest" select="substring-after($set, ' ')"/>
-
- <xsl:variable name="type-local-name" select="substring-after($item, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$item"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:call-template name="render-type">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
-
- <xsl:call-template name="process-union">
- <xsl:with-param name="set" select="$the-rest"/>
- </xsl:call-template>
- </xsl:if>
- </xsl:template>
- <xsl:template match="xsd:sequence" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <ul type="square">
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </ul>
- </xsl:template>
- <xsl:template match="xsd:all|xsd:any|xsd:choice" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="list-type">
- <xsl:choose>
- <xsl:when test="self::xsd:all">disc</xsl:when>
- <xsl:when test="self::xsd:any">circle</xsl:when>
- <xsl:otherwise>square</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:element name="ul">
- <xsl:attribute name="style">
- <xsl:value-of select="concat('list-style-type:', $list-type)"/>
- </xsl:attribute>
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:element>
- </xsl:template>
- <xsl:template match="xsd:element[parent::xsd:schema]" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
- <xsl:variable name="recursion.test">
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="string-length($recursion.test) != 0">
- <xsl:variable name="type-name">
- <xsl:call-template name="xsd.element-type"/>
- </xsl:variable>
- <xsl:variable name="elem-type"
- select="$consolidated-xsd[generate-id() != generate-id(current()) and $type-name and @name=$type-name and contains(local-name(), 'Type')][1]"/>
-
- <xsl:if test="$type-name != @name">
- <xsl:apply-templates select="$elem-type" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
-
- <xsl:if test="not($elem-type)">
- <xsl:call-template name="render-type">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:apply-templates select="*" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </xsl:if>
- </xsl:when>
- <xsl:otherwise>
- <span style="color:blue">
- <xsl:value-of select="$RECURSIVE"/>
- </span>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
- <xsl:template match="xsd:element | xsd:attribute" mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <!--
- <xsl:variable name="recursion.label" select="concat('[', @name, ']')"/>
--->
- <li>
- <xsl:variable name="local-ref" select="concat(@name, substring-after(@ref, ':'))"/>
- <xsl:variable name="elem-name">
- <xsl:choose>
- <xsl:when test="@name">
- <xsl:value-of select="@name"/>
- </xsl:when>
- <xsl:when test="$local-ref">
- <xsl:value-of select="$local-ref"/>
- </xsl:when>
- <xsl:when test="@ref">
- <xsl:value-of select="@ref"/>
- </xsl:when>
- <xsl:otherwise>anonymous</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$elem-name"/>
-
- <xsl:variable name="type-name">
- <xsl:call-template name="xsd.element-type"/>
- </xsl:variable>
-
- <xsl:call-template name="render-type">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
-
- <xsl:variable name="elem-type"
- select="$consolidated-xsd[@name = $type-name and contains(local-name(), 'Type')][1]"/>
- <xsl:apply-templates select="$elem-type | *" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </li>
- </xsl:template>
- <xsl:template match="xsd:attribute[ @*[local-name() = 'arrayType'] ]"
- mode="operations.message.part">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="array-local-name"
- select="substring-after(@*[local-name() = 'arrayType'], ':')"/>
- <xsl:variable name="type-local-name" select="substring-before($array-local-name, '[')"/>
- <xsl:variable name="array-type" select="$consolidated-xsd[@name = $type-local-name][1]"/>
-
- <xsl:variable name="recursion.label" select="concat('[', $type-local-name, ']')"/>
- <xsl:variable name="recursion.test">
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:choose>
- <xsl:when test="string-length($recursion.test) != 0">
- <xsl:apply-templates select="$array-type" mode="operations.message.part">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
- <span style="color:blue">
- <xsl:value-of select="$RECURSIVE"/>
- </span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template name="xsd.element-type">
- <xsl:variable name="ref-or-type">
- <xsl:choose>
- <xsl:when test="@type">
- <xsl:value-of select="@type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@ref"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="type-local-name" select="substring-after($ref-or-type, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="$ref-or-type">
- <xsl:value-of select="$ref-or-type"/>
- </xsl:when>
- <xsl:otherwise>undefined</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:value-of select="$type-name"/>
- </xsl:template>
- <xsl:template match="xsd:documentation" mode="operations.message.part">
- <div style="color:green">
- <xsl:value-of select="." disable-output-escaping="yes"/>
- </div>
- </xsl:template>
- <xsl:template name="render-type">
- <xsl:param name="anti.recursion"/>
- <xsl:param name="type-local-name"/>
-
- <xsl:if test="$ENABLE-OPERATIONS-TYPE">
- <xsl:variable name="properties">
- <xsl:if test="self::xsd:element | self::xsd:attribute[parent::xsd:complexType]">
- <xsl:variable name="min">
- <xsl:if test="@minOccurs = '0'">optional</xsl:if>
- </xsl:variable>
- <xsl:variable name="max">
- <xsl:if test="@maxOccurs = 'unbounded'">unbounded</xsl:if>
- </xsl:variable>
- <xsl:variable name="nillable">
- <xsl:if test="@nillable">nillable</xsl:if>
- </xsl:variable>
-
- <xsl:if test="(string-length($min) + string-length($max) + string-length($nillable) + string-length(@use)) > 0">
- <xsl:text> - </xsl:text>
- <xsl:value-of select="$min"/>
- <xsl:if test="string-length($min) and string-length($max)">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:value-of select="$max"/>
- <xsl:if test="(string-length($min) + string-length($max)) > 0 and string-length($nillable)">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:value-of select="$nillable"/>
- <xsl:if test="(string-length($min) + string-length($max) + string-length($nillable)) > 0 and string-length(@use)">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:value-of select="@use"/>
- <xsl:text>; </xsl:text>
- </xsl:if>
- </xsl:if>
- </xsl:variable>
-
- <xsl:variable name="recursion.label" select="concat('[', $type-local-name, ']')"/>
- <xsl:variable name="recursion.test">
- <xsl:call-template name="recursion.should.continue">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- <xsl:with-param name="recursion.label" select="$recursion.label"/>
- <xsl:with-param name="recursion.count" select="$ANTIRECURSION-DEPTH"/>
- </xsl:call-template>
- </xsl:variable>
-
- <xsl:if test="string-length($recursion.test) != 0">
- <span style="color:blue">
- <xsl:value-of select="$properties"/>
- <xsl:variable name="elem-type"
- select="$consolidated-xsd[@name = $type-local-name and (not(contains(local-name(current()), 'element')) or contains(local-name(), 'Type'))][1]"/>
- <xsl:if test="string-length($type-local-name) > 0">
- <xsl:call-template name="render-type.write-name">
- <xsl:with-param name="type-local-name" select="$type-local-name"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:choose>
- <xsl:when test="$elem-type">
-
- <xsl:apply-templates select="$elem-type" mode="render-type">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:otherwise>
-
- <xsl:apply-templates select="*" mode="render-type">
- <xsl:with-param name="anti.recursion" select="concat($anti.recursion, $recursion.label)"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </span>
- </xsl:if>
- </xsl:if>
- </xsl:template>
- <xsl:template name="render-type.write-name">
- <xsl:param name="type-local-name"/>
- <xsl:text> type </xsl:text>
- <big>
- <i>
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:otherwise>undefined</xsl:otherwise>
- </xsl:choose>
- </i>
- </big>
- </xsl:template>
- <xsl:template match="*" mode="render-type"/>
- <xsl:template match="xsd:element | xsd:complexType | xsd:simpleType | xsd:complexContent"
- mode="render-type">
- <xsl:param name="anti.recursion"/>
- <xsl:apply-templates select="*" mode="render-type">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:restriction[ parent::xsd:simpleType ]" mode="render-type">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="type-local-name" select="substring-after(@base, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="@base">
- <xsl:value-of select="@base"/>
- </xsl:when>
- <xsl:otherwise>undefined</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:text> - </xsl:text>
- <xsl:call-template name="render-type.write-name">
- <xsl:with-param name="type-local-name" select="$type-local-name"/>
- </xsl:call-template>
- <xsl:text> with </xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:apply-templates select="*" mode="render-type">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:simpleType/xsd:restriction/xsd:*[not(self::xsd:enumeration)]"
- mode="render-type">
- <xsl:text> </xsl:text>
- <xsl:value-of select="local-name()"/>
- <xsl:text>(</xsl:text>
- <xsl:value-of select="@value"/>
- <xsl:text>)</xsl:text>
- </xsl:template>
- <xsl:template match="xsd:restriction | xsd:extension" mode="render-type">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="type-local-name" select="substring-after(@base, ':')"/>
- <xsl:variable name="type-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="@base">
- <xsl:value-of select="@base"/>
- </xsl:when>
- <xsl:otherwise>undefined</xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="base-type" select="$consolidated-xsd[@name = $type-name][1]"/>
- <xsl:variable name="abstract">
- <xsl:if test="$base-type/@abstract">abstract </xsl:if>
- </xsl:variable>
-
- <xsl:if test="not($type-name = 'Array')">
- <xsl:value-of select="concat(' - ', local-name(), ' of ', $abstract)"/>
- <xsl:call-template name="render-type.write-name">
- <xsl:with-param name="type-local-name" select="$type-name"/>
- </xsl:call-template>
- </xsl:if>
-
- <xsl:apply-templates select="$base-type | *" mode="render-type">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:attribute[ @*[local-name() = 'arrayType'] ]" mode="render-type">
- <xsl:param name="anti.recursion"/>
- <xsl:variable name="array-local-name"
- select="substring-after(@*[local-name() = 'arrayType'], ':')"/>
- <xsl:variable name="type-local-name" select="substring-before($array-local-name, '[')"/>
- <xsl:variable name="array-type" select="$consolidated-xsd[@name = $type-local-name][1]"/>
-
- <xsl:text> - array of </xsl:text>
- <xsl:call-template name="render-type.write-name">
- <xsl:with-param name="type-local-name" select="$type-local-name"/>
- </xsl:call-template>
-
- <xsl:apply-templates select="$array-type" mode="render-type">
- <xsl:with-param name="anti.recursion" select="$anti.recursion"/>
- </xsl:apply-templates>
- </xsl:template>
- <xsl:template match="xsd:enumeration" mode="render-type"/>
- <xsl:template match="xsd:enumeration[not(preceding-sibling::xsd:enumeration)]"
- mode="render-type">
- <xsl:text> - enum { </xsl:text>
- <xsl:apply-templates select="self::* | following-sibling::xsd:enumeration" mode="render-type.enum"/>
- <xsl:text> }</xsl:text>
- </xsl:template>
- <xsl:template match="xsd:enumeration" mode="render-type.enum">
- <xsl:if test="preceding-sibling::xsd:enumeration">
- <xsl:text>, </xsl:text>
- </xsl:if>
- <xsl:text disable-output-escaping="yes">'</xsl:text>
- <xsl:value-of select="@value"/>
- <xsl:text disable-output-escaping="yes">'</xsl:text>
- </xsl:template>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-xsd-tree.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-<!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Begin of included transformation: wsdl-viewer-src.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-<xsl:template match="@*" mode="src.import">
- <xsl:param name="src.import.stack"/>
- <xsl:variable name="recursion.label" select="concat('[', string(.), ']')"/>
- <xsl:variable name="recursion.check" select="concat($src.import.stack, $recursion.label)"/>
-
- <xsl:choose>
- <xsl:when test="contains($src.import.stack, $recursion.label)">
- <h2 style="red">
- <xsl:value-of select="concat('Cyclic include / import: ', $recursion.check)"/>
- </h2>
- </xsl:when>
- <xsl:otherwise>
- <h2>
- <a name="{concat($SRC-FILE-PREFIX, generate-id(..))}">
- <xsl:choose>
- <xsl:when test="parent::xsd:include">Included </xsl:when>
- <xsl:otherwise>Imported </xsl:otherwise>
- </xsl:choose>
-
- <xsl:choose>
- <xsl:when test="name() = 'location'">WSDL </xsl:when>
- <xsl:otherwise>Schema </xsl:otherwise>
- </xsl:choose>
- <i>
- <xsl:value-of select="."/>
- </i>
- </a>
- </h2>
-
- <div class="box">
- <xsl:apply-templates select="document(string(.))" mode="src"/>
- </div>
-
- <xsl:apply-templates select="document(string(.))/*/*[local-name() = 'import'][@location]/@location"
- mode="src.import">
- <xsl:with-param name="src.import.stack" select="$recursion.check"/>
- </xsl:apply-templates>
- <xsl:apply-templates select="document(string(.))//xsd:import[@schemaLocation]/@schemaLocation"
- mode="src.import">
- <xsl:with-param name="src.import.stack" select="$recursion.check"/>
- </xsl:apply-templates>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
- <xsl:template match="*" mode="src">
- <div class="xml-element">
- <a name="{concat($SRC-PREFIX, generate-id(.))}">
- <xsl:apply-templates select="." mode="src.link"/>
- <xsl:apply-templates select="." mode="src.start-tag"/>
- </a>
- <xsl:apply-templates select="*|comment()|processing-instruction()|text()[string-length(normalize-space(.)) > 0]"
- mode="src"/>
- <xsl:apply-templates select="." mode="src.end-tag"/>
- </div>
- </xsl:template>
- <xsl:template match="*" mode="src.start-tag">
- <xsl:call-template name="src.elem">
- <xsl:with-param name="src.elem.end-slash"> /</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="*[*|comment()|processing-instruction()|text()[string-length(normalize-space(.)) > 0]]"
- mode="src.start-tag">
- <xsl:call-template name="src.elem"/>
- </xsl:template>
- <xsl:template match="*" mode="src.end-tag"/>
- <xsl:template match="*[*|comment()|processing-instruction()|text()[string-length(normalize-space(.)) > 0]]"
- mode="src.end-tag">
- <xsl:call-template name="src.elem">
- <xsl:with-param name="src.elem.start-slash">/</xsl:with-param>
- </xsl:call-template>
- </xsl:template>
- <xsl:template match="*" mode="src.link-attribute">
- <xsl:if test="$ENABLE-LINK">
- <xsl:attribute name="href">
- <xsl:value-of select="concat('#', $SRC-PREFIX, generate-id(.))"/>
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="*[local-name() = 'import' or local-name() = 'include'][@location or @schemaLocation]"
- mode="src.link">
- <xsl:if test="$ENABLE-LINK">
- <xsl:attribute name="href">
- <xsl:value-of select="concat('#', $SRC-FILE-PREFIX, generate-id(.))"/>
- </xsl:attribute>
- </xsl:if>
- </xsl:template>
- <xsl:template match="*" mode="src.link"/>
- <xsl:template match="ws2:service|ws2:binding" mode="src.link">
- <xsl:variable name="iface-name">
- <xsl:apply-templates select="@interface" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface[@name = $iface-name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws2:endpoint" mode="src.link">
- <xsl:variable name="binding-name">
- <xsl:apply-templates select="@binding" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:binding[@name = $binding-name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws2:binding/ws2:operation" mode="src.link">
- <xsl:variable name="operation-name">
- <xsl:apply-templates select="@ref" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface/ws2:operation[@name = $operation-name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws2:binding/ws2:fault|ws2:interface/ws2:operation/ws2:infault|ws2:interface/ws2:operation/ws2:outfault"
- mode="src.link">
- <xsl:variable name="operation-name">
- <xsl:apply-templates select="@ref" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface/ws2:fault[@name = $operation-name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws2:interface/ws2:operation/ws2:input|ws2:interface/ws2:operation/ws2:output|ws2:interface/ws2:fault"
- mode="src.link">
- <xsl:variable name="elem-name">
- <xsl:apply-templates select="@element" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-xsd[@name = $elem-name]" mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws:operation/ws:input[@message] | ws:operation/ws:output[@message] | ws:operation/ws:fault[@message] | soap:header[ancestor::ws:operation and @message]"
- mode="src.link">
- <xsl:apply-templates select="$consolidated-wsdl/ws:message[@name = substring-after( current()/@message, ':' )]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws:operation/ws:input[@message] | ws:operation/ws:output[@message] | ws:operation/ws:fault[@message] | soap:header[ancestor::ws:operation and @message]"
- mode="src.link">
- <xsl:apply-templates select="$consolidated-wsdl/ws:message[@name = substring-after( current()/@message, ':' )]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws:message/ws:part[@element or @type]" mode="src.link">
- <xsl:variable name="elem-local-name" select="substring-after(@element, ':')"/>
- <xsl:variable name="type-local-name" select="substring-after(@type, ':')"/>
- <xsl:variable name="elem-name">
- <xsl:choose>
- <xsl:when test="$elem-local-name">
- <xsl:value-of select="$elem-local-name"/>
- </xsl:when>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="@element">
- <xsl:value-of select="@element"/>
- </xsl:when>
- <xsl:when test="@type">
- <xsl:value-of select="@type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="src.syntax-error"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:apply-templates select="$consolidated-xsd[@name = $elem-name]" mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws:service/ws:port[@binding]" mode="src.link">
- <xsl:variable name="binding-name">
- <xsl:apply-templates select="@binding" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws:binding[@name = $binding-name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="ws:operation[@name and parent::ws:binding/@type]" mode="src.link">
- <xsl:variable name="type-name">
- <xsl:apply-templates select="../@type" mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws:portType[@name = $type-name]/ws:operation[@name = current()/@name]"
- mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template match="xsd:element[@ref or @type]" mode="src.link">
- <xsl:variable name="ref-or-type">
- <xsl:choose>
- <xsl:when test="@type">
- <xsl:value-of select="@type"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@ref"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:variable name="type-local-name" select="substring-after($ref-or-type, ':')"/>
- <xsl:variable name="xsd-name">
- <xsl:choose>
- <xsl:when test="$type-local-name">
- <xsl:value-of select="$type-local-name"/>
- </xsl:when>
- <xsl:when test="$ref-or-type">
- <xsl:value-of select="$ref-or-type"/>
- </xsl:when>
- <xsl:otherwise/>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:if test="$xsd-name">
- <xsl:variable name="msg"
- select="$consolidated-xsd[@name = $xsd-name and contains(local-name(), 'Type')][1]"/>
- <xsl:apply-templates select="$msg" mode="src.link-attribute"/>
- </xsl:if>
- </xsl:template>
- <xsl:template match="xsd:attribute[contains(@ref, 'arrayType')]" mode="src.link">
- <xsl:variable name="att-array-type"
- select="substring-before(@*[local-name() = 'arrayType'], '[]')"/>
- <xsl:variable name="xsd-local-name" select="substring-after($att-array-type, ':')"/>
- <xsl:variable name="xsd-name">
- <xsl:choose>
- <xsl:when test="$xsd-local-name">
- <xsl:value-of select="$xsd-local-name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="$att-array-type"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:if test="$xsd-name">
- <xsl:variable name="msg" select="$consolidated-xsd[@name = $xsd-name][1]"/>
- <xsl:apply-templates select="$msg" mode="src.link-attribute"/>
- </xsl:if>
- </xsl:template>
- <xsl:template match="xsd:extension | xsd:restriction" mode="src.link">
- <xsl:variable name="xsd-local-name" select="substring-after(@base, ':')"/>
- <xsl:variable name="xsd-name">
- <xsl:choose>
- <xsl:when test="$xsd-local-name">
- <xsl:value-of select="$xsd-local-name"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:value-of select="@type"/>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:variable>
- <xsl:variable name="msg" select="$consolidated-xsd[@name = $xsd-name][1]"/>
- <xsl:apply-templates select="$msg" mode="src.link-attribute"/>
- </xsl:template>
- <xsl:template name="src.elem">
- <xsl:param name="src.elem.start-slash"/>
- <xsl:param name="src.elem.end-slash"/>
-
- <xsl:value-of select="concat('<', $src.elem.start-slash, name(.))"
- disable-output-escaping="no"/>
- <xsl:if test="not($src.elem.start-slash)">
- <xsl:apply-templates select="@*" mode="src"/>
- <xsl:apply-templates select="." mode="src.namespace"/>
- </xsl:if>
- <xsl:value-of select="concat($src.elem.end-slash, '>')" disable-output-escaping="no"/>
- </xsl:template>
- <xsl:template match="@*" mode="src">
- <xsl:text> </xsl:text>
- <span class="xml-att">
- <xsl:value-of select="concat(name(), '=')"/>
- <span class="xml-att-val">
- <xsl:value-of select="concat('"', ., '"')" disable-output-escaping="yes"/>
- </span>
- </span>
- </xsl:template>
- <xsl:template match="*" mode="src.namespace">
- <xsl:variable name="supports-namespace-axis" select="count(/*/namespace::*) > 0"/>
- <xsl:variable name="current" select="current()"/>
-
- <xsl:choose>
- <xsl:when test="count(/*/namespace::*) > 0">
- <!--
- When the namespace axis is present (e.g. Internet Explorer), we can simulate
- the namespace declarations by comparing the namespaces in scope on this element
- with those in scope on the parent element. Any difference must have been the
- result of a namespace declaration. Note that this doesn't reflect the actual
- source - it will strip out redundant namespace declarations.
- -->
- <xsl:for-each select="namespace::*[. != 'http://www.w3.org/XML/1998/namespace']">
- <xsl:if test="not($current/parent::*[namespace::*[. = current()]])">
- <div class="xml-att">
- <xsl:text> xmlns</xsl:text>
- <xsl:if test="string-length(name())">:</xsl:if>
- <xsl:value-of select="concat(name(), '=')"/>
- <span class="xml-att-val">
- <xsl:value-of select="concat('"', ., '"')" disable-output-escaping="yes"/>
- </span>
- </div>
- </xsl:if>
- </xsl:for-each>
- </xsl:when>
- <xsl:otherwise>
- <!--
- When the namespace axis isn't supported (e.g. Mozilla), we can simulate
- appropriate declarations from namespace elements.
- This currently doesn't check for namespaces on attributes.
- In the general case we can't reliably detect the use of QNames in content, but
- in the case of schema, we know which content could contain a QName and look
- there too. This mechanism is rather unpleasant though, since it records
- namespaces where they are used rather than showing where they are declared
- (on some parent element) in the source. Yukk!
- -->
- <xsl:if test="namespace-uri(.) != namespace-uri(parent::*) or not(parent::*)">
- <span class="xml-att">
- <xsl:text> xmlns</xsl:text>
- <xsl:if test="substring-before(name(),':') != ''">:</xsl:if>
- <xsl:value-of select="substring-before(name(),':')"/>
- <xsl:text>=</xsl:text>
- <span class="xml-att-val">
- <xsl:value-of select="concat('"', namespace-uri(.), '"')" disable-output-escaping="yes"/>
- </span>
- </span>
- </xsl:if>
- </xsl:otherwise>
- </xsl:choose>
-
- </xsl:template>
- <xsl:template match="text()" mode="src">
- <span class="xml-text">
- <xsl:value-of select="." disable-output-escaping="no"/>
- </span>
- </xsl:template>
- <xsl:template match="comment()" mode="src">
- <div class="xml-comment">
- <xsl:text disable-output-escaping="no"><!-- </xsl:text>
- <xsl:value-of select="." disable-output-escaping="no"/>
- <xsl:text disable-output-escaping="no"> -->
-</xsl:text>
- </div>
- </xsl:template>
- <xsl:template match="processing-instruction()" mode="src">
- <div class="xml-proc">
- <xsl:text disable-output-escaping="no"><?</xsl:text>
- <xsl:copy-of select="name(.)"/>
- <xsl:value-of select="concat(' ', .)" disable-output-escaping="yes"/>
- <xsl:text disable-output-escaping="no"> ?>
-</xsl:text>
- </div>
- </xsl:template>
-
- <!--
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- End of included transformation: wsdl-viewer-src.xsl
-@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
--->
-
-
-
-
-
-<!--
-==================================================================
- Starting point
-==================================================================
--->
-
-<xsl:template match="/">
- <html>
- <xsl:call-template name="head.render"/>
- <xsl:call-template name="body.render"/>
- </html>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: HTML head
-==================================================================
--->
-
-<xsl:template name="head.render">
- <head>
- <title>
- <xsl:value-of select="concat($html-title, ' - ', 'Generated by wsdl-viewer.xsl')"/>
- </title>
- <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
- <meta http-equiv="content-script-type" content="text/javascript"/>
- <meta http-equiv="content-style-type" content="text/css"/>
- <meta name="Generator" content="http://tomi.vanek.sk/xml/wsdl-viewer.xsl"/>
-
- <meta http-equiv="imagetoolbar" content="false"/>
- <meta name="MSSmartTagsPreventParsing" content="true"/>
-
- <style type="text/css">
- <xsl:value-of select="$css" disable-output-escaping="yes"/>
- </style>
-
- <script src="wsdl-viewer.js" type="text/javascript" language="javascript">
- <xsl:comment>
- <xsl:text>
- // </xsl:text>
- </xsl:comment>
- </script>
- </head>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: HTML body
-==================================================================
--->
-
-<xsl:template name="body.render">
- <body id="operations">
- <div id="outer_box">
- <div id="inner_box" onload="pagingInit()">
- <xsl:call-template name="title.render"/>
-
-
- <!-- TODO: pages with tabs for selecting some aspect of the WSDL
- <xsl:call-template name="navig.render"/>
--->
-
- <xsl:call-template name="content.render"/>
- <xsl:call-template name="footer.render"/>
- </div>
- </div>
- </body>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: heading
-==================================================================
--->
-
-<xsl:template name="title.render">
- <div id="header">
- <h1>
- <xsl:value-of select="$html-title"/>
- </h1>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: navigation
-==================================================================
--->
-
-<xsl:template name="navig.render">
- <div id="outer_nav">
- <div id="nav" class="floatcontainer">
- <ul>
- <li id="nav-service">
- <a href="#page.service">Service</a>
- </li>
- <li id="nav-operations">
- <a href="#page.operations">Operations</a>
- </li>
- <li id="nav-wsdl">
- <a href="#page.src">Source Code</a>
- </li>
-
-
- <!-- <li id="nav-client"><a href="#TODO-1">Client</a></li>
-
-
-
- <li id="nav-about">
- <a href="#page.about" class="current">About</a>
- </li>-->
- </ul>
- </div>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: content
-==================================================================
--->
-
-<xsl:template name="content.render">
- <div id="content">
- <xsl:if test="$ENABLE-SERVICE-PARAGRAPH">
- <xsl:call-template name="service.render"/>
- </xsl:if>
- <xsl:if test="$ENABLE-OPERATIONS-PARAGRAPH">
- <xsl:call-template name="operations.render"/>
- </xsl:if>
- <xsl:if test="$ENABLE-SRC-CODE-PARAGRAPH">
- <xsl:call-template name="src.render"/>
- </xsl:if>
- <xsl:if test="$ENABLE-ABOUT-PARAGRAPH">
- <xsl:call-template name="about.render">
- <xsl:with-param name="version" select="$wsdl-viewer.version"/>
- </xsl:call-template>
- </xsl:if>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: footer
-==================================================================
--->
-
-<xsl:template name="footer.render">
- <div id="footer">
- This page was generated by wsdl-viewer.xsl (<a href="http://tomi.vanek.sk">http://tomi.vanek.sk</a>)
-</div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: WSDL service information
-==================================================================
--->
-
-<xsl:template name="service.render">
- <div class="page">
- <a class="target" name="page.service">
- <h2>
- <xsl:value-of select="$html-title"/>
- </h2>
- </a>
- <xsl:apply-templates select="$consolidated-wsdl/*[local-name(.) = 'documentation']"
- mode="documentation.render"/>
- <xsl:apply-templates select="$consolidated-wsdl/ws:service|$consolidated-wsdl/ws2:service"
- mode="service-start"/>
- <xsl:if test="not($consolidated-wsdl/*[local-name() = 'service']/@name)">
-
-
-<!-- If the WS is without implementation, just with binding points = WS interface -->
-
- <xsl:apply-templates select="$consolidated-wsdl/ws:binding" mode="service-start"/>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface" mode="service"/>
- </xsl:if>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: WSDL operations - detail
-==================================================================
--->
-
-<xsl:template name="operations.render">
- <div class="page">
- <a class="target" name="page.operations">
- <h2>Operations</h2>
- </a>
- <ul>
- <xsl:apply-templates select="$consolidated-wsdl/ws:portType" mode="operations">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
-
- <xsl:choose>
- <xsl:when test="$consolidated-wsdl/*[local-name() = 'service']/@name">
- <xsl:variable name="iface-name">
- <xsl:apply-templates select="$consolidated-wsdl/*[local-name() = 'service']/@interface"
- mode="qname.normalized"/>
- </xsl:variable>
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface[@name = $iface-name]"
- mode="operations">
- <xsl:sort select="@name"/>
- </xsl:apply-templates>
- </xsl:when>
- <xsl:when test="$consolidated-wsdl/ws2:interface/@name">
-
-
-<!-- TODO: What to do if there are more interfaces? -->
-
- <xsl:apply-templates select="$consolidated-wsdl/ws2:interface[1]" mode="operations"/>
- </xsl:when>
- <xsl:otherwise>
-
-
-<!-- TODO: Error message or handling somehow this unexpected situation -->
-
- </xsl:otherwise>
- </xsl:choose>
- </ul>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: WSDL and XSD source code files
-==================================================================
--->
-
-<xsl:template name="src.render">
- <div class="page">
- <a class="target" name="page.src">
- <h2>WSDL source code</h2>
- </a>
- <div class="box">
- <div class="xml-proc">
- <xsl:text><?xml version="1.0"?></xsl:text>
- </div>
- <xsl:apply-templates select="/" mode="src"/>
- </div>
-
- <xsl:apply-templates select="/*/*[local-name() = 'import'][@location]/@location" mode="src.import"/>
- <xsl:apply-templates select="$consolidated-wsdl/*[local-name() = 'types']//xsd:import[@schemaLocation]/@schemaLocation | $consolidated-wsdl/*[local-name() = 'types']//xsd:include[@schemaLocation]/@schemaLocation"
- mode="src.import"/>
- </div>
- </xsl:template>
-
-
-
- <!--
-==================================================================
- Rendering: About
-==================================================================
--->
-
-<xsl:template name="about.render">
- <xsl:param name="version"/>
- <div class="page">
- <a class="target" name="page.about">
- <h2>About <em>wsdl-viewer.xsl</em>
- </h2>
- </a>
- <div class="floatcontainer">
- <div id="fix_column">
- <div class="shadow">
- <div class="box">
- <xsl:call-template name="processor-info.render"/>
- </div>
- </div>
- </div>
-
- <div id="flexi_column">
- <xsl:call-template name="about.detail">
- <xsl:with-param name="version" select="$wsdl-viewer.version"/>
- </xsl:call-template>
- </div>
- </div>
- </div>
- </xsl:template>
-
-
-</xsl:stylesheet>
\ No newline at end of file diff --git a/qpid/java/management/client/console/wsdm_rmd_perspective.jsp b/qpid/java/management/client/console/wsdm_rmd_perspective.jsp index fc114a962d..fe70930627 100644 --- a/qpid/java/management/client/console/wsdm_rmd_perspective.jsp +++ b/qpid/java/management/client/console/wsdm_rmd_perspective.jsp @@ -18,7 +18,7 @@ <body>
<div id="page" align="center">
<jsp:include page="/fragments/header.jsp">
- <jsp:param name="title" value="Resource Management - WS-DM WSDL Perspective"/>
+ <jsp:param name="title" value="Resource Management - WS-DM RMD Perspective"/>
</jsp:include>
<div id="content" align="center">
@@ -63,12 +63,8 @@ </tr>
<tr>
<td valign="top">
- <div class="panel" align="justify" style="height:500px; overflow-y:auto;">
- <c:set var="xml">
- ${wsdl}
- </c:set>
- <c:import var="xslt" url="wsdl-viewer.xsl" />
- <x:transform xml="${xml}" xslt="${xslt}" />
+ <div class="panel" align="left" style="height:500px; width=200px; overflow-y:auto; font-size: smaller; font-weight:bold;">
+ <pre> <c:out value="${rmd}" /> </pre>
</div>
</td>
</tr>
diff --git a/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp b/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp index b725716fd8..3759459842 100644 --- a/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp +++ b/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp @@ -63,12 +63,8 @@ </tr>
<tr>
<td valign="top">
- <div class="panel" align="justify" style="height:500px; overflow-y:auto;">
- <c:set var="xml">
- ${wsdl}
- </c:set>
- <c:import var="xslt" url="wsdl-viewer.xsl" />
- <x:transform xml="${xml}" xslt="${xslt}" />
+ <div class="panel" align="left" style="height:500px; width=200px; overflow-y:auto; font-size: smaller; font-weight:bold;">
+ <pre> <c:out value="${wsdl}" /> </pre>
</div>
</td>
</tr>
diff --git a/qpid/java/management/client/src/example/PauseAndResumeSubscription.out.ok b/qpid/java/management/client/src/example/PauseAndResumeSubscription.out.ok new file mode 100644 index 0000000000..8a98e1d0b7 --- /dev/null +++ b/qpid/java/management/client/src/example/PauseAndResumeSubscription.out.ok @@ -0,0 +1,133 @@ +This example is demonstrating a WS-Notification scenario
+when (for simplicity) QMan is at the same time consumer
+and producer.
+
+Specifically the example shows how a requestor can create,
+pause and resume a subscription.
+Type enter to proceed...
+
+[CLIENT TRACE] SOAP envelope contents (outgoing):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://romagazzarini:8080/qman/services/adapter</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:485cc87c-660e-de43-e8fa-4ad5fffa95a6</wsa:MessageID>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
+ </wsa:From>
+ </soap:Header>
+ <soap:Body>
+ <wsnt:Subscribe xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
+ <wsnt:ConsumerReference>
+ <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://romagazzarini:8080/qman/services/consumer</wsa:Address>
+ </wsnt:ConsumerReference>
+ </wsnt:Subscribe>
+ </soap:Body>
+</soap:Envelope>
+
+[CLIENT TRACE] SOAP envelope contents (incoming):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeResponse</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:0ee610d1-e211-95c6-a498-e1084a610c44</wsa:MessageID>
+ <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:485cc87c-660e-de43-e8fa-4ad5fffa95a6</wsa:RelatesTo>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://romagazzarini:8080/qman/services/adapter</wsa:Address>
+ </wsa:From>
+ </soap:Header>
+ <soap:Body>
+ <wsnt:SubscribeResponse xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
+ <wsnt:SubscriptionReference>
+ <wsa:Address xmlns:wsa="http://www.w3.org/2005/08/addressing">http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:Address>
+ <wsa:ReferenceParameters xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <qman-wsa:ResourceId xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing">282f28e6-4396-4000-a19d-87a03978e8a0</qman-wsa:ResourceId>
+ </wsa:ReferenceParameters>
+ </wsnt:SubscriptionReference>
+ <wsnt:CurrentTime>2009-02-27T13:51:56+01:00</wsnt:CurrentTime>
+ </wsnt:SubscribeResponse>
+ </soap:Body>
+</soap:Envelope>
+
+[CLIENT TRACE] SOAP envelope contents (outgoing):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/PauseSubscriptionRequest</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:35cc80af-84ac-2456-3e1f-edc2a7f60970</wsa:MessageID>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
+ </wsa:From>
+ <qman-wsa:ResourceId
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ wsa:IsReferenceParameter="true" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing">282f28e6-4396-4000-a19d-87a03978e8a0</qman-wsa:ResourceId>
+ </soap:Header>
+ <soap:Body>
+ <wsnt:PauseSubscription xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"/>
+ </soap:Body>
+</soap:Envelope>
+
+[CLIENT TRACE] SOAP envelope contents (incoming):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/PauseSubscriptionResponse</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:bb53d38a-428c-3d90-cc45-29d5cb27a8df</wsa:MessageID>
+ <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:35cc80af-84ac-2456-3e1f-edc2a7f60970</wsa:RelatesTo>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:Address>
+ <wsa:ReferenceParameters>
+ <qman-wsa:ResourceId wsa:IsReferenceParameter="true"
+ xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing">282f28e6-4396-4000-a19d-87a03978e8a0</qman-wsa:ResourceId>
+ </wsa:ReferenceParameters>
+ </wsa:From>
+ </soap:Header>
+ <soap:Body>
+ <muse-op:PauseSubscriptionResponse xmlns:muse-op="http://docs.oasis-open.org/wsn/b-2"/>
+ </soap:Body>
+</soap:Envelope>
+
+[CLIENT TRACE] SOAP envelope contents (outgoing):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/ResumeSubscriptionRequest</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:bfb48615-905a-e472-a9ca-5483fa592f60</wsa:MessageID>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://www.w3.org/2005/08/addressing/role/anonymous</wsa:Address>
+ </wsa:From>
+ <qman-wsa:ResourceId
+ xmlns:wsa="http://www.w3.org/2005/08/addressing"
+ wsa:IsReferenceParameter="true" xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing">282f28e6-4396-4000-a19d-87a03978e8a0</qman-wsa:ResourceId>
+ </soap:Header>
+ <soap:Body>
+ <wsnt:ResumeSubscription xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"/>
+ </soap:Body>
+</soap:Envelope>
+
+[CLIENT TRACE] SOAP envelope contents (incoming):
+
+<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
+ <soap:Header>
+ <wsa:To xmlns:wsa="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/role/anonymous</wsa:To>
+ <wsa:Action xmlns:wsa="http://www.w3.org/2005/08/addressing">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/ResumeSubscriptionResponse</wsa:Action>
+ <wsa:MessageID xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:aab4cf18-3cc0-30c4-7036-009e26bb3213</wsa:MessageID>
+ <wsa:RelatesTo RelationshipType="wsa:Reply" xmlns:wsa="http://www.w3.org/2005/08/addressing">uuid:bfb48615-905a-e472-a9ca-5483fa592f60</wsa:RelatesTo>
+ <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://romagazzarini:8080/qman/services/SubscriptionManager</wsa:Address>
+ <wsa:ReferenceParameters>
+ <qman-wsa:ResourceId wsa:IsReferenceParameter="true"
+ xmlns:qman-wsa="http://amqp.apache.org/qpid/management/qman/addressing" xmlns:wsa="http://www.w3.org/2005/08/addressing">282f28e6-4396-4000-a19d-87a03978e8a0</qman-wsa:ResourceId>
+ </wsa:ReferenceParameters>
+ </wsa:From>
+ </soap:Header>
+ <soap:Body>
+ <muse-op:ResumeSubscriptionResponse xmlns:muse-op="http://docs.oasis-open.org/wsn/b-2"/>
+ </soap:Body>
+</soap:Envelope>
+
diff --git a/qpid/java/management/client/src/example/org/apache/qpid/management/example/ConsumerAndProducerExample.java b/qpid/java/management/client/src/example/org/apache/qpid/management/example/ConsumerAndProducerExample.java index 93e78707e9..42587d78ff 100644 --- a/qpid/java/management/client/src/example/org/apache/qpid/management/example/ConsumerAndProducerExample.java +++ b/qpid/java/management/client/src/example/org/apache/qpid/management/example/ConsumerAndProducerExample.java @@ -26,7 +26,9 @@ import java.util.Date; import org.apache.muse.util.xml.XPathUtils;
import org.apache.muse.ws.addressing.EndpointReference;
import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.notification.impl.FilterCollection;
import org.apache.muse.ws.notification.impl.MessagePatternFilter;
+import org.apache.muse.ws.notification.impl.ProducerPropertiesFilter;
import org.apache.muse.ws.notification.impl.TopicFilter;
import org.apache.muse.ws.notification.remote.NotificationProducerClient;
import org.apache.qpid.management.Names;
@@ -65,11 +67,11 @@ public class ConsumerAndProducerExample extends AbstractQManExample void executeExample(String host, int port) throws Exception
{
// This is QMan...
- URI producerURI = URI.create("http://"+host+":"+port+"/qman/services/consumer");
+ URI producerURI = URI.create("http://"+host+":"+port+"/qman/services/adapter");
// ...and this is QMan too! Note that it has an hidden consumer capability that is used in
// order to run successfully this example...
- URI consumerURI = producerURI;
+ URI consumerURI = URI.create("http://"+host+":"+port+"/qman/services/consumer");
EndpointReference producerEPR = new EndpointReference(producerURI);
EndpointReference consumerEPR = new EndpointReference(consumerURI);
@@ -93,8 +95,11 @@ public class ConsumerAndProducerExample extends AbstractQManExample // Example 6: a MessageFilter is installed in order to listen only for connection events
// (connections created or removed). The subscription will expire in 10 seconds.
allMessagesWithMessageFilterAndTerminationTime(producerEPR,consumerEPR);
+
+ // Example 7 : a subscription with more than one filter.
+ complexSubscription(producerEPR, consumerEPR);
}
-
+
/**
* Makes a subscription on all topics / all messages without an expiry date.
*
@@ -223,6 +228,41 @@ public class ConsumerAndProducerExample extends AbstractQManExample new Date(System.currentTimeMillis() + 10000)); // Termination Time
}
+ /**
+ * Makes a subscription on a specifc topic with an expiry date.
+ * Only messages published on the given topic will be delivered to the given consumer.
+ * The subscription will end after 10 seconds
+ *
+ * @param producer the producer endpoint reference.
+ * @param consumer the consumer endpoint reference .
+ * @throws SoapFault when the subscription cannot be made.
+ */
+ private void complexSubscription(EndpointReference producer, EndpointReference consumer) throws SoapFault
+ {
+ NotificationProducerClient producerClient = new NotificationProducerClient(producer);
+ producerClient.setTrace(true);
+
+ FilterCollection filter = new FilterCollection();
+
+ TopicFilter topicFilter = new TopicFilter(Names.EVENTS_LIFECYLE_TOPIC_NAME);
+ MessagePatternFilter messageFilter= new MessagePatternFilter(
+ "/wsnt:NotificationMessage/wsnt:Message/qman:LifeCycleEvent/qman:Resource/qman:Name/text()='connection'", // expression (XPath)
+ XPathUtils.NAMESPACE_URI); // Dialect : the only supported dialect is XPath 1.0
+
+ ProducerPropertiesFilter producerFilter = new ProducerPropertiesFilter(
+ "boolean(/*/MgtPubInterval > 100 and /*/MsgTotalEnqueues > 56272)",
+ XPathUtils.NAMESPACE_URI);
+
+ filter.addFilter(topicFilter);
+ filter.addFilter(messageFilter);
+ filter.addFilter(producerFilter);
+
+ producerClient.subscribe(
+ consumer, // Consumer Endpoint reference
+ filter, // Topic Filter
+ new Date(System.currentTimeMillis() + 10000)); // Termination Time
+ }
+
@Override
void printOutExampleDescription()
{
@@ -245,4 +285,9 @@ public class ConsumerAndProducerExample extends AbstractQManExample System.out.println("A subscription with a termination time will have a predefined expiry");
System.out.println("date while if there's no termination the subscription will never expire.");
}
+
+ public static void main(String[] args)
+ {
+ new ConsumerAndProducerExample().execute(new String[]{"localhost","8080"});
+ }
}
diff --git a/qpid/java/management/client/src/example/org/apache/qpid/management/example/PausableSubscriptionExample.java b/qpid/java/management/client/src/example/org/apache/qpid/management/example/PausableSubscriptionExample.java new file mode 100644 index 0000000000..01a27a16f9 --- /dev/null +++ b/qpid/java/management/client/src/example/org/apache/qpid/management/example/PausableSubscriptionExample.java @@ -0,0 +1,88 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.example;
+
+import java.net.URI;
+
+import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.notification.remote.NotificationProducerClient;
+import org.apache.muse.ws.notification.remote.SubscriptionClient;
+
+/**
+ * This example is demonstrating a WS-Notification scenario
+ * when (for simplicity) QMan is at the same time consumer
+ * and producer.
+ *
+ * Specifically the example shows how a requestor can create, pause and resume
+ * a subscription.
+ *
+ * @author Andrea Gazzarini
+ *
+ */
+public class PausableSubscriptionExample extends AbstractQManExample
+{
+ @Override
+ void executeExample(String host, int port) throws Exception
+ {
+ // This is QMan...
+ URI producerURI = URI.create("http://"+host+":"+port+"/qman/services/adapter");
+
+ // ...and this is QMan too! Note that it has an hidden consumer capability that is used in
+ // order to run successfully this example...
+ URI consumerURI = URI.create("http://"+host+":"+port+"/qman/services/consumer");
+
+ EndpointReference producerEPR = new EndpointReference(producerURI);
+ EndpointReference consumerEPR = new EndpointReference(consumerURI);
+
+ NotificationProducerClient producerClient = new NotificationProducerClient(producerEPR);
+ producerClient.setTrace(true);
+
+ // 1) Creates a subscription and gets the corresponding reference.
+ SubscriptionClient subscriptionClient = producerClient.subscribe(
+ consumerEPR, // Consumer Endpoint reference
+ null, // Filter, if null that means "all messages"
+ null); // Termination Time : if null the subscription will never expire.
+ subscriptionClient.setTrace(true);
+
+
+ // 2) Pauses the subscription.
+ subscriptionClient.pauseSubscription();
+
+ // 3) Resumes the subscription.
+ subscriptionClient.resumeSubscription();
+ }
+
+ @Override
+ void printOutExampleDescription()
+ {
+ System.out.println("This example is demonstrating a WS-Notification scenario ");
+ System.out.println("when (for simplicity) QMan is at the same time consumer ");
+ System.out.println("and producer.");
+ System.out.println();
+ System.out.println("Specifically the example shows how a requestor can create,");
+ System.out.println("pause and resume a subscription.");
+ }
+
+ public static void main(String[] args)
+ {
+ new PausableSubscriptionExample().execute(new String[]{"romagazzarini","8080"});
+ }
+}
diff --git a/qpid/java/management/client/src/main/java/muse.xml b/qpid/java/management/client/src/main/java/muse.xml index d2f499cef9..cf651c34ac 100644 --- a/qpid/java/management/client/src/main/java/muse.xml +++ b/qpid/java/management/client/src/main/java/muse.xml @@ -29,7 +29,7 @@ <java-serializer-class>org.apache.qpid.management.wsdm.muse.serializer.DateSerializer</java-serializer-class>
</custom-serializer>
<router>
- <java-router-class>org.apache.muse.core.routing.SimpleResourceRouter</java-router-class>
+ <java-router-class>org.apache.muse.ws.resource.impl.WsResourceRouter</java-router-class>
<logging>
<log-file>log/muse.log</log-file>
<log-level>SEVERE</log-level>
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/Messages.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/Messages.java index 3d208835f0..4f84128fb3 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/Messages.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/Messages.java @@ -170,6 +170,6 @@ public interface Messages String QMAN_100037_INVOKE_OPERATION_FAILURE = "<QMAN-100037> : Operation Invocation failure for operation.";
String QMAN_100038_UNABLE_TO_SEND_WS_NOTIFICATION = "<QMAN-100038> : Unable to send notification.";
String QMAN_100039_UNABLE_TO_CONFIGURE_PROPERLY_WORKER_MANAGER = "<QMAN-100039> : Unable to properly configure WorkManager. A malformed property (NaN) was given as input parameter.";
-
+ String QMAN_100040_UNABLE_TO_LOCATE_WSRP_PROPERTIES = "<QMAN-100040> : Unable to evaluate the WSRP XPath expression on resource WSDL.";
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/Names.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/Names.java index 808cafb6a7..d3ce711d5d 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/Names.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/Names.java @@ -45,7 +45,7 @@ public abstract class Names public static String CLASS = "class"; public static String EVENT = "event"; public static String OBJECT_ID="objectId"; - public static String BROKER_ID = "brokerID"; + public static String BROKER_ID = "brokerId"; public static String DOMAIN_NAME = "Q-MAN"; public static String ARG_COUNT_PARAM_NAME = "argCount"; @@ -86,7 +86,7 @@ public abstract class Names new StringBuilder() .append(DOMAIN_NAME) .append(':') - .append("Type=Service") + .append("Name=QMan,Type=Service") .toString()); } catch(Exception exception) { diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/AccessModeMapping.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/AccessModeMapping.java deleted file mode 100644 index af6aaa36bf..0000000000 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/AccessModeMapping.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * - * 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. - * - */ -package org.apache.qpid.management.configuration; - -import org.apache.qpid.management.domain.model.AccessMode; - -/** - * Class used to encapsulate a mapping between an access mode and a code. - * - * @author Andrea Gazzarini - */ -class AccessModeMapping -{ - private final int _code; - private final AccessMode _accessMode; - - /** - * Builds a new access mode mapping with the given parameters. - * - * @param code the access code. - * @param accessMode the access mode. - */ - AccessModeMapping(int code, AccessMode accessMode) - { - this._code = code; - this._accessMode = accessMode; - } - - /** - * Returns the access mode of this mapping. - * - * @return the access mode of this mapping. - */ - AccessMode getAccessMode () - { - return _accessMode; - } - - /** - * Returns the code of this mapping. - * - * @return the code of this mapping. - */ - int getCode () - { - return _code; - } - - /** - * Returns a string representation of this mapping. - * The returned string is indicating the code and the corresponding access mode. - * - * @return a string representation of this mapping. - */ - @Override - public String toString () - { - return new StringBuilder() - .append("AccessMode mapping (") - .append(_code) - .append(',') - .append(_accessMode) - .append(')').toString(); - } -} diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configuration.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configuration.java index c9d45c5023..51dc62f4fa 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configuration.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configuration.java @@ -30,7 +30,16 @@ import org.apache.qpid.management.Messages; import org.apache.qpid.management.Names; import org.apache.qpid.management.domain.handler.base.IMessageHandler; import org.apache.qpid.management.domain.model.AccessMode; +import org.apache.qpid.management.domain.model.type.AbsTime; +import org.apache.qpid.management.domain.model.type.DeltaTime; +import org.apache.qpid.management.domain.model.type.ObjectReference; +import org.apache.qpid.management.domain.model.type.Str16; +import org.apache.qpid.management.domain.model.type.Str8; import org.apache.qpid.management.domain.model.type.Type; +import org.apache.qpid.management.domain.model.type.Uint16; +import org.apache.qpid.management.domain.model.type.Uint32; +import org.apache.qpid.management.domain.model.type.Uint64; +import org.apache.qpid.management.domain.model.type.Uint8; import org.apache.qpid.transport.DeliveryProperties; import org.apache.qpid.transport.Header; import org.apache.qpid.transport.MessageProperties; @@ -71,7 +80,12 @@ public final class Configuration private Configuration() { defineQueueNames(); + createHeaderForCommandMessages(); + + addAccessModeMappings(); + + addTypeMappings(); } void clean() @@ -90,9 +104,11 @@ public final class Configuration } /** - * Returns true if this configuration has at least one broker connection data. + * Returns true if this configuration has at least + * one broker configured. * - * @return true if this configuration has at least one broker connection data. + * @return true if this configuration has at least one + * broker configured. */ public boolean hasOneOrMoreBrokersDefined() { @@ -245,26 +261,46 @@ public final class Configuration /** * Adds a new type mapping to this configuration. * - * @param mapping the type mapping that will be added. + * @param code the code that will be associated with the declared type. + * @param type the type. + * @param vailidatorClassName the FQN of the validator class that will be + * associated with the given type. */ - void addTypeMapping(TypeMapping mapping) { - int code = mapping.getCode(); - Type type = mapping.getType(); - String validatorClassName = mapping.getValidatorClassName(); - _typeMappings.put(code, type); + void addTypeMapping(int code, Type type, String validatorClassName) { + _typeMappings.put(code, type); _validators.put(type, validatorClassName); - LOGGER.info(Messages.QMAN_000005_TYPE_MAPPING_CONFIGURED, code,type,validatorClassName); + LOGGER.info( + Messages.QMAN_000005_TYPE_MAPPING_CONFIGURED, + code, + type, + validatorClassName); } - + + + /** + * Adds a new type mapping to this configuration. + * + * @param code the code that will be associated with the declared type. + * @param type the type. + */ + void addTypeMapping(int code, Type type) { + _typeMappings.put(code, type); + + LOGGER.info( + Messages.QMAN_000005_TYPE_MAPPING_CONFIGURED, + code, + type, + "not configured for this type."); + } + /** * Adds a new access mode mapping to this configuration. * - * @param mapping the mapping that will be added. + * @param code the code that will be associated with the access mode, + * @param accessMode the accessMode. */ - void addAccessModeMapping(AccessModeMapping mapping){ - int code = mapping.getCode(); - AccessMode accessMode = mapping.getAccessMode(); + void addAccessModeMapping(int code, AccessMode accessMode){ _accessModes.put(code, accessMode); LOGGER.info(Messages.QMAN_000006_ACCESS_MODE_MAPPING_CONFIGURED, code,accessMode); @@ -420,4 +456,34 @@ public final class Configuration { this._keepAliveTime = keepAliveTime; } + + /** + * Configures access mode mappings. + * An access mode mapping is an association between a code and an access mode. + */ + private void addAccessModeMappings() { + addAccessModeMapping(1,AccessMode.RC); + addAccessModeMapping(2,AccessMode.RW); + addAccessModeMapping(3,AccessMode.RO); + } + + /** + * Configures type mappings. + * A type mapping is an association between a code and a management type. + */ + private void addTypeMappings() + { + addTypeMapping(1,new Uint8(),Names.NUMBER_VALIDATOR); + addTypeMapping(2,new Uint16(),Names.NUMBER_VALIDATOR); + addTypeMapping(3,new Uint32(),Names.NUMBER_VALIDATOR); + addTypeMapping(4,new Uint64(),Names.NUMBER_VALIDATOR); + addTypeMapping(6,new Str8(),Names.STRING_VALIDATOR); + addTypeMapping(7,new Str16(),Names.STRING_VALIDATOR); + addTypeMapping(8,new AbsTime()); + addTypeMapping(9,new DeltaTime()); + addTypeMapping(10,new ObjectReference()); + addTypeMapping(11,new org.apache.qpid.management.domain.model.type.Boolean()); + addTypeMapping(14,new org.apache.qpid.management.domain.model.type.Uuid()); + addTypeMapping(15,new org.apache.qpid.management.domain.model.type.Map()); + } }
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configurator.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configurator.java index 1cde9d5f88..fe44c6aff7 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configurator.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/Configurator.java @@ -38,16 +38,6 @@ import org.apache.qpid.management.domain.handler.impl.HeartBeatIndicationMessage import org.apache.qpid.management.domain.handler.impl.InstrumentationMessageHandler; import org.apache.qpid.management.domain.handler.impl.MethodResponseMessageHandler; import org.apache.qpid.management.domain.handler.impl.SchemaResponseMessageHandler; -import org.apache.qpid.management.domain.model.AccessMode; -import org.apache.qpid.management.domain.model.type.AbsTime; -import org.apache.qpid.management.domain.model.type.DeltaTime; -import org.apache.qpid.management.domain.model.type.ObjectReference; -import org.apache.qpid.management.domain.model.type.Str16; -import org.apache.qpid.management.domain.model.type.Str8; -import org.apache.qpid.management.domain.model.type.Uint16; -import org.apache.qpid.management.domain.model.type.Uint32; -import org.apache.qpid.management.domain.model.type.Uint64; -import org.apache.qpid.management.domain.model.type.Uint8; import org.apache.qpid.transport.util.Logger; import org.xml.sax.Attributes; import org.xml.sax.InputSource; @@ -148,9 +138,6 @@ public class Configurator extends DefaultHandler } } - addTypeMappings(); - addAccessModeMappings(); - addMandatoryManagementMessageHandlers(); addMandatoryMethodReplyMessageHandlers(); } catch (Exception exception) @@ -209,38 +196,6 @@ public class Configurator extends DefaultHandler return data; } - /** - * Configures access mode mappings. - * An access mode mapping is an association between a code and an access mode. - */ - private void addAccessModeMappings() { - Configuration configuration = Configuration.getInstance(); - configuration.addAccessModeMapping(new AccessModeMapping(1,AccessMode.RC)); - configuration.addAccessModeMapping(new AccessModeMapping(2,AccessMode.RW)); - configuration.addAccessModeMapping(new AccessModeMapping(3,AccessMode.RO)); - } - - /** - * Configures type mappings. - * A type mapping is an association between a code and a management type. - */ - private void addTypeMappings() - { - Configuration configuration = Configuration.getInstance(); - configuration.addTypeMapping(new TypeMapping(1,new Uint8(),Names.NUMBER_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(2,new Uint16(),Names.NUMBER_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(3,new Uint32(),Names.NUMBER_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(4,new Uint64(),Names.NUMBER_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(6,new Str8(),Names.STRING_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(7,new Str16(),Names.STRING_VALIDATOR)); - configuration.addTypeMapping(new TypeMapping(8,new AbsTime())); - configuration.addTypeMapping(new TypeMapping(9,new DeltaTime())); - configuration.addTypeMapping(new TypeMapping(10,new ObjectReference())); - configuration.addTypeMapping(new TypeMapping(11,new org.apache.qpid.management.domain.model.type.Boolean())); - configuration.addTypeMapping(new TypeMapping(14,new org.apache.qpid.management.domain.model.type.Uuid())); - configuration.addTypeMapping(new TypeMapping(15,new org.apache.qpid.management.domain.model.type.Map())); - } - /** * Configures the mandatory management message handlers. */ diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/TypeMapping.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/TypeMapping.java deleted file mode 100644 index 2c0a460c1a..0000000000 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/configuration/TypeMapping.java +++ /dev/null @@ -1,90 +0,0 @@ -/* - * - * 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. - * - */ -package org.apache.qpid.management.configuration; - -import org.apache.qpid.management.domain.model.type.Type; - -/** - * Type Mapping used for associating a code with a management type. - * - * @author Andrea Gazzarini - */ -class TypeMapping -{ - private final int _code; - private final Type _type; - private final String _validatorClass; - - /** - * Builds a new type mapping with the given parameters and no validator. - * - * @param code the code. - * @param type the management type. - */ - TypeMapping(int code, Type type) - { - this(code,type,null); - } - - /** - * Builds a new type mapping with the given parameters. - * - * @param code the code. - * @param type the management type. - * @param validatorClassName the class name of the validator to be used. - */ - TypeMapping(int code, Type type, String validatorClassName) - { - this._code = code; - this._type = type; - this._validatorClass = validatorClassName; - } - - /** - * Returns the code of this mapping. - * - * @return the code of this mapping. - */ - int getCode () - { - return _code; - } - - /** - * Returns the type for this mapping. - * - * @return the type for this mapping. - */ - Type getType () - { - return _type; - } - - /** - * Returns the validator class of this mapping. - * - * @return the validator class (as a string) of this mapping. - */ - public String getValidatorClassName() - { - return _validatorClass; - } -} diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/JmxService.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/JmxService.java index 176cec451e..657d7e6210 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/JmxService.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/model/JmxService.java @@ -54,11 +54,10 @@ public class JmxService */ public void registerQManService(QMan qman) throws MBeanException { - ObjectName name = createQManName(); - if (!_mxServer.isRegistered(name)) + if (!_mxServer.isRegistered(Names.QMAN_OBJECT_NAME)) { try { - _mxServer.registerMBean(qman, name); + _mxServer.registerMBean(qman, Names.QMAN_OBJECT_NAME); } catch (Exception exception) { throw new MBeanException(exception); } @@ -358,27 +357,6 @@ public class JmxService throw new RuntimeException(exception); } } - - /** - * Creates the QMan object name. - * - * @return the QMan object name. - */ - private ObjectName createQManName() - { - String asString = new StringBuilder() - .append(Names.DOMAIN_NAME) - .append(':') - .append("Type=Service") - .toString(); - try - { - return new ObjectName(asString); - } catch (MalformedObjectNameException exception) - { - throw new RuntimeException(exception); - } - } ObjectName createEntityDefinitionName(String packageName, String className, String type) { @@ -407,7 +385,7 @@ public class JmxService { if (!_mxServer.isRegistered(name)) _mxServer.registerMBean(entity, name); - _mxServer.addNotificationListener(name, createQManName(), null, null); + _mxServer.addNotificationListener(name, Names.QMAN_OBJECT_NAME, null, null); } catch(Exception exception) { throw new RuntimeException(exception); diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QMan.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QMan.java index d124593472..c4c0ce5e74 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QMan.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QMan.java @@ -26,6 +26,9 @@ import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import java.util.UUID; +import java.util.concurrent.ArrayBlockingQueue; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; import javax.management.Attribute; import javax.management.AttributeList; @@ -45,6 +48,7 @@ import org.apache.qpid.management.Names; import org.apache.qpid.management.configuration.BrokerAlreadyConnectedException; import org.apache.qpid.management.configuration.BrokerConnectionData; import org.apache.qpid.management.configuration.BrokerConnectionException; +import org.apache.qpid.management.configuration.Configuration; import org.apache.qpid.management.configuration.Configurator; import org.apache.qpid.management.domain.model.JmxService; import org.apache.qpid.transport.util.Logger; @@ -58,6 +62,7 @@ public class QMan extends NotificationBroadcasterSupport implements DynamicMBean private final List<ManagementClient> managementClients = new ArrayList<ManagementClient>(); private Configurator _configurator = new Configurator(); + private ThreadPoolExecutor _workManager; /** * Starts QMan. @@ -74,6 +79,8 @@ public class QMan extends NotificationBroadcasterSupport implements DynamicMBean _configurator.configure(); + configureWorkManager(); + LOGGER.info(Messages.QMAN_000019_QMAN_STARTED); } catch(Exception exception) { LOGGER.error(exception,Messages.QMAN_100018_UNABLE_TO_STARTUP_CORRECTLY ); @@ -143,6 +150,36 @@ public class QMan extends NotificationBroadcasterSupport implements DynamicMBean LOGGER.info(Messages.QMAN_000021_SHUT_DOWN); } + /** + * Creates a management client using the given data. + * + * @param brokerId the broker identifier. + * @param data the broker connection data. + */ + public void createManagementClient(UUID brokerId, BrokerConnectionData data) + { + try + { + ManagementClient client = new ManagementClient(brokerId,data); + client.estabilishFirstConnectionWithBroker(); + managementClients.add(client); + + LOGGER.info(Messages.QMAN_000004_MANAGEMENT_CLIENT_CONNECTED,brokerId); + } catch(StartupFailureException exception) { + LOGGER.error(exception, Messages.QMAN_100017_UNABLE_TO_CONNECT,brokerId,data); + } + } + + /** + * Returns the list of management clients currently handled by QMan. + * + * @return the list of management clients currently handled by QMan. + */ + public List<ManagementClient> getManagementClients() + { + return managementClients; + } + /** * Injects the configurator on this QMan instance. * That configutator later will be responsible to manage the configuration. @@ -330,13 +367,20 @@ public class QMan extends NotificationBroadcasterSupport implements DynamicMBean /** * Simply dispatches the incoming notification to registered listeners. + * Consider that the notification is sent asynchronously so the QMan current thread is not + * waiting for completion of receiver task. * * @param notification the incoming notification. * @param handback the context associated to this notification. */ - public void handleNotification(Notification notification, Object handback) + public void handleNotification(final Notification notification, Object handback) { - sendNotification(notification); + _workManager.execute(new Runnable(){ + public void run() + { + sendNotification(notification); + } + }); } /** @@ -352,33 +396,17 @@ public class QMan extends NotificationBroadcasterSupport implements DynamicMBean LOGGER.info(Messages.QMAN_000023_QMAN_REGISTERED_AS_MBEAN); } - /** - * Creates a management client using the given data. - * - * @param brokerId the broker identifier. - * @param data the broker connection data. - */ - public void createManagementClient(UUID brokerId, BrokerConnectionData data) - { - try - { - ManagementClient client = new ManagementClient(brokerId,data); - client.estabilishFirstConnectionWithBroker(); - managementClients.add(client); - - LOGGER.info(Messages.QMAN_000004_MANAGEMENT_CLIENT_CONNECTED,brokerId); - } catch(StartupFailureException exception) { - LOGGER.error(exception, Messages.QMAN_100017_UNABLE_TO_CONNECT,brokerId,data); - } - } - /** - * Returns the list of management clients currently handled by QMan. - * - * @return the list of management clients currently handled by QMan. + * Configures work manager component. */ - public List<ManagementClient> getManagementClients() - { - return managementClients; - } + private void configureWorkManager() + { + Configuration configuration = Configuration.getInstance(); + _workManager = new ThreadPoolExecutor( + configuration.getWorkerManagerPoolSize(), + configuration.getWorkerManagerMaxPoolSize(), + configuration.getWorkerManagerKeepAliveTime(), + TimeUnit.MILLISECONDS, + new ArrayBlockingQueue<Runnable>(30)); + } } diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QpidService.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QpidService.java index a12993d40e..ee41beaf50 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QpidService.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/domain/services/QpidService.java @@ -86,6 +86,8 @@ public class QpidService implements SessionListener public void opened(Session ssn) {} + public void resumed(Session ssn) {} + public void message(Session ssn, MessageTransfer xfr) { MessagePartListenerAdapter l = _listeners.get(xfr.getDestination()); diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java index 03e772b9b1..09b7309b96 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java @@ -30,12 +30,21 @@ import javax.management.ObjectName; import org.apache.qpid.management.Names;
+/**
+ * Value Object encapsulating a broker management domain model.
+ *
+ * @author Andrea Gazzarini
+ */
public class BrokerModel
{
- private Map<String, List<ObjectName>> objectsByType = new HashMap<String, List<ObjectName>>();
-
- private String id;
+ private Map<String, List<ObjectName>> _objectsByType = new HashMap<String, List<ObjectName>>();
+ private String _id;
+ /**
+ * Adds a new object to this domain model.
+ *
+ * @param name the object name of the JMX entity.
+ */
void addObject(ObjectName name)
{
String packageName = name.getKeyProperty(Names.PACKAGE);
@@ -44,37 +53,48 @@ public class BrokerModel {
String fqn = packageName+"."+className;
- List<ObjectName> objects = objectsByType.get(fqn);
+ List<ObjectName> objects = _objectsByType.get(fqn);
if (objects == null)
{
objects = new ArrayList<ObjectName>();
- objectsByType.put(fqn,objects);
+ _objectsByType.put(fqn,objects);
}
objects.add(name);
}
}
+ /**
+ * Gets the identifier of the owner of this model.
+ *
+ * @return the identifier of the owner of this model.
+ */
public String getId()
{
- return id;
+ return _id;
}
+ /**
+ * Sets the identifier of the owner of this model.
+ *
+ * @param id the identifier of the owner of this model.
+ */
public void setId(String id)
{
- this.id = id;
+ this._id = id;
}
- public Set<String> getCategoryNames(){
- return objectsByType.keySet();
+ public Set<String> getCategoryNames()
+ {
+ return _objectsByType.keySet();
}
public List<ObjectName> getCategory(String name)
{
- return objectsByType.get(name);
+ return _objectsByType.get(name);
}
public int getCategoryCount()
{
- return objectsByType.keySet().size();
+ return _objectsByType.keySet().size();
}
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java index ae886767e2..509c86c08b 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java @@ -42,9 +42,10 @@ import org.apache.qpid.management.domain.services.QMan; * This controller is responsible to :
*
* <ul>
- * <li> prepare data for the page that is showing all connected brokers.</li>.
- * </li> connect QMan with a broker on demand.
+ * <li> prepare data for the page that is showing all connected brokers.</li>.
+ * </li> connect QMan with a broker on demand.
* </ul>
+ *
* @author Andrea Gazzarini
*/
public class BrokersManagementAction extends HttpServlet
@@ -54,6 +55,11 @@ public class BrokersManagementAction extends HttpServlet /**
* Retrieves all connected brokers (their connection data) and prepare the model that
* is then forwarded to the appropriate view page.
+ *
+ * @param request the http request.
+ * @param response the http response.
+ * @throws ServletException in case of failure while forwarding to the view component.
+ * @throws IOException in case of failure while forwarding to the view component.
*/
@SuppressWarnings("unchecked")
@Override
@@ -87,7 +93,13 @@ public class BrokersManagementAction extends HttpServlet }
/**
- * Connects QMan with a new broker.
+ * Connects QMan with a new broker and forwards to
+ * the brokers list view page.
+ *
+ * @param request the http request.
+ * @param response the http response.
+ * @throws ServletException in case of failure while forwarding to the view component.
+ * @throws IOException in case of failure while forwarding to the view component.
*/
@SuppressWarnings("unchecked")
@Override
@@ -123,28 +135,32 @@ public class BrokersManagementAction extends HttpServlet errors.add("Invalid value for \"virtualHost\" attribute. Must be not null.");
}
- try{
+ try
+ {
port = Integer.parseInt(portString);
} catch(Exception exception)
{
errors.add("Invalid value for \"port\" attribute. Must be not null and must be a number.");
}
- try{
+ try
+ {
initialPoolCapacity = Integer.parseInt(initialCapacityString);
} catch(Exception exception)
{
errors.add("Invalid value for \"Initial Pool Capacity\" attribute. Must be not null and must be a number.");
}
- try{
+ try
+ {
maxPoolCapacity = Integer.parseInt(maxCapacityString);
} catch(Exception exception)
{
errors.add("Invalid value for \"Max Pool Capacity\" attribute. Must be not null and must be a number.");
}
- try{
+ try
+ {
maxWaitTimeout = Long.parseLong(maxWaitTimeoutString);
} catch(Exception exception)
{
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java index de479a00d6..e3a8eb50d7 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java @@ -43,15 +43,12 @@ import javax.xml.namespace.QName; import org.apache.muse.core.proxy.ProxyHandler;
import org.apache.muse.core.proxy.ReflectionProxyHandler;
import org.apache.muse.ws.addressing.EndpointReference;
-import org.apache.muse.ws.resource.remote.WsResourceClient;
import org.apache.qpid.management.Names;
import org.w3c.dom.Element;
public class WsdmPropertiesPerspectiveAction extends HttpServlet
{
private static final long serialVersionUID = -2411413147821629363L;
- private static final Object [] WSDL_DIALECT = new Object[]{"http://schemas.xmlsoap.org/wsdl/"};
- private static final Object [] RMD_DIALECT = new Object[]{"http://docs.oasis-open.org/wsrf/rmd-1"};
private ProxyHandler proxyHandler;
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java index bafdc06633..b4c488e97c 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java @@ -35,6 +35,8 @@ import org.apache.muse.core.proxy.ProxyHandler; import org.apache.muse.core.proxy.ReflectionProxyHandler;
import org.apache.muse.util.xml.XmlUtils;
import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.metadata.WsxConstants;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
import org.apache.muse.ws.resource.remote.WsResourceClient;
import org.apache.qpid.management.Names;
import org.w3c.dom.Element;
@@ -42,7 +44,7 @@ import org.w3c.dom.Element; public class WsdmRmdPerspectiveAction extends HttpServlet
{
private static final long serialVersionUID = -2411413147821629363L;
- private static final Object [] DIALECT = new Object[]{"http://docs.oasis-open.org/wsrf/rmd-1"};
+ private static final Object [] RMD_DIALECT = new Object[]{WsrmdConstants.NAMESPACE_URI};
private ProxyHandler proxyHandler;
@@ -52,10 +54,14 @@ public class WsdmRmdPerspectiveAction extends HttpServlet public void init() throws ServletException
{
proxyHandler = new ReflectionProxyHandler();
- proxyHandler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
- proxyHandler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", Names.PREFIX));
- proxyHandler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", Names.PREFIX)});
- proxyHandler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", Names.PREFIX));
+ proxyHandler.setAction(WsxConstants.GET_METADATA_URI);
+ proxyHandler.setRequestName(WsxConstants.GET_METADATA_QNAME);
+ proxyHandler.setRequestParameterNames(new QName[]{
+ new QName(
+ WsxConstants.NAMESPACE_URI,
+ WsxConstants.DIALECT,
+ WsxConstants.PREFIX)});
+ proxyHandler.setResponseName(WsxConstants.METADATA_QNAME);
proxyHandler.setReturnType(Element[].class);
}
@@ -65,29 +71,49 @@ public class WsdmRmdPerspectiveAction extends HttpServlet {
try
{
-// String resourceId = request.getParameter("resourceId");
-// ObjectName objectName = new ObjectName(resourceId);
-//
-// String wsresourceid = objectName.getKeyProperty(Names.OBJECT_ID);
-// EndpointReference resourceEndpointReference = new EndpointReference(getURI(request));
-// resourceEndpointReference.addParameter(
-// Names.RESOURCE_ID_QNAME,
-// wsresourceid);
-//
-// WsResourceClient resourceClient = new WsResourceClient(resourceEndpointReference);
-// Element rmd = ((Element[])resourceClient.invoke(proxyHandler,DIALECT))[0];
-//
-// String output = XmlUtils.toString(rmd);
-//
-// String [] keyProperties = objectName.getKeyPropertyListString().split(",");
-//
-// request.setAttribute("resourceId", objectName);
-// request.setAttribute("nameAttributes",keyProperties);
-// request.setAttribute("rmd",output);
- RequestDispatcher dispatcher = request.getRequestDispatcher("/tbd.jsp");
+ String resourceId = request.getParameter("resourceId");
+ ObjectName objectName = new ObjectName(resourceId);
+
+ String wsresourceid = objectName.getKeyProperty(Names.OBJECT_ID);
+ EndpointReference resourceEndpointReference = new EndpointReference(getURI(request));
+
+ resourceEndpointReference.addParameter(
+ Names.RESOURCE_ID_QNAME,
+ wsresourceid);
+
+ WsResourceClient resourceClient = new WsResourceClient(resourceEndpointReference);
+ Element rmd = ((Element[])resourceClient.invoke(proxyHandler,RMD_DIALECT))[0];
+
+// NodeList nodelist = wsdl.getChildNodes();
+// Element definitions = null;
+// for (int i = 0; i < nodelist.getLength(); i++)
+// {
+// Node node = nodelist.item(i);
+// switch (node.getNodeType())
+// {
+// case Node.ELEMENT_NODE:
+// {
+// Element element = (Element) node;
+// if (element.getNodeName().indexOf("definitions") != -1)
+// {
+// definitions = element;
+// break;
+// }
+// }
+// }
+// }
+
+ String output = XmlUtils.toString(rmd);
+
+ String [] keyProperties = objectName.getKeyPropertyListString().split(",");
+
+ request.setAttribute("resourceId", resourceId);
+ request.setAttribute("nameAttributes",keyProperties);
+ request.setAttribute("rmd",output);
+ RequestDispatcher dispatcher = request.getRequestDispatcher("/wsdm_rmd_perspective.jsp");
dispatcher.forward(request,response);
} catch(Exception exception)
- {
+ {
request.setAttribute("errorMessage","Unable to detect the exact cause Please look at the reported stack trace below.");
request.setAttribute("exception",exception);
RequestDispatcher dispatcher = request.getRequestDispatcher("/error_page.jsp");
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java index 9b47fe95b9..77a5237037 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java @@ -35,6 +35,7 @@ import org.apache.muse.core.proxy.ProxyHandler; import org.apache.muse.core.proxy.ReflectionProxyHandler;
import org.apache.muse.util.xml.XmlUtils;
import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.metadata.WsxConstants;
import org.apache.muse.ws.resource.remote.WsResourceClient;
import org.apache.qpid.management.Names;
import org.w3c.dom.Element;
@@ -44,7 +45,7 @@ import org.w3c.dom.NodeList; public class WsdmWsdlPerspectiveAction extends HttpServlet
{
private static final long serialVersionUID = -2411413147821629363L;
- private static final Object [] WSDL_DIALECT = new Object[]{"http://schemas.xmlsoap.org/wsdl/"};
+ private static final Object [] WSDL_DIALECT = new Object[]{WsxConstants.WSDL_DIALECT};
private ProxyHandler proxyHandler;
@@ -54,10 +55,14 @@ public class WsdmWsdlPerspectiveAction extends HttpServlet public void init() throws ServletException
{
proxyHandler = new ReflectionProxyHandler();
- proxyHandler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
- proxyHandler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", Names.PREFIX));
- proxyHandler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", Names.PREFIX)});
- proxyHandler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", Names.PREFIX));
+ proxyHandler.setAction(WsxConstants.GET_METADATA_URI);
+ proxyHandler.setRequestName(WsxConstants.GET_METADATA_QNAME);
+ proxyHandler.setRequestParameterNames(new QName[]{
+ new QName(
+ WsxConstants.NAMESPACE_URI,
+ WsxConstants.DIALECT,
+ WsxConstants.PREFIX)});
+ proxyHandler.setResponseName(WsxConstants.METADATA_QNAME);
proxyHandler.setReturnType(Element[].class);
}
@@ -72,6 +77,7 @@ public class WsdmWsdlPerspectiveAction extends HttpServlet String wsresourceid = objectName.getKeyProperty(Names.OBJECT_ID);
EndpointReference resourceEndpointReference = new EndpointReference(getURI(request));
+
resourceEndpointReference.addParameter(
Names.RESOURCE_ID_QNAME,
wsresourceid);
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/QEmuInitializer.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/QEmuInitializer.java index 545e587f79..47aa4ea681 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/QEmuInitializer.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/QEmuInitializer.java @@ -57,7 +57,9 @@ public class QEmuInitializer extends HttpServlet Names.QPID_EMULATOR_OBJECT_NAME);
} catch(Exception exception)
{
- LOGGER.warn(exception,Messages.QMAN_300005_QEMU_INITIALIZATION_FAILURE);
+ LOGGER.warn(
+ exception,
+ Messages.QMAN_300005_QEMU_INITIALIZATION_FAILURE);
throw new ServletException(exception);
}
}
@@ -84,8 +86,8 @@ public class QEmuInitializer extends HttpServlet {
try
{
- ManagementFactory.getPlatformMBeanServer()
- .unregisterMBean(Names.QPID_EMULATOR_OBJECT_NAME);
+ ManagementFactory.getPlatformMBeanServer().unregisterMBean(
+ Names.QPID_EMULATOR_OBJECT_NAME);
} catch (Exception exception)
{
}
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Constants.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Constants.java new file mode 100644 index 0000000000..59a5801505 --- /dev/null +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Constants.java @@ -0,0 +1,44 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm.capabilities;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+
+public interface Constants
+{
+ String WSRP_PROPERTIES_XPATH = "/wsdl:definitions/wsdl:types/xsd:schema[" +
+ "@targetNamespace='http://amqp.apache.org/qpid/management/qman']" +
+ "/xsd:element[@name='QManWsResourceProperties']/xsd:complexType/xsd:sequence";
+
+ String SERVICE_LOCATION_XPATH = "/wsdl:definitions/wsdl:service/wsdl:port/wsdl-soap:address/@location";
+ String QMAN_SCHEMA_XPATH = "/wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://amqp.apache.org/qpid/management/qman']";
+
+ String MIN_OCCURS = "minOccurs";
+ String REF_ATTRIBUTE = "ref";
+ String NAME_ATTRIBUTE = "name";
+ String TYPE_ATTRIBUTE ="type";
+
+ QName XSD_ELEMENT_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"element","xsd");
+ QName XSD_COMPLEX_TYPE_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"complexType","xsd");
+ QName XSD_SEQUENCE_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"sequence","xsd");
+
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/ConsumerCapability.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/ConsumerCapability.java index dd5eb523c1..bde98092a0 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/ConsumerCapability.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/ConsumerCapability.java @@ -29,6 +29,8 @@ import org.apache.muse.ws.notification.WsnConstants; /**
* WS-Notifications consumer capability.
+ * At the moment QMan is not a consumer of itself so this capability is here only
+ * for test purposes.
*
* @author Andrea Gazzarini
*/
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/DummyCapabilityBuilder.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/DummyCapabilityBuilder.java index 0676b4ac49..370cf3086d 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/DummyCapabilityBuilder.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/DummyCapabilityBuilder.java @@ -29,32 +29,57 @@ import org.apache.muse.core.Environment; /**
* Dummy capability builder used for avoid duplicated builds for the
* same class.
+ * Basically it acts likes a Null Object when the target capability class has been
+ * already built.
*
* @author Andrea Gazzarini
*/
public class DummyCapabilityBuilder implements IArtifactBuilder
{
-
- public void begin(ObjectName objectName) throws BuilderException
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
+ public void begin(ObjectName objectName)
{
}
- public void endAttributes() throws BuilderException
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
+ public void endAttributes()
{
}
- public void endOperations() throws BuilderException
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
+ public void endOperations()
{
}
- public void onAttribute(MBeanAttributeInfo attributeMetadata) throws BuilderException
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
+ public void onAttribute(MBeanAttributeInfo attributeMetadata)
{
}
- public void onOperation(MBeanOperationInfo operationMetadata) throws BuilderException
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
+ public void onOperation(MBeanOperationInfo operationMetadata)
{
}
+ /**
+ * Director callback.
+ * Do nothing here (see class comments above.)
+ */
public void setEnvironment(Environment environment)
{
}
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java index 82d8e97d37..37ecc0c031 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java @@ -179,12 +179,8 @@ public abstract class MBeanCapability extends AbstractWsResourceCapability params,
signature);
- Result result = new Result(
- output.getReturnCode(),
- output.getStatusText(),
- output.getOutputSection());
-
- return result;
+ return new Result(output.getOutputSection());
+
} catch (InstanceNotFoundException exception)
{
throw new EntityInstanceNotFoundFault(
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapabilityBuilder.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapabilityBuilder.java index ea623138a4..ea67bdf9e1 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapabilityBuilder.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapabilityBuilder.java @@ -178,6 +178,14 @@ public class MBeanCapabilityBuilder implements IArtifactBuilder{ }
}
+ /**
+ * Director callback.
+ * All attributes have been notified.
+ *
+ * This builder is using this callback in order to create the initial
+ * properties QNames declaration.
+ *
+ */
public void endAttributes() throws BuilderException
{
_endAttributeHandler.endAttributes();
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/QManMetadataExchangeCapability.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/QManMetadataExchangeCapability.java index 7e58992540..d6255d0bed 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/QManMetadataExchangeCapability.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/QManMetadataExchangeCapability.java @@ -21,6 +21,10 @@ package org.apache.qpid.management.wsdm.capabilities;
import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.metadata.WsxConstants;
+import org.apache.muse.ws.resource.WsResource;
+import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
import org.apache.muse.ws.resource.metadata.ext.WsrfMetadataExchange;
import org.apache.muse.ws.wsdl.WsdlUtils;
import org.apache.qpid.management.wsdm.muse.resources.QManWsResource;
@@ -60,4 +64,36 @@ public class QManMetadataExchangeCapability extends WsrfMetadataExchange return wsdl;
}
+
+ /**
+ * Returns the resource metadata descriptor associated with the owenr
+ * resource of thi capability.
+ *
+ * @return the resource metadata descriptor.
+ */
+ protected Element getResourceMetadataDescriptor()
+ {
+ WsResource resource = (WsResource)getResource();
+ MetadataDescriptor metadataDescriptor = resource.getPropertyCollection().getMetadata();
+ return metadataDescriptor.toXML();
+ }
+
+ public Element[] getMetadata(String dialect)
+ {
+ if (dialect == null)
+ {
+ return new Element[]{
+ getResourceMetadataDescriptor(),
+ getWSDL()};
+ } else {
+ if (WsrmdConstants.NAMESPACE_URI.equals(dialect))
+ {
+ return new Element[]{getResourceMetadataDescriptor()};
+ } else if (WsxConstants.WSDL_DIALECT.equals(dialect))
+ {
+ return new Element[]{getWSDL()};
+ }
+ }
+ return super.getMetadata(dialect);
+ }
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java index b8e22b4bc7..a00d2665ae 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java @@ -29,11 +29,9 @@ import java.util.*; *
* @author Andrea Gazzarini
*/
-public class Result
+public final class Result
{
- private long _statusCode;
- private String _statusText;
- private Map<String,Object> _outputParameters;
+ private final Map<String,Object> _outputParameters;
/**
* Builds a new result DTO with the given parameters.
@@ -42,53 +40,11 @@ public class Result * @param statusText the status message.
* @param outputParameters the output parameters.
*/
- public Result(long statusCode, String statusText,Map<String, Object> outputParameters)
+ public Result(Map<String, Object> outputParameters)
{
- this._statusCode = statusCode;
- this._statusText = statusText;
this._outputParameters = outputParameters;
}
-
- /**
- * Returns the status code.
- *
- * @return the status code.
- */
- public long getStatusCode()
- {
- return _statusCode;
- }
-
- /**
- * Sets the status code.
- *
- * @param statusCode the status code.
- */
- void setStatusCode(long statusCode)
- {
- this._statusCode = statusCode;
- }
-
- /**
- * Returns the status text.
- *
- * @return the status text.
- */
- public String getStatusText()
- {
- return _statusText;
- }
-
- /**
- * Sets the status text.
- *
- * @param statusText the status text.
- */
- void setStatusText(String statusText)
- {
- this._statusText = statusText;
- }
-
+
/**
* Returns the output parameterss.
*
@@ -98,14 +54,4 @@ public class Result {
return _outputParameters;
}
-
- /**
- * Sets the output parameters.
- *
- * @param outputParameters the output parameters.
- */
- void setOutputParameters(Map<String, Object> outputParameters)
- {
- this._outputParameters = outputParameters;
- }
-}
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/RmdBuilder.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/RmdBuilder.java index 86aba0e5bb..c1678eb43f 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/RmdBuilder.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/RmdBuilder.java @@ -128,7 +128,8 @@ class RmdBuilder implements IArtifactBuilder */
public Element[] getResourceMetadataDescriptor()
{
- Element [] properties = _metadataDescriptor.toArray(new Element[0]);
+ Element [] properties = _metadataDescriptor.toArray(
+ new Element[_metadataDescriptor.size()]);
return properties;
}
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WSDMArtifactsDirector.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WSDMArtifactsDirector.java index c9ffd5eac0..35a919c295 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WSDMArtifactsDirector.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WSDMArtifactsDirector.java @@ -35,7 +35,7 @@ import org.w3c.dom.Element; *
* @author Andrea Gazzarini
*/
-class WSDMArtifactsDirector
+final class WSDMArtifactsDirector
{
private final ObjectName _eventSourceObjectName;
private final MBeanInfo _metadata;
@@ -189,7 +189,8 @@ class WSDMArtifactsDirector *
* @param resource the ws resource.
*/
- public void setResource(Resource resource) {
+ public void setResource(Resource resource)
+ {
_wsdlBuilder.setWsdlPath(resource.getWsdlPath());
}
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsArtifactsFactory.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsArtifactsFactory.java index 2a1bf059c3..94505d28f7 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsArtifactsFactory.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsArtifactsFactory.java @@ -105,13 +105,18 @@ class WsArtifactsFactory _cache.put(searchKey, result);
- LOGGER.debug(Messages.QMAN_200040_WS_ARTIFACTS_CACHED,searchKey);
+ LOGGER.debug(
+ Messages.QMAN_200040_WS_ARTIFACTS_CACHED,
+ searchKey);
}
return result;
} catch(Exception exception)
{
- throw new ArtifactsNotAvailableException(result,exception,objectName);
+ throw new ArtifactsNotAvailableException(
+ result,
+ exception,
+ objectName);
}
}
diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsdlBuilder.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsdlBuilder.java index 02b25eb02f..6bfccda1ce 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsdlBuilder.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/WsdlBuilder.java @@ -23,20 +23,22 @@ package org.apache.qpid.management.wsdm.capabilities; import java.net.InetAddress;
import java.util.HashMap;
import java.util.Map;
+import java.util.UUID;
import javax.management.MBeanAttributeInfo;
import javax.management.MBeanOperationInfo;
import javax.management.MBeanParameterInfo;
import javax.management.ObjectName;
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
+import javax.xml.transform.TransformerException;
import org.apache.muse.core.Environment;
+import org.apache.muse.core.serializer.SerializerRegistry;
import org.apache.muse.util.ReflectUtils;
import org.apache.muse.util.xml.XmlUtils;
import org.apache.muse.ws.wsdl.WsdlUtils;
import org.apache.qpid.management.Messages;
import org.apache.qpid.management.Names;
+import org.apache.qpid.management.wsdm.muse.engine.WSDMAdapterEnvironment;
import org.apache.qpid.management.wsdm.muse.serializer.ObjectSerializer;
import org.apache.qpid.qman.debug.WsdlDebugger;
import org.apache.qpid.transport.util.Logger;
@@ -49,126 +51,61 @@ import org.w3c.dom.Element; *
* @author Andrea Gazzarini
*/
-class WsdlBuilder implements IArtifactBuilder {
+class WsdlBuilder implements IArtifactBuilder,Constants {
private final static Logger LOGGER = Logger.get(WsdlBuilder.class);
- private Environment _environment;
+ private WSDMAdapterEnvironment _environment;
private Document _document;
private Element schema;
-
- private ObjectSerializer serializer = new ObjectSerializer();
-
+ private Element _wsrpProperties;
+ private ObjectSerializer _serializer;
private ObjectName _objectName;
-
- private boolean mapTypeHasBeenDeclared;
- private boolean uuidTypeHasBeenDeclared;
private Map<String, String> arrayTypesAlreadyDeclared = new HashMap<String, String>();
+ private Element _arrayComplexType;
+ private Element _nestedArrayType;
+
+ /**
+ * For each attibute the corresponding xml type definition must be inserted on the QMan
+ * schema related section.
+ * After that, a reference to that definition must be declared on the wsrp element .
+ *
+ * @param attributeMetadata the attribute metadata.
+ * @throws BuilderException only if this builder wasn't able to get a reference (via XPath)
+ * to QMan schema section.
+ */
public void onAttribute(MBeanAttributeInfo attributeMetadata) throws BuilderException
{
try
{
- /*
- <xs:element name='accountAttributes'>
- <xs:complexType>
- <xs:sequence>
- <xs:element maxOccurs='unbounded' minOccurs='0' name='entry'>
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs='0' name='key' type='xs:string'/>
- <xs:element minOccurs='0' name='value' type='xs:anyType'/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
-*/
- schema.appendChild(defineSchemaFor(attributeMetadata.getType(), attributeMetadata.getName()));
- Element wsrpProperties = (Element) XPathAPI.selectSingleNode(
- _document,
- "/wsdl:definitions/wsdl:types/xsd:schema[" +
- "@targetNamespace='http://amqp.apache.org/qpid/management/qman']" +
- "/xsd:element[@name='QManWsResourceProperties']/xsd:complexType/xsd:sequence");
+ String attributeName = attributeMetadata.getName();
+ schema.appendChild(defineSchemaFor(attributeMetadata.getType(), attributeName));
Element propertyRef= XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
+ propertyRef.setAttribute(MIN_OCCURS, "0");
propertyRef.setAttribute(
- "ref",
- Names.PREFIX+":"+attributeMetadata.getName());
- propertyRef.setAttribute("minOccurs", "0");
- wsrpProperties.appendChild(propertyRef);
-
+ REF_ATTRIBUTE,
+ Names.PREFIX+":"+attributeName);
+
+ _wsrpProperties.appendChild(propertyRef);
} catch(Exception exception)
{
throw new BuilderException(exception);
}
}
- private final static QName XSD_ELEMENT_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"element","xsd");
- private final static QName XSD_COMPLEX_TYPE_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"complexType","xsd");
- private final static QName XSD_SEQUENCE_QNAME = new QName(XMLConstants.W3C_XML_SCHEMA_NS_URI,"sequence","xsd");
-
@SuppressWarnings("unchecked")
private Element defineSchemaFor(String type, String attributeName) throws Exception
{
- if (type.equals("java.util.Map"))
+ Element propertyDeclaration = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
+ String xmlType = null;
+ if (type.equals(Map.class.getName()))
{
- if (!mapTypeHasBeenDeclared)
- {
- Element complexType = XmlUtils.createElement(_document, XSD_COMPLEX_TYPE_QNAME);
- complexType.setAttribute("name","map");
- Element sequence = XmlUtils.createElement(_document, XSD_SEQUENCE_QNAME);
-
- Element entry = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- entry.setAttribute("name", "entry");
- entry.setAttribute("minOccurs", "0");
- entry.setAttribute("maxOccurs", "unbounded");
-
- Element complexType2 = XmlUtils.createElement(_document, XSD_COMPLEX_TYPE_QNAME);
- Element sequence2 = XmlUtils.createElement(_document, XSD_SEQUENCE_QNAME);
-
- Element key = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- key.setAttribute("name", "key");
- key.setAttribute("type", "xsd:string");
-
- Element value = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- value.setAttribute("name", "value");
- value.setAttribute("type", "xsd:anyType");
-
- sequence2.appendChild(key);
- sequence2.appendChild(value);
- complexType2.appendChild(sequence2);
- entry.appendChild(complexType2);
- sequence.appendChild(entry);
- complexType.appendChild(sequence);
- schema.appendChild(complexType);
- mapTypeHasBeenDeclared = true;
- }
- Element propertyDeclaration = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- propertyDeclaration.setAttribute("name",attributeName);
- propertyDeclaration.setAttribute("type", "qman:map");
- return propertyDeclaration;
-
- } else if ("java.util.UUID".equals(type))
- {
- if (!uuidTypeHasBeenDeclared)
- {
- Element complexType = XmlUtils.createElement(_document, XSD_COMPLEX_TYPE_QNAME);
- complexType.setAttribute("name", "uuid");
- Element sequence = XmlUtils.createElement(_document, XSD_SEQUENCE_QNAME);
- Element uuid = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- uuid.setAttribute("name", "uuid");
- uuid.setAttribute("type", "xsd:string");
- sequence.appendChild(uuid);
- complexType.appendChild(sequence);
- schema.appendChild(complexType);
- uuidTypeHasBeenDeclared = true;
- }
- Element propertyDeclaration = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- propertyDeclaration.setAttribute("name",attributeName);
- propertyDeclaration.setAttribute("type", "qman:uuid");
- return propertyDeclaration;
+ xmlType="qman:map";
+ } else if (UUID.class.getName().equals(type))
+ {
+ xmlType = "qman:uuid";
} else if (type.startsWith("["))
{
Class arrayClass = Class.forName(type);
@@ -177,143 +114,40 @@ class WsdlBuilder implements IArtifactBuilder { arrayType = Character.toUpperCase(arrayType.charAt(0))+arrayType.substring(1);
if (!arrayTypesAlreadyDeclared.containsKey(type))
{
- Element complexType = XmlUtils.createElement(_document, XSD_COMPLEX_TYPE_QNAME);
- complexType.setAttribute("name", "arrayOf"+arrayType);
- Element sequence = XmlUtils.createElement(_document, XSD_SEQUENCE_QNAME);
- Element entry = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- entry.setAttribute("name", "entry");
- entry.setAttribute("type", serializer.getXmlType(clazz));
- sequence.appendChild(entry);
- complexType.appendChild(sequence);
- schema.appendChild(complexType);
+ _arrayComplexType.setAttribute(NAME_ATTRIBUTE, "arrayOf"+arrayType);
+ _nestedArrayType.setAttribute(TYPE_ATTRIBUTE, _serializer.getXmlType(clazz));
+ schema.appendChild(_arrayComplexType);
arrayTypesAlreadyDeclared.put(type, arrayType);
}
- Element propertyDeclaration = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- propertyDeclaration.setAttribute("name",attributeName);
- propertyDeclaration.setAttribute("type", "qman:arrayOf"+arrayTypesAlreadyDeclared.get(type));
- return propertyDeclaration;
+ xmlType = "qman:arrayOf"+arrayTypesAlreadyDeclared.get(type);
}
- else {
- Element propertyDeclaration = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
- propertyDeclaration.setAttribute("name",attributeName);
- propertyDeclaration.setAttribute("type", serializer.getXmlType(Class.forName(type)));
-
- return propertyDeclaration;
+ else
+ {
+ xmlType = _serializer.getXmlType(Class.forName(type));
}
+ propertyDeclaration.setAttribute(NAME_ATTRIBUTE,attributeName);
+ propertyDeclaration.setAttribute(TYPE_ATTRIBUTE, xmlType);
+ return propertyDeclaration;
}
-
+
+ /**
+ * Initializes this builder.
+ *
+ * @param objectName the name of the current JMX entity.
+ * @throws BuilderException when it's not possible to proceed with the initialization.
+ */
public void begin(ObjectName objectName) throws BuilderException
{
this._objectName = objectName;
- try
- {
- Attr location = (Attr) XPathAPI.selectSingleNode(
- _document,
- "/wsdl:definitions/wsdl:service/wsdl:port/wsdl-soap:address/@location");
-
- StringBuilder builder = new StringBuilder("http://")
- .append(InetAddress.getLocalHost().getHostName())
- .append(':')
- .append(System.getProperty(Names.ADAPTER_PORT_PROPERTY_NAME,"8080"))
- .append('/')
- .append("qman")
- .append('/')
- .append("services/QManWsResource");
- location.setValue(builder.toString());
- } catch(Exception exception)
- {
- LOGGER.error(
- exception,
- Messages.QMAN_100026_SOAP_ADDRESS_REPLACEMENT_FAILURE);
- throw new BuilderException(exception);
- }
-
- try
- {
- schema = (Element) XPathAPI.selectSingleNode(
- _document.getDocumentElement(),
- "/wsdl:definitions/wsdl:types/xsd:schema[@targetNamespace='http://amqp.apache.org/qpid/management/qman']");
- } catch(Exception exception)
- {
- LOGGER.error(
- exception,
- Messages.QMAN_100034_WSDL_SCHEMA_SECTION_NOT_FOUND);
- throw new BuilderException(exception);
- }
-/*
- <xs:complexType name='InvocationResult'>
- <xs:sequence>
- <xs:element name='statusCode' type="xsd:long" />
- <xs:element name='statusText' type="xsd:string" />
- <xs:element name='outputParameters'>
- <xs:complexType>
- <xs:sequence>
-
- <xs:element maxOccurs='unbounded' minOccurs='0' name='entry'>
-
- <xs:complexType>
- <xs:sequence>
- <xs:element minOccurs='0' name="name' type='xs:string'/>
- <xs:element minOccurs='0' name="value" type='xs:anyType'/>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
- </xs:element>
- </xs:sequence>
- </xs:complexType>
-*/
- Element complexTypeResult = _document.createElement("xsd:complexType");
- complexTypeResult.setAttribute("name", "result");
- Element sequence = _document.createElement("xsd:sequence");
- complexTypeResult.appendChild(sequence);
-
- Element statusCode = _document.createElement("xsd:element");
- statusCode.setAttribute("name", "statusCode");
- statusCode.setAttribute("type", "xsd:long");
-
- Element statusText = _document.createElement("xsd:element");
- statusText.setAttribute("name", "statusText");
- statusText.setAttribute("type", "xsd:string");
-
- sequence.appendChild(statusCode);
- sequence.appendChild(statusText);
-
- Element outputParams = _document.createElement("xsd:complexType");
- outputParams.setAttribute("name", "outputParameters");
- sequence.appendChild(outputParams);
-
- Element complexTypeOutput = _document.createElement("xsd:complexType");
- Element outputSequence = _document.createElement("xsd:sequence");
+ this._serializer = (ObjectSerializer) SerializerRegistry.getInstance().getSerializer(Object.class);
- outputParams.appendChild(complexTypeOutput);
- complexTypeOutput.appendChild(outputSequence);
+ createWsrpPropertiesElement();
- Element entry = _document.createElement("xsd:element");
- entry.setAttribute("maxOccurs", "unbounded");
- entry.setAttribute("minOccurs", "0");
- entry.setAttribute("name", "entry");
+ createReusableArrayComplextType();
- outputSequence.appendChild(entry);
+ replaceDummyServiceLocationOnWsdl();
- Element entryComplexType = _document.createElement("xsd:complexType");
- Element entrySequence = _document.createElement("xsd:sequence");
- entryComplexType.appendChild(entrySequence);
- entry.appendChild(entryComplexType);
-
- Element name = _document.createElement("xsd:name");
- name.setAttribute("name", "key");
- name.setAttribute("type", "xsd:string");
-
- Element value = _document.createElement("xsd:element");
- value.setAttribute("name", "value");
- value.setAttribute("type", "xsd:anyType");
-
- entrySequence.appendChild(name);
- entrySequence.appendChild(value);
-
- schema.appendChild(complexTypeResult);
+ createSchemaElement();
}
public void onOperation(MBeanOperationInfo operationMetadata) throws BuilderException
@@ -350,9 +184,9 @@ class WsdlBuilder implements IArtifactBuilder { <xs:sequence />
</xs:complexType>
*/
+
try
{
- // <xs:element name='purgeRequest' type='qman:purgeRequest' />
// <xsd:element xmlns="" name="purgeRequest" type="qman:purgeRequest"/>
Element methodRequestElement= _document.createElement("xsd:element");
@@ -361,13 +195,13 @@ class WsdlBuilder implements IArtifactBuilder { methodRequestElement.setAttribute("type", "qman:"+methodNameRequest);
// <xs:element name='purgeResponse' type='qman:purgeResponse' />
- Element methodResponseElement= _document.createElement("xsd:element");
+// Element methodResponseElement= _document.createElement("xsd:element");
String methodNameResponse= operationMetadata.getName()+"Response";
- methodResponseElement.setAttribute("name", methodNameResponse);
- methodResponseElement.setAttribute("type", "qman:"+methodNameResponse);
+// methodResponseElement.setAttribute("name", methodNameResponse);
+// methodResponseElement.setAttribute("type", "qman:result");//+methodNameResponse);
schema.appendChild(methodRequestElement);
- schema.appendChild(methodResponseElement);
+// schema.appendChild(methodResponseElement);
/*
<xs:complexType name='purgeRequest'>
@@ -391,19 +225,6 @@ class WsdlBuilder implements IArtifactBuilder { methodNameRequestComplexType.appendChild(methodNameRequestComplexTypeSequence);
schema.appendChild(methodNameRequestComplexType);
- Element methodNameResponseComplexType = _document.createElement("xsd:complexType");
- methodNameResponseComplexType.setAttribute("name", methodNameResponse);
-
- Element methodNameResponseSequence = _document.createElement("xsd:sequence");
- methodNameResponseComplexType.appendChild(methodNameResponseSequence);
-
- Element result = _document.createElement("xsd:element");
- result.setAttribute("name", "result");
- result.setAttribute("type", "qman:result");
- methodNameResponseSequence.appendChild(result);
-
- schema.appendChild(methodNameResponseComplexType);
-
/*
<message name="purgeResponseMessage">
<part element='qman:purgeResponse' name='purgeResponse'></part>
@@ -428,7 +249,7 @@ class WsdlBuilder implements IArtifactBuilder { Element responseMessage = _document.createElement("wsdl:message");
responseMessage.setAttribute("name", responseMessageName);
Element responsePart = _document.createElement("wsdl:part");
- responsePart.setAttribute("element", "qman:"+methodNameResponse);
+ responsePart.setAttribute("element", "qman:result");//+methodNameResponse);
responsePart.setAttribute("name", methodNameResponse);
responseMessage.appendChild(responsePart);
@@ -506,29 +327,134 @@ class WsdlBuilder implements IArtifactBuilder { }
}
+ /**
+ * Director callback : all attributes have been notified.
+ * Nothing to do here.
+ */
public void endAttributes()
{
// N.A.
}
+ /**
+ * Director callback : all operations have been notified.
+ * Nothing to do here.
+ */
public void endOperations()
{
-
+ // N.A.
}
+ /**
+ * Returns the WSDL built by this builder.
+ *
+ * @return the WSDL built by this builder.
+ */
public Document getWsdl()
{
WsdlDebugger.debug(_objectName,_document);
return _document;
}
+ /**
+ * Injects the application context environment
+ * on this builder.
+ *
+ * @param environment the application context environment.
+ */
public void setEnvironment(Environment environment)
{
- this._environment = environment;
+ this._environment = (WSDMAdapterEnvironment)environment;
}
+ /**
+ * Injects the path of the wsdl document.
+ *
+ * @param wsdlPath the path of the wsdl document.
+ */
public void setWsdlPath(String wsdlPath)
{
_document = WsdlUtils.createWSDL(_environment, wsdlPath, true);
}
-}
+
+ /**
+ * Create a reference to the WSRP properties element.
+ *
+ * @throws BuilderException in case of XPath evaluation problem.
+ */
+ private void createWsrpPropertiesElement() throws BuilderException
+ {
+ try
+ {
+ _wsrpProperties = (Element) XPathAPI.selectSingleNode(
+ _document,
+ WSRP_PROPERTIES_XPATH);
+ } catch (TransformerException exception)
+ {
+ LOGGER.error(Messages.QMAN_100040_UNABLE_TO_LOCATE_WSRP_PROPERTIES);
+ throw new BuilderException(exception);
+ }
+ }
+
+ /**
+ * Creates a template element that will be used for array
+ * type schema declaration(s).
+ */
+ private void createReusableArrayComplextType()
+ {
+ _arrayComplexType = XmlUtils.createElement(_document, XSD_COMPLEX_TYPE_QNAME);
+ Element sequence = XmlUtils.createElement(_document, XSD_SEQUENCE_QNAME);
+ _nestedArrayType = XmlUtils.createElement(_document, XSD_ELEMENT_QNAME);
+ _nestedArrayType.setAttribute(NAME_ATTRIBUTE, "entry");
+ sequence.appendChild(_nestedArrayType);
+ _arrayComplexType.appendChild(sequence);
+ }
+
+ private void createSchemaElement() throws BuilderException
+ {
+ try
+ {
+ schema = (Element) XPathAPI.selectSingleNode(
+ _document.getDocumentElement(),
+ QMAN_SCHEMA_XPATH);
+ } catch(Exception exception)
+ {
+ LOGGER.error(
+ exception,
+ Messages.QMAN_100034_WSDL_SCHEMA_SECTION_NOT_FOUND);
+ throw new BuilderException(exception);
+ }
+ }
+
+ /**
+ * The template WSDL contains a dummy URL as service location that
+ * needs to be replaced with the real service address.
+ *
+ * @throws BuilderException when replacement fails (XPath problem).
+ */
+ private void replaceDummyServiceLocationOnWsdl() throws BuilderException
+ {
+ try
+ {
+ Attr location = (Attr) XPathAPI.selectSingleNode(
+ _document,
+ SERVICE_LOCATION_XPATH);
+
+ StringBuilder builder = new StringBuilder("http://")
+ .append(InetAddress.getLocalHost().getHostName())
+ .append(':')
+ .append(System.getProperty(Names.ADAPTER_PORT_PROPERTY_NAME,"8080"))
+ .append('/')
+ .append(_environment.getContextPath())
+ .append('/')
+ .append("services/QManWsResource");
+ location.setValue(builder.toString());
+ } catch(Exception exception)
+ {
+ LOGGER.error(
+ exception,
+ Messages.QMAN_100026_SOAP_ADDRESS_REPLACEMENT_FAILURE);
+ throw new BuilderException(exception);
+ }
+ }
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/EntityInstanceNotFoundFault.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/EntityInstanceNotFoundFault.java index 25bb871e75..116d74727a 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/EntityInstanceNotFoundFault.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/EntityInstanceNotFoundFault.java @@ -50,6 +50,9 @@ public class EntityInstanceNotFoundFault extends QManFault */
public EntityInstanceNotFoundFault(EndpointReference endpointReference, ObjectName targetEntityName)
{
- super(endpointReference,EXCEPTION_QNAME, targetEntityName.getCanonicalName());
+ super(
+ endpointReference,
+ EXCEPTION_QNAME,
+ targetEntityName.getCanonicalName());
}
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/ThreadSession.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/ThreadSession.java index bc214b8b25..588879b951 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/ThreadSession.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/common/ThreadSession.java @@ -25,7 +25,6 @@ import javax.management.ObjectName; import org.w3c.dom.Document; import org.w3c.dom.Element; - /** * Thread-scoped session. * @@ -35,7 +34,8 @@ public class ThreadSession { private ObjectName _objectName; private Document _wsdl; - private Element [] additionalProperties; + private Element [] _wsrmdProperties; + /** * Empty constructor. */ @@ -90,7 +90,7 @@ public class ThreadSession */ public Element[] getResourceMetadataDescriptor() { - return additionalProperties; + return _wsrmdProperties; } /** @@ -100,6 +100,6 @@ public class ThreadSession */ public void setResourceMetadataDescriptor(Element[] rmd) { - this.additionalProperties = rmd; + this._wsrmdProperties = rmd; } }
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java index f47a587830..b5d978e0e5 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/engine/WSDMAdapterEnvironment.java @@ -64,6 +64,11 @@ public class WSDMAdapterEnvironment extends AbstractEnvironment return _realDirectory;
}
+ /**
+ * Returns the default endpoint reference URI.
+ *
+ * @return the default endpoint reference URI.
+ */
public String getDefaultURIPrefix()
{
return new StringBuilder()
@@ -79,4 +84,14 @@ public class WSDMAdapterEnvironment extends AbstractEnvironment .append("/services/")
.toString();
}
+
+ /**
+ * Returns the context path name of QMan application.
+ *
+ * @return the context path name of QMan application.
+ */
+ public String getContextPath()
+ {
+ return _servletContext.getContextPath();
+ }
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java index 0af570eacf..b819d52ad1 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java @@ -38,8 +38,6 @@ import org.w3c.dom.Element; */
public class InvocationResultSerializer implements Serializer
{
- private Serializer _longSerializer = SerializerRegistry.getInstance().getSerializer(long.class);
- private Serializer _stringSerializer = SerializerRegistry.getInstance().getSerializer(String.class);
private Serializer _mapSerializer = SerializerRegistry.getInstance().getSerializer(Map.class);
/**
@@ -51,26 +49,8 @@ public class InvocationResultSerializer implements Serializer @SuppressWarnings("unchecked")
public Object fromXML(Element elementData) throws SoapFault
{
- long statusCode = 0;
- String statusText = null;
- Map<String, Object> outputSection = null;
-
- Element[] elements = XmlUtils.getAllElements(elementData);
- for (Element element : elements)
- {
- if ("statusCode".equals(element.getNodeName()))
- {
- statusCode = (Long) _longSerializer.fromXML(element);
- } else if ("statusText".equals(element.getNodeName()))
- {
- statusText = (String) _stringSerializer.fromXML(element);
- } else if ("outputParameters".equals(element.getNodeName()))
- {
- outputSection = (Map<String, Object>) _mapSerializer.fromXML(element);
- }
- }
-
- return new Result(statusCode,statusText,outputSection);
+ Element outputParameters = XmlUtils.getFirstElement(elementData);
+ return new Result((Map<String, Object>) _mapSerializer.fromXML(outputParameters));
}
/**
@@ -95,17 +75,11 @@ public class InvocationResultSerializer implements Serializer {
Result result = (Result) obj;
Element root = XmlUtils.createElement(qname);
- Element statusCode = SerializerRegistry.getInstance().getSerializer(long.class).toXML(result.getStatusCode(), new QName("statusCode"));
- Element statusText = SerializerRegistry.getInstance().getSerializer(String.class).toXML(result.getStatusText(), new QName("statusText"));
-
- root.appendChild(statusCode);
- root.appendChild(statusText);
if (result.getOutputParameters() != null)
{
Element outputSection = SerializerRegistry.getInstance().getSerializer(Map.class).toXML(result.getOutputParameters(), new QName("outputParameters"));
root.appendChild(outputSection);
}
- return root;
-
+ return root;
}
}
\ No newline at end of file diff --git a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java index 1d0d02c669..07e1dfdc56 100644 --- a/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java +++ b/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java @@ -62,25 +62,29 @@ public class MapSerializer implements Serializer public Object fromXML(Element xml) throws SoapFault
{
Map<Object,Object> result = new HashMap<Object,Object>();
- Element[] children = XmlUtils.getAllElements(xml);
- Serializer objectDeserializer = SerializerRegistry.getInstance().getSerializer(Object.class);
- for (Element entry : children)
+ if (xml != null)
{
- Element[] keysAndValues = XmlUtils.getAllElements(entry);
- Object key = null;
- Object value = null;
- for (Element element : keysAndValues)
+ Element[] children = XmlUtils.getAllElements(xml);
+ Serializer objectDeserializer = SerializerRegistry.getInstance().getSerializer(Object.class);
+
+ for (Element entry : children)
{
- if (Names.KEY.equals(element.getLocalName()))
- {
- key = _stringSerializer.fromXML(element);
- } else if (Names.VALUE.equals(element.getLocalName()))
+ Element[] keysAndValues = XmlUtils.getAllElements(entry);
+ Object key = null;
+ Object value = null;
+ for (Element element : keysAndValues)
{
- value = objectDeserializer.fromXML(element);
+ if (Names.KEY.equals(element.getLocalName()))
+ {
+ key = _stringSerializer.fromXML(element);
+ } else if (Names.VALUE.equals(element.getLocalName()))
+ {
+ value = objectDeserializer.fromXML(element);
+ }
}
+ result.put(key, value);
}
- result.put(key, value);
}
return result;
}
diff --git a/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl b/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl index 69647521ba..16169c9b78 100644 --- a/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl +++ b/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl @@ -93,7 +93,33 @@ </xsd:complexContent>
</xsd:complexType>
</xsd:element>
- </xsd:schema>
+
+ <xsd:complexType name="uuid">
+ <xsd:sequence>
+ <xsd:element name="uuid" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="map">
+ <xsd:sequence>
+ <xsd:element name="entry" minOccurs="0" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="key" type="xsd:string"/>
+ <xsd:element name="value" type="xsd:anyType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="result">
+ <xsd:sequence>
+ <xsd:element name="outputParameters" type="qman:map"/>
+ </xsd:sequence>
+ </xsd:complexType>
+
+ </xsd:schema>
</wsdl:types>
<wsdl:message name="GetMetadataMsg">
<wsdl:part name="GetMetadataMsg" element="wsx:GetMetadata" />
diff --git a/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl b/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl index 8764c18fc9..d53bf60f3a 100644 --- a/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl +++ b/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl @@ -424,23 +424,22 @@ This document and the information contained herein is provided on an "AS IS" bas <wsdl:fault name="InvalidResourcePropertyQNameFault" message="wsrf-rpw:InvalidResourcePropertyQNameFault" />
</wsdl:operation>
- </wsdl:portType>
+<!-- </wsdl:portType>
-<!-- ====== PausableSubscriptionManager PortType Definition ======= -->
<wsdl:portType name="PausableSubscriptionManager">
-
+-->
<!-- === PausableSubscriptionManager specific operations === -->
<wsdl:operation name="PauseSubscription">
- <wsdl:input message="wsntw:PauseSubscriptionRequest"/>
- <wsdl:output message="wsntw:PauseSubscriptionResponse"/>
+ <wsdl:input message="wsntw:PauseSubscriptionRequest" wsa:Action="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/PauseSubscriptionRequest"/>
+ <wsdl:output message="wsntw:PauseSubscriptionResponse" wsa:Action="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/PauseSubscriptionResponse"/>
<wsdl:fault name="ResourceUnknownFault"
message="wsrf-rw:ResourceUnknownFault" />
<wsdl:fault name="PauseFailedFault"
message="wsntw:PauseFailedFault" />
</wsdl:operation>
<wsdl:operation name="ResumeSubscription">
- <wsdl:input message="wsntw:ResumeSubscriptionRequest"/>
- <wsdl:output message="wsntw:ResumeSubscriptionResponse"/>
+ <wsdl:input message="wsntw:ResumeSubscriptionRequest" wsa:Action="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/ResumeSubscriptionRequest"/>
+ <wsdl:output message="wsntw:ResumeSubscriptionResponse" wsa:Action="http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/ResumeSubscriptionResponse"/>
<wsdl:fault name="ResourceUnknownFault"
message="wsrf-rw:ResourceUnknownFault" />
<wsdl:fault name="ResumeFailedFault"
diff --git a/qpid/java/management/client/src/main/java/wsdl/WS-ServiceGroupEntry-1_2.wsdl b/qpid/java/management/client/src/main/java/wsdl/WS-ServiceGroupEntry-1_2.wsdl index dc4581d8a8..379382c18d 100644 --- a/qpid/java/management/client/src/main/java/wsdl/WS-ServiceGroupEntry-1_2.wsdl +++ b/qpid/java/management/client/src/main/java/wsdl/WS-ServiceGroupEntry-1_2.wsdl @@ -200,7 +200,7 @@ </wsdl:binding>
<wsdl:service name="ServiceGroupEntryService">
<wsdl:port name="ServiceGroupEntryPort" binding="tns:ServiceGroupEntryBinding">
- <wsdl-soap:address location="http://romagazzarini:8080/wsrf/services/ServiceGroupEntry"/>
+ <wsdl-soap:address location="http://localhost:8080/wsrf/services/ServiceGroupEntry"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/TestConstants.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/TestConstants.java index 12ba1fab73..9abcd08eef 100644 --- a/qpid/java/management/client/src/test/java/org/apache/qpid/management/TestConstants.java +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/TestConstants.java @@ -63,5 +63,5 @@ public interface TestConstants int SAMPLE_ACCESS_CODE = 1; String YEARS = "years"; int SAMPLE_MIN_VALUE = 1; - int SAMPLE_MAX_VALUE = 120; + int SAMPLE_MAX_VALUE = 120; }
\ No newline at end of file diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/configuration/ConfigurationTest.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/configuration/ConfigurationTest.java index 8e9c3ccd6b..72bd45f70f 100644 --- a/qpid/java/management/client/src/test/java/org/apache/qpid/management/configuration/ConfigurationTest.java +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/configuration/ConfigurationTest.java @@ -23,16 +23,13 @@ package org.apache.qpid.management.configuration; import java.util.Map; import java.util.UUID; +import junit.framework.TestCase; + import org.apache.qpid.management.TestConstants; import org.apache.qpid.management.domain.handler.base.IMessageHandler; import org.apache.qpid.management.domain.handler.impl.ConfigurationMessageHandler; import org.apache.qpid.management.domain.handler.impl.InstrumentationMessageHandler; import org.apache.qpid.management.domain.handler.impl.SchemaResponseMessageHandler; -import org.apache.qpid.management.domain.model.AccessMode; -import org.apache.qpid.management.domain.model.type.Type; -import org.apache.qpid.management.domain.model.type.Uint8; - -import junit.framework.TestCase; /** * Test case for Configuration singleton. @@ -46,22 +43,7 @@ public class ConfigurationTest extends TestCase { assertSame(Configuration.getInstance(),Configuration.getInstance()); } - - /** - * Tests the execution of getType() method when a valid code is supplied. - * - * <br>precondition : the requested type already exist on the configuration. - * <br>postcondition : the requested type is returned and no exception is thrown. - */ - public void testGetTypeOk() throws UnknownTypeCodeException - { - TypeMapping mapping = new TypeMapping(TestConstants.VALID_CODE,new Uint8()); - Configuration.getInstance().addTypeMapping(mapping); - Type type = Configuration.getInstance().getType(TestConstants.VALID_CODE); - assertTrue(type instanceof Uint8); - } - /** * Tests the execution of getType() method when a unknown code is supplied. * @@ -79,22 +61,7 @@ public class ConfigurationTest extends TestCase assertEquals(TestConstants.VALID_CODE*10001,expected.getCode()); } } - - /** - * Tests the execution of getAccessMode() method when a valid code is supplied. - * - * <br>precondition : the requested access mode already exist on the configuration. - * <br>postcondition : the requested access mode is returned and no exception is thrown. - */ - public void testGetAccessModeOk() throws UnknownAccessCodeException - { - AccessModeMapping mapping = new AccessModeMapping(TestConstants.VALID_CODE,AccessMode.RW); - Configuration.getInstance().addAccessModeMapping(mapping); - AccessMode accessMode = Configuration.getInstance().getAccessMode(TestConstants.VALID_CODE); - - assertSame(AccessMode.RW,accessMode); - } - + /** * Tests the execution of getAccessMode() method when a unknown code is supplied. * diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/BaseWsDmAdapterTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/BaseWsDmAdapterTestCase.java new file mode 100644 index 0000000000..900d14c72e --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/BaseWsDmAdapterTestCase.java @@ -0,0 +1,143 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import java.lang.management.ManagementFactory;
+import java.net.URI;
+import java.util.UUID;
+
+import javax.management.MBeanInfo;
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import junit.framework.TestCase;
+
+import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.resource.remote.WsResourceClient;
+import org.apache.muse.ws.resource.sg.remote.ServiceGroupClient;
+import org.apache.qpid.management.Names;
+import org.apache.qpid.management.Protocol;
+import org.apache.qpid.management.TestConstants;
+
+/**
+ * Test case for WS-Resource lifecycle management.
+ *
+ * @author Andrea Gazzarini
+ */
+public abstract class BaseWsDmAdapterTestCase extends TestCase implements TestConstants{
+
+ protected MBeanServer _managementServer;
+ protected ObjectName _resourceObjectName;
+
+ protected WsResourceClient _resourceClient;
+ protected MBeanInfo _mbeanInfo;
+
+ /**
+ * Set up fixture for this test case.
+ *
+ * @throws Exception when the test case intialization fails.
+ */
+ protected void setUp() throws Exception
+ {
+ _managementServer = ManagementFactory.getPlatformMBeanServer();
+
+ ServiceGroupClient serviceGroup = getServiceGroupClient();
+ WsResourceClient [] members = serviceGroup.getMembers();
+
+ assertEquals(
+ "No resource has been yet created so how is " +
+ "it possible that service group children list is not empty?",
+ 0,
+ members.length);
+
+ _managementServer.invoke(
+ Names.QPID_EMULATOR_OBJECT_NAME,
+ "createQueue",
+ new Object[]{_resourceObjectName = createResourceName()},
+ new String[]{ObjectName.class.getName()});
+
+ members = serviceGroup.getMembers();
+ assertEquals(
+ "One resource has just been created so " +
+ "I expect to find it on service group children list...",
+ 1,
+ members.length);
+
+ _resourceClient = members[0];
+ _mbeanInfo = _managementServer.getMBeanInfo(_resourceObjectName);
+ }
+
+ /**
+ * Shutdown procedure for this test case.
+ *
+ * @throws Exception when either the server or some resource fails to shutdown.
+ */
+ @Override
+ protected void tearDown() throws Exception
+ {
+ ServiceGroupClient serviceGroup = getServiceGroupClient();
+ WsResourceClient [] members = serviceGroup.getMembers();
+
+ _managementServer.invoke(
+ Names.QPID_EMULATOR_OBJECT_NAME,
+ "unregister",
+ new Object[]{_resourceObjectName},
+ new String[]{ObjectName.class.getName()});
+
+ members = serviceGroup.getMembers();
+
+ assertEquals(
+ "No resource has been yet created so how is it possible that service group children list is not empty?",
+ 0,
+ members.length);
+ }
+
+ /**
+ * Creates a service group client reference.
+ *
+ * @return a service group client reference.
+ */
+ private ServiceGroupClient getServiceGroupClient()
+ {
+ URI address = URI.create(
+ Protocol.DEFAULT_ENDPOINT_URI.replaceFirst("8080",System.getProperty(Names.ADAPTER_PORT_PROPERTY_NAME)));
+ return new ServiceGroupClient(new EndpointReference(address));
+ }
+
+ /**
+ * In order to test the behaviour of the WS-DM adapter, at
+ * least one resource must be created. This is the method that
+ * returns the name (ObjectName on JMX side, Resource-ID on WSDM side)
+ * of that resource
+ *
+ * @return the name of the MBean instance that will be created.
+ * @throws Exception when the name if malformed. Practically never.
+ */
+ private ObjectName createResourceName() throws Exception
+ {
+ return new ObjectName(
+ "Q-MAN:objectId="+UUID.randomUUID()+
+ ", brokerID="+UUID.randomUUID()+
+ ",class=queue"+
+ ",package=org.apache.qpid"+
+ ",name="+System.currentTimeMillis());
+ }
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetMultipleResourcePropertiesTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetMultipleResourcePropertiesTestCase.java new file mode 100644 index 0000000000..d59e7a39e5 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetMultipleResourcePropertiesTestCase.java @@ -0,0 +1,125 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import java.util.Date;
+import java.util.UUID;
+
+import javax.management.MBeanAttributeInfo;
+import javax.xml.namespace.QName;
+
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.WsrfConstants;
+import org.apache.qpid.management.Names;
+import org.w3c.dom.Element;
+
+/**
+ * Test case for Web Service Resource Properties interfaces.
+ * Those interfaces are defined on http://docs.oasis-open.org/wsrf/wsrf-ws_resource_properties-1.2-spec-os.pdf
+ * (Web Services Resource Properties 1.2 - (WS-ResourceProperties).
+ * For a better explanation see chapter 5 of the specification above.
+ *
+ * @author Andrea Gazzarini
+ */
+public class GetMultipleResourcePropertiesTestCase extends BaseWsDmAdapterTestCase
+{
+ /**
+ * Tests the GetMultipleResourceProperties interface when the request contains
+ * an unknwon target resource.
+ *
+ * <br>precondition : the GetMultipleResourceProperties request contains an unknwon resource.
+ * <br>postcondition : a SoapFault is thrown and the corresponding detail contains an
+ * UnknownResourceFault element.
+ */
+ public void testGetMultipleResourcePropertiesKO_WithUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+
+ _resourceClient.getMultipleResourceProperties(new QName[]{});
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+
+ /**
+ * Test the WS-RP GetResourceProperties interface of the WS-DM adapter.
+ *
+ * <br>precondition : a ws resource exists and is registered.
+ * <br>postcondition : Properties are correctly returned according to WSRP interface and they (their value)
+ * are matching with corresponding MBean properties.
+ */
+ public void testGetMultipleResourcePropertiesOK() throws Exception
+ {
+ MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
+ QName[] names = new QName[attributesMetadata.length];
+
+ int index = 0;
+ for (MBeanAttributeInfo attributeMetadata : _mbeanInfo.getAttributes())
+ {
+ QName qname = new QName(Names.NAMESPACE_URI,attributeMetadata.getName(),Names.PREFIX);
+ names[index++] = qname;
+ }
+
+ Element[] properties =_resourceClient.getMultipleResourceProperties(names);
+ for (Element element : properties)
+ {
+ String name = element.getLocalName();
+ Object value = _managementServer.getAttribute(_resourceObjectName, name);
+ if ("Name".equals(name))
+ {
+ assertEquals(
+ value,
+ element.getTextContent());
+ } else if ("Durable".equals(name))
+ {
+ assertEquals(
+ value,
+ Boolean.valueOf(element.getTextContent()));
+ } else if ("ExpireTime".equals(name))
+ {
+ assertEquals(
+ value,
+ new Date(Long.valueOf(element.getTextContent())));
+ } else if ("MsgTotalEnqueues".equals(name))
+ {
+ assertEquals(
+ value,
+ Long.valueOf(element.getTextContent()));
+ } else if ("ConsumerCount".equals(name))
+ {
+ assertEquals(
+ value,
+ Integer.valueOf(element.getTextContent()));
+ }else if ("VhostRef".equals(name))
+ {
+ assertEquals(
+ value,
+ UUID.fromString(element.getTextContent()));
+ }
+ }
+ }
+}
diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertiesTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertiesTestCase.java new file mode 100644 index 0000000000..e18e928cf4 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertiesTestCase.java @@ -0,0 +1,105 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import java.lang.reflect.Array;
+
+import javax.management.MBeanAttributeInfo;
+import javax.xml.namespace.QName;
+
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.WsrfConstants;
+import org.apache.qpid.management.Names;
+
+/**
+ * Test case for Web Service Resource Properties interfaces.
+ * Those interfaces are defined on http://docs.oasis-open.org/wsrf/wsrf-ws_resource_properties-1.2-spec-os.pdf
+ * (Web Services Resource Properties 1.2 - (WS-ResourceProperties).
+ * For a better explanation see chapter 5 of the specification above.
+ *
+ * @author Andrea Gazzarini
+ */
+public class GetResourcePropertiesTestCase extends BaseWsDmAdapterTestCase
+{
+
+ /**
+ * Test the WS-RP GetResourceProperty interface of the WS-DM adapter.
+ *
+ * <br>precondition : a ws resource exists and is registered.
+ * <br>postcondition : property values coming from WS-DM resource are the same of the JMX interface.
+ */
+ public void testGetResourcePropertiesOK() throws Exception
+ {
+ MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
+ for (MBeanAttributeInfo attributeMetadata : attributesMetadata)
+ {
+ String name = attributeMetadata.getName();
+ Object propertyValues = _resourceClient.getPropertyAsObject(
+ new QName(
+ Names.NAMESPACE_URI,
+ name,
+ Names.PREFIX),
+ Class.forName(attributeMetadata.getType()));
+
+ int length = Array.getLength(propertyValues);
+ if (length != 0)
+ {
+ Object propertyValue = Array.get(propertyValues, 0);
+
+ assertEquals(
+ "Comparison failed for property "+name,
+ _managementServer.getAttribute(_resourceObjectName,name),
+ propertyValue);
+ } else {
+ assertNull(
+ String.format(
+ "\"%s\" property value shouldn't be null. Its value is %s",
+ name,
+ _managementServer.getAttribute(_resourceObjectName,name)),
+ _managementServer.getAttribute(_resourceObjectName,name));
+ }
+ }
+ }
+
+ /**
+ * Tests the GetMultipleResourceProperties interface when the request contains
+ * an unknwon target resource.
+ *
+ * <br>precondition : the GetMultipleResourceProperties request contains an unknwon resource.
+ * <br>postcondition : a SoapFault is thrown and the corresponding detail contains an
+ * UnknownResourceFault element.
+ */
+ public void testGetResourcePropertiesKO_WithUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+
+ _resourceClient.getResourceProperty(new QName("a","b","c"));
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+}
diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertyDocumentTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertyDocumentTestCase.java new file mode 100644 index 0000000000..862115f841 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/GetResourcePropertyDocumentTestCase.java @@ -0,0 +1,134 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import javax.xml.namespace.QName;
+
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.WsrfConstants;
+import org.apache.qpid.management.Names;
+import org.w3c.dom.Element;
+
+/**
+ * Test case for Web Service Resource Properties interfaces.
+ * Those interfaces are defined on http://docs.oasis-open.org/wsrf/wsrf-ws_resource_properties-1.2-spec-os.pdf
+ * (Web Services Resource Properties 1.2 - (WS-ResourceProperties).
+ * For a better explanation see chapter 5 of the specification above.
+ *
+ * @author Andrea Gazzarini
+ */
+public class GetResourcePropertyDocumentTestCase extends BaseWsDmAdapterTestCase
+{
+ /**
+ * Tests the GetResourcePropertyDocument interface when the request contains
+ * an unknwon target resource.
+ *
+ * <br>precondition : the GetResourcePropertyDocument contains an unknwon resource.
+ * <br>postcondition : a SoapFault is thrown and the corresponding detail contains an
+ * UnknownResourceFault element.
+ */
+ public void testGetResourcePropertyDocumentKO_WithUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+ _resourceClient.setTrace(true);
+
+ _resourceClient.getResourcePropertyDocument();
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+
+ /**
+ * Tests the WS-RP PutResourcePropertyDocument interface of the WS-DM adapter.
+ *
+ * <br>precondition : a ws resource exists and is registered.
+ * <br>postcondition : A read / write property is correctly set according to WSRP interface.
+ */
+ public void testGetAndPutResourcePropertyDocumentOK() throws Exception
+ {
+ String expectedMgmtPubIntervalValue = "4321";
+ String propertyName = "MgmtPubInterval";
+
+ Element propertiesDocument = _resourceClient.getResourcePropertyDocument();
+ Element [] properties = XmlUtils.getAllElements(propertiesDocument);
+
+ for (Element element : properties)
+ {
+ if (propertyName.equals(element.getLocalName())) {
+ element.setTextContent(expectedMgmtPubIntervalValue);
+ } else {
+ propertiesDocument.removeChild(element);
+ }
+ }
+
+ _resourceClient.putResourcePropertyDocument(propertiesDocument);
+
+ Element newProperties = _resourceClient.getResourcePropertyDocument();
+
+ Element mgmtPubInterval = XmlUtils.getElement(
+ newProperties, new QName(
+ Names.NAMESPACE_URI,
+ propertyName,
+ Names.PREFIX));
+
+ assertEquals(expectedMgmtPubIntervalValue,mgmtPubInterval.getTextContent());
+ }
+
+ /**
+ * Tests the WS-RP PutResourcePropertyDocument interface of the WS-DM adapter.
+ * Specifically it tries to update the value of a read-only property.
+ *
+ * <br>precondition : a ws resource exists, it is registered and has at least one read-only property.
+ * <br>postcondition : An exception is thrown indicating the failure.
+ */
+ public void testGetAndPutResourcePropertyDocumentKO_WithReadOnlyProperty() throws Exception
+ {
+ String propertyName = "Name";
+
+ Element propertiesDocument = _resourceClient.getResourcePropertyDocument();
+ Element [] properties = XmlUtils.getAllElements(propertiesDocument);
+
+ for (Element element : properties)
+ {
+ if (propertyName.equals(element.getLocalName())) {
+ element.setTextContent("ThisIsTheNewValueOfNameProperty");
+ } else {
+ propertiesDocument.removeChild(element);
+ }
+ }
+
+ try
+ {
+ _resourceClient.putResourcePropertyDocument(propertiesDocument);
+ fail("It's not possible to update the value of a read-only property.");
+ } catch (SoapFault expected)
+ {
+
+ }
+ }
+}
diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/MetadataExchangeInterfaceTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/MetadataExchangeInterfaceTestCase.java new file mode 100644 index 0000000000..046f2226e6 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/MetadataExchangeInterfaceTestCase.java @@ -0,0 +1,169 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import javax.xml.namespace.QName;
+
+import org.apache.muse.core.proxy.ProxyHandler;
+import org.apache.muse.core.proxy.ReflectionProxyHandler;
+import org.apache.muse.util.xml.XmlUtils;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.metadata.WsxConstants;
+import org.apache.muse.ws.resource.WsrfConstants;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
+import org.apache.qpid.management.Names;
+import org.w3c.dom.Element;
+
+/**
+ * Test case for QMan metadata exchange interface.
+ *
+ * @author Andrea Gazzarini
+ */
+public class MetadataExchangeInterfaceTestCase extends BaseWsDmAdapterTestCase
+{
+ /**
+ * Test the MetadataExchange interface when the corresponding
+ * request doesn't contain a dialect. According to WS-MetadataExchange specs this should be
+ * intended as a "give-me-all-metadata" for that resource.
+ *
+ * <br>precondition : the GetMetadata request doesn't contain a dialect.
+ * <br>postcondition : the whole metadata document is returned with all metadata .
+ * It will contain both WSDL and RMD.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetMetadataOK_WithoutDialect() throws Exception
+ {
+ Element[] result = (Element[]) _resourceClient.invoke(
+ getProxyHandler(),
+ new Object[]{""});
+
+ assertEquals(2,result.length);
+
+ Element rmdMetadataSection = result[0];
+ Element wsdlMetadataSection = result[1];
+
+ Element rmd = XmlUtils.getFirstElement(rmdMetadataSection);
+ Element wsdl = XmlUtils.getFirstElement(wsdlMetadataSection);
+
+ assertEquals("MetadataDescriptor",rmd.getLocalName());
+ assertEquals("definitions",wsdl.getLocalName());
+ }
+
+ /**
+ * Test the MetadataExchange interface when the WSDL dialect is specified on the request.
+ *
+ * <br>precondition : the GetMetadata request contains WSDL dialect.
+ * <br>postcondition : the resource WSDL metadata document is returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetMetadataOK_WithWSDLDialect() throws Exception
+ {
+ Element[] result = (Element[]) _resourceClient.invoke(
+ getProxyHandler(),
+ new Object[]{WsxConstants.WSDL_DIALECT});
+
+ assertEquals(1,result.length);
+
+ Element wsdlMetadataSection = result[0];
+
+ Element wsdl = XmlUtils.getFirstElement(wsdlMetadataSection);
+
+ assertEquals("definitions",wsdl.getLocalName());
+ }
+
+ /**
+ * Test the MetadataExchange interface when the RMD dialect is specified on the request.
+ *
+ * <br>precondition : the GetMetadata request contains RMD dialect.
+ * <br>postcondition : the RMD metadata document is returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetMetadataOK_WithRMDDialect() throws Exception
+ {
+ Element[] result = (Element[]) _resourceClient.invoke(
+ getProxyHandler(),
+ new Object[]{WsrmdConstants.NAMESPACE_URI});
+
+ assertEquals(1,result.length);
+
+ Element rmdMetadataSection = result[0];
+
+ Element wsdl = XmlUtils.getFirstElement(rmdMetadataSection);
+
+ assertEquals("MetadataDescriptor",wsdl.getLocalName());
+ }
+
+ /**
+ * Test the MetadataExchange interface with an unknown metadata dialect.
+ *
+ * <br>precondition : the GetMetadata request contains an unknown dialect.
+ * <br>postcondition : the returned metadata section is empty.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetMetadataKO_WithoutUnknownDialect() throws Exception
+ {
+ Element [] metadata = (Element[]) _resourceClient.invoke(
+ getProxyHandler(),
+ new Object[]{"HopeThisIsAnUnknownDialect"});
+
+ assertEquals(0,metadata.length);
+ }
+
+ /**
+ * Test the MetadataExchange interface with an unknown metadata dialect.
+ *
+ * <br>precondition : the GetMetadata request contains an unknown dialect.
+ * <br>postcondition : the returned metadata section is empty.
+ */
+ @SuppressWarnings("unchecked")
+ public void testGetMetadataKO_WithoutUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+
+ _resourceClient.invoke(getProxyHandler(), new Object[]{""});
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+
+ /**
+ * Returns a proxy handler used for working with metadata exchange
+ * interface.
+ *
+ * @return a metadata proxy handler.
+ */
+ private ProxyHandler getProxyHandler()
+ {
+ ProxyHandler getMetadataHandler = new ReflectionProxyHandler();
+ getMetadataHandler.setAction("http://schemas.xmlsoap.org/ws/2004/09/mex/GetMetadata");
+ getMetadataHandler.setRequestName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "GetMetadata", "wsx"));
+ getMetadataHandler.setRequestParameterNames(new QName[]{new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Dialect", "wsx")});
+ getMetadataHandler.setResponseName(new QName("http://schemas.xmlsoap.org/ws/2004/09/mex", "Metadata", "wsx"));
+ getMetadataHandler.setReturnType(Element[].class);
+ return getMetadataHandler;
+ }
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/OperationInvocationInterfaceTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/OperationInvocationInterfaceTestCase.java new file mode 100644 index 0000000000..afc4a62085 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/OperationInvocationInterfaceTestCase.java @@ -0,0 +1,580 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import java.lang.reflect.Array;
+import java.lang.reflect.Method;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.xml.namespace.QName;
+
+import org.apache.muse.core.proxy.ProxyHandler;
+import org.apache.muse.core.proxy.ReflectionProxyHandler;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.qpid.management.Names;
+import org.apache.qpid.management.wsdm.capabilities.Result;
+
+/**
+ * Test case for QMan operation invocation interface.
+ *
+ * @author Andrea Gazzarini
+ */
+public class OperationInvocationInterfaceTestCase extends BaseWsDmAdapterTestCase
+{
+ private Map<String, ProxyHandler> _invocationHandlers = createInvocationHandlers();
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of a byte type array between requestor
+ * and service provider.
+ *
+ * <br>precondition : a WS-Resource exists and is registered and the requested
+ * operation is available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is thrown
+ * and byte array are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withByteArray() throws Exception
+ {
+ byte [] expectedByteResult = {1,3,4,2,2,44,22,3,3,55,66};
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithByteArray"),
+ new Object[]{expectedByteResult});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+
+ Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
+
+ assertEquals("Output parameters must be 1.",1,out.size());
+ assertArrayEquals(expectedByteResult, out.get(byte[].class.getName()));
+ }
+
+ /**
+ * Test a simple operation invocation on a WS-Resource.
+ * This method tests a simple operation without any input and output parameters.
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested operation
+ * is available on that.
+ * <br>postcondition : invocations are executed successfully an no exception is thrown.
+ */
+ @SuppressWarnings("unchecked")
+ public void testSimpleOperationInvocationOK() throws Exception
+ {
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("voidWithoutArguments"),
+ null);
+
+ assertNotNull(result);
+ }
+
+ /**
+ * Test a the invocation on a WS-Resource with a method that throws an exception..
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested
+ * operation is available on that.
+ * <br>postcondition : an exception is thrown by the requested method.
+ */
+ @SuppressWarnings("unchecked")
+ public void testInvocationException_OK() throws Exception
+ {
+ try
+ {
+ _resourceClient.invoke(
+ _invocationHandlers.get("throwsException"),
+ null);
+ fail("The requested operation has thrown an exception so a Soap Fault is expected...");
+ } catch(SoapFault expected)
+ {
+ }
+ }
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of UUID type between requestor and service provider.
+ *
+ * <br>precondition : a WS-Resource exists and is registered and the requested operation
+ * is available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is thrown
+ * and parameters are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withUUID() throws Exception
+ {
+ UUID expectedUuid = UUID.randomUUID();
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithUUID"),
+ new Object[]{expectedUuid});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+
+ Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
+
+ assertEquals("Output parameters must be 1.",1,out.size());
+ assertEquals(expectedUuid, out.get("uuid"));
+ }
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of Map type between requestor and service provider.
+ * For this test exchanged arrays contain :
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested
+ * operation is available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is
+ * thrown and parameters are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withMap() throws Exception
+ {
+ Map<String,Object> expectedMap = new HashMap<String, Object>();
+ expectedMap.put("p1", new Long(1));
+ expectedMap.put("p2", Boolean.TRUE);
+ expectedMap.put("p3", 1234d);
+ expectedMap.put("p4", 11.2f);
+ expectedMap.put("p5", 1272);
+ expectedMap.put("p6", (short)12);
+ expectedMap.put("p7", "aString");
+ expectedMap.put("p8", "http://qpid.apache.org");
+ expectedMap.put("p9", new Date(12383137128L));
+ expectedMap.put("p10", new byte[]{1,2,2,3,3,4});
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithMap"),
+ new Object[]{expectedMap});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+
+ Map<String,Object> out = (Map<String, Object>) ((Map<String, Object>) getOutputParameters.invoke(result)).get("map");
+
+ assertEquals("Output parameters must be 10.",10,out.size());
+ assertEquals(expectedMap.get("p1"),out.get("p1"));
+ assertEquals(expectedMap.get("p2"),out.get("p2"));
+ assertEquals(expectedMap.get("p3"),out.get("p3"));
+ assertEquals(expectedMap.get("p4"),out.get("p4"));
+ assertEquals(expectedMap.get("p5"),out.get("p5"));
+ assertEquals(expectedMap.get("p6"),out.get("p6"));
+ assertEquals(expectedMap.get("p7"),out.get("p7"));
+ assertEquals(expectedMap.get("p8"),out.get("p8"));
+ assertEquals(expectedMap.get("p9"),out.get("p9"));
+ assertTrue( Arrays.equals((byte[])expectedMap.get("p10"),(byte[])out.get("p10")));
+ }
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of simple types between requestor and
+ * service provider.
+ *
+ * With simple types we mean :
+ *
+ * <ul>
+ * <li>java.lang.Long / long (xsd:long)
+ * <li>java.lang.Integer / int (xsd:int / xsd:integer)
+ * <li>java.lang.Double/ double (xsd:double)
+ * <li>java.lang.Float / float (xsd:float)
+ * <li>java.lang.Short / short (xsd:short)
+ * <li>java.lang.Boolean / boolean (xsd:boolean)
+ * <li>java.lang.String (xsd:string)
+ * <li>java.net.URI (xsd:anyURI)
+ * <li>java.util.Date(xsd:dateTime)
+ * </ul>
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested operation is
+ * available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is thrown and
+ * parameters are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withSimpleTypes() throws Exception
+ {
+ Long expectedLongResult = new Long(1373);
+ Boolean expectedBooleanResult = Boolean.TRUE;
+ Double expectedDoubleResult = new Double(12763.44);
+ Float expectedFloatResult = new Float(2727.233f);
+ Integer expectedIntegerResult = new Integer(28292);
+ Short expectedShortResult = new Short((short)227);
+ String expectedStringResult = "expectedStringResult";
+ URI expectedUriResult = URI.create("http://qpid.apache.org/");
+ Date expectedDateResult = new Date();
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithSimpleTypes"),
+ new Object[]{
+ expectedLongResult,
+ expectedBooleanResult,
+ expectedDoubleResult,
+ expectedFloatResult,
+ expectedIntegerResult,
+ expectedShortResult,
+ expectedStringResult,
+ expectedUriResult,
+ expectedDateResult});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+ Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
+
+ assertEquals("Output parameters must be 9.",9,out.size());
+ assertTrue("Long output parameter not found on result object.",out.containsValue(expectedLongResult));
+ assertTrue("Boolean output parameter not found on result object.",out.containsValue(expectedBooleanResult));
+ assertTrue("Double output parameter not found on result object.",out.containsValue(expectedDoubleResult));
+ assertTrue("Float output parameter not found on result object.",out.containsValue(expectedFloatResult));
+ assertTrue("Integer output parameter not found on result object.",out.containsValue(expectedIntegerResult));
+ assertTrue("Short output parameter not found on result object.",out.containsValue(expectedShortResult));
+ assertTrue("String output parameter not found on result object.",out.containsValue(expectedStringResult));
+ assertTrue("URI output parameter not found on result object.",out.containsValue(expectedUriResult));
+ assertTrue("Date output parameter not found on result object.",out.containsValue(expectedDateResult));
+ }
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of arrays between requestor and service provider.
+ * For this test exchanged arrays contain :
+ *
+ * <ul>
+ * <li>java.lang.Long (xsd:long)
+ * <li>java.lang.Integer (xsd:int / xsd:integer)
+ * <li>java.lang.Double (xsd:double)
+ * <li>java.lang.Float (xsd:float)
+ * <li>java.lang.Short (xsd:short)
+ * <li>java.lang.Boolean (xsd:boolean)
+ * <li>java.lang.String (xsd:string)
+ * <li>java.net.URI (xsd:anyURI)
+ * <li>java.util.Date(xsd:dateTime)
+ * </ul>
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withWrapperArrays() throws Exception
+ {
+ Long [] expectedLongResult = {new Long(2),new Long(1),new Long(3),new Long(4)};
+ Boolean [] expectedBooleanResult = { Boolean.TRUE,Boolean.FALSE,Boolean.FALSE};
+ Double [] expectedDoubleResult = {12763.44d,2832.33d,2292.33d,22293.22d};
+ Float [] expectedFloatResult = {2727.233f,1f,2f,4f,5.4f,33.2f};
+ Integer [] expectedIntegerResult = {1,2,3,4,55,66,77,88,99};
+ Short [] expectedShortResult = {(short)227,(short)23,(short)9};
+ String [] expectedStringResult = {"s1","s2","s333","s4"};
+ URI [] expectedUriResult = {
+ URI.create("http://qpid.apache.org/"),
+ URI.create("http://www.apache.org"),
+ URI.create("http://projects.apache.org")};
+
+ Date [] expectedDateResult = {
+ new Date(),
+ new Date(38211897),
+ new Date(903820382)};
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithArrays"),
+ new Object[]{
+ expectedLongResult,
+ expectedBooleanResult,
+ expectedDoubleResult,
+ expectedFloatResult,
+ expectedIntegerResult,
+ expectedShortResult,
+ expectedStringResult,
+ expectedUriResult,
+ expectedDateResult});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+ Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
+
+ assertEquals("Output parameters must be 9.",9,out.size());
+ assertTrue("Long array doesn't match.",Arrays.equals(expectedLongResult, (Long[])out.get(Long.class.getName())));
+ assertTrue("Boolean array doesn't match.",Arrays.equals(expectedBooleanResult, (Boolean[])out.get(Boolean.class.getName())));
+ assertTrue("Double array doesn't match.",Arrays.equals(expectedDoubleResult, (Double[])out.get(Double.class.getName())));
+ assertTrue("Float array doesn't match.",Arrays.equals(expectedFloatResult, (Float[])out.get(Float.class.getName())));
+ assertTrue("Integer array doesn't match.", Arrays.equals(expectedIntegerResult, (Integer[])out.get(Integer.class.getName())));
+ assertTrue("Short array doesn't match.",Arrays.equals(expectedShortResult, (Short[])out.get(Short.class.getName())));
+ assertTrue("String array doesn't match.",Arrays.equals(expectedStringResult, (String[])out.get(String.class.getName())));
+ assertTrue("URI array doesn't match.",Arrays.equals(expectedUriResult, (URI[])out.get(URI.class.getName())));
+ assertTrue("Date array doesn't match.",Arrays.equals(expectedDateResult, (Date[])out.get(Date.class.getName())));
+ }
+
+ /**
+ * Test operation invocation on WS-Resource.
+ * This method tests the exchange of primitive type arrays between requestor and service provider.
+ * NOte that even the sent array contain primtiive type QMan deals only with objects so in the result
+ * object you will find the corresponding wrapper types.
+ *
+ * For this test exchanged arrays contain :
+ *
+ * <ul>
+ * <li>java.lang.Long / long (xsd:long)
+ * <li>java.lang.Integer / int (xsd:int / xsd:integer)
+ * <li>java.lang.Double/ double (xsd:double)
+ * <li>java.lang.Float / float (xsd:float)
+ * <li>java.lang.Short / short (xsd:short)
+ * <li>java.lang.Boolean / boolean (xsd:boolean)
+ * </ul>
+ *
+ * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
+ * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
+ */
+ @SuppressWarnings("unchecked")
+ public void testOperationInvocationOK_withPrimitiveArrays() throws Exception
+ {
+ long [] expectedLongResult = {1L,2L,3L,4L};
+ boolean [] expectedBooleanResult = { true,false,false};
+ double [] expectedDoubleResult = {12763.44d,2832.33d,2292.33d,22293.22d};
+ float [] expectedFloatResult = {2727.233f,1f,2f,4f,5.4f,33.2f};
+ int [] expectedIntegerResult = {1,2,3,4,55,66,77,88,99};
+ short [] expectedShortResult = {(short)227,(short)23,(short)9};
+
+ Object result = _resourceClient.invoke(
+ _invocationHandlers.get("echoWithSimpleTypeArrays"),
+ new Object[]{
+ expectedLongResult,
+ expectedBooleanResult,
+ expectedDoubleResult,
+ expectedFloatResult,
+ expectedIntegerResult,
+ expectedShortResult});
+
+ Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
+ Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
+
+ assertEquals("Output parameters must be 6.",6,out.size());
+ assertArrayEquals(expectedLongResult, out.get(long.class.getName()));
+ assertArrayEquals(expectedBooleanResult, out.get(boolean.class.getName()));
+ assertArrayEquals(expectedDoubleResult, out.get(double.class.getName()));
+ assertArrayEquals(expectedFloatResult, out.get(float.class.getName()));
+ assertArrayEquals(expectedIntegerResult, out.get(int.class.getName()));
+ assertArrayEquals(expectedShortResult, out.get(short.class.getName()));
+ }
+
+ /**
+ * Internal method used for array comparison using reflection.
+ *
+ * @param expectedArray the expected array.
+ * @param resultArray the array that must match the expected one.
+ */
+ private void assertArrayEquals(Object expectedArray, Object resultArray)
+ {
+ int expectedArrayLength = Array.getLength(expectedArray);
+ int resultArrayLength = Array.getLength(resultArray);
+
+ assertEquals(expectedArrayLength,resultArrayLength);
+
+ for (int index = 0; index < expectedArrayLength; index++)
+ {
+ Object expected = Array.get(expectedArray, index);
+ Object result = Array.get(resultArray, index);
+
+ assertEquals(expected,result);
+ }
+ }
+
+ private Map<String,ProxyHandler> createInvocationHandlers()
+ {
+ Map<String, ProxyHandler> handlers = new HashMap<String, ProxyHandler>();
+
+ ProxyHandler handler = new ReflectionProxyHandler();
+ handler.setAction(Names.NAMESPACE_URI+"/"+"voidWithoutArguments");
+ handler.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "voidWithoutArgumentsRequest",
+ Names.PREFIX));
+ handler.setRequestParameterNames(new QName[]{});
+ handler.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "voidWithoutArgumentsResponse",
+ Names.PREFIX));
+ handler.setReturnType(Result.class);
+
+ ProxyHandler exceptionHandler = new ReflectionProxyHandler();
+ exceptionHandler.setAction(Names.NAMESPACE_URI+"/"+"throwsException");
+ exceptionHandler.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "throwsExceptionRequest",
+ Names.PREFIX));
+
+ exceptionHandler.setRequestParameterNames(new QName[]{});
+ exceptionHandler.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "throwsExceptionResponse",
+ Names.PREFIX));
+
+ exceptionHandler.setReturnType(Result.class);
+
+ ProxyHandler echoWithWrapperTypesHandler = new ReflectionProxyHandler();
+ echoWithWrapperTypesHandler.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypes");
+ echoWithWrapperTypesHandler.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithSimpleTypesRequest",
+ Names.PREFIX));
+
+ echoWithWrapperTypesHandler.setRequestParameterNames(new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
+ });
+
+ echoWithWrapperTypesHandler.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithSimpleTypesResponse",
+ Names.PREFIX));
+
+ echoWithWrapperTypesHandler.setReturnType(Result.class);
+
+ ProxyHandler echoWithArrayOfWrapperTypes = new ReflectionProxyHandler();
+ echoWithArrayOfWrapperTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithArrays");
+ echoWithArrayOfWrapperTypes.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithArraysRequest",
+ Names.PREFIX));
+
+ echoWithArrayOfWrapperTypes.setRequestParameterNames(new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
+ });
+
+ echoWithArrayOfWrapperTypes.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithArraysResponse",
+ Names.PREFIX));
+
+ echoWithArrayOfWrapperTypes.setReturnType(Result.class);
+
+ ProxyHandler echoWithArrayOfPrimitiveTypes = new ReflectionProxyHandler();
+ echoWithArrayOfPrimitiveTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypeArrays");
+ echoWithArrayOfPrimitiveTypes.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithSimpleTypeArraysRequest",
+ Names.PREFIX));
+
+ echoWithArrayOfPrimitiveTypes.setRequestParameterNames(new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
+ new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX)});
+
+ echoWithArrayOfPrimitiveTypes.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithSimpleTypeArraysResponse",
+ Names.PREFIX));
+
+ echoWithArrayOfPrimitiveTypes.setReturnType(Result.class);
+
+ ProxyHandler echoWithByteArray = new EnhancedReflectionProxyHandler();
+ echoWithByteArray.setAction(Names.NAMESPACE_URI+"/"+"echoWithByteArray");
+ echoWithByteArray.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithByteArrayRequest",
+ Names.PREFIX));
+
+ echoWithByteArray.setRequestParameterNames(
+ new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
+
+ echoWithByteArray.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithByteArrayResponse",
+ Names.PREFIX));
+
+ echoWithByteArray.setReturnType(Result.class);
+
+ ProxyHandler echoWithUUID = new EnhancedReflectionProxyHandler();
+ echoWithUUID.setAction(Names.NAMESPACE_URI+"/"+"echoWithUUID");
+ echoWithUUID.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithUUIDRequest",
+ Names.PREFIX));
+
+ echoWithUUID.setRequestParameterNames(
+ new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
+
+ echoWithUUID.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithUUIDResponse",
+ Names.PREFIX));
+
+ echoWithUUID.setReturnType(Result.class);
+
+ ProxyHandler echoWithMap = new EnhancedReflectionProxyHandler();
+ echoWithMap.setAction(Names.NAMESPACE_URI+"/"+"echoWithMap");
+ echoWithMap.setRequestName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithMapRequest",
+ Names.PREFIX));
+
+ echoWithMap.setRequestParameterNames(
+ new QName[]{
+ new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
+
+ echoWithMap.setResponseName(
+ new QName(
+ Names.NAMESPACE_URI,
+ "echoWithMapResponse",
+ Names.PREFIX));
+
+ echoWithMap.setReturnType(Result.class);
+
+ handlers.put("voidWithoutArguments",handler);
+ handlers.put("echoWithSimpleTypes",echoWithWrapperTypesHandler);
+ handlers.put("echoWithArrays",echoWithArrayOfWrapperTypes);
+ handlers.put("echoWithSimpleTypeArrays", echoWithArrayOfPrimitiveTypes);
+ handlers.put("echoWithByteArray", echoWithByteArray);
+ handlers.put("echoWithUUID", echoWithUUID);
+ handlers.put("echoWithMap", echoWithMap);
+ handlers.put("throwsException",exceptionHandler);
+ return handlers;
+ }
+}
\ No newline at end of file diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/SetResourcePropertiesTestCase.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/SetResourcePropertiesTestCase.java new file mode 100644 index 0000000000..87f8905e01 --- /dev/null +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/SetResourcePropertiesTestCase.java @@ -0,0 +1,219 @@ +/*
+ *
+ * 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.
+ *
+ */
+package org.apache.qpid.management.wsdm;
+
+import java.lang.reflect.Array;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import javax.management.MBeanAttributeInfo;
+import javax.xml.namespace.QName;
+
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.resource.WsrfConstants;
+import org.apache.qpid.management.Names;
+
+/**
+ * Test case for Set Resource Properties interfaces.
+ *
+ * @author Andrea Gazzarini
+ */
+public class SetResourcePropertiesTestCase extends BaseWsDmAdapterTestCase
+{
+ /**
+ * Test the WS-RP SetResourceProperty interface of the WS-DM adapter.
+ *
+ * <br>precondition : a WS-Resource exists and is registered.
+ * <br>postcondition : property values are correctly updated on the target WS-Resource..
+ */
+ public void testSetResourcePropertiesOK() throws Exception
+ {
+ Map<String, Object> sampleMap = new HashMap<String, Object>();
+ sampleMap.put("Key1", "BLABALABLABALBAL");
+ sampleMap.put("Key2", 182838484l);
+ sampleMap.put("Key3", -928376362);
+ sampleMap.put("Key4", 23762736276.33D);
+ sampleMap.put("Key4", 2327363.2F);
+
+ Map<String, Object> sampleValues = new HashMap<String, Object>();
+ sampleValues.put(String.class.getName(),"SAMPLE_STRING");
+ sampleValues.put(UUID.class.getName(),UUID.randomUUID());
+ sampleValues.put(Boolean.class.getName(),Boolean.FALSE);
+ sampleValues.put(Map.class.getName(),sampleMap);
+ sampleValues.put(Long.class.getName(),283781273L);
+ sampleValues.put(Integer.class.getName(),12727);
+ sampleValues.put(Short.class.getName(),new Short((short)22));
+ sampleValues.put(Date.class.getName(),new Date());
+
+ MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
+ boolean atLeastThereIsOneWritableProperty = false;
+
+ for (MBeanAttributeInfo attributeMetadata : attributesMetadata)
+ {
+ String name = attributeMetadata.getName();
+
+ if (attributeMetadata.isWritable())
+ {
+ atLeastThereIsOneWritableProperty = true;
+ Object sampleValue = sampleValues.get(attributeMetadata.getType());
+ Object []values = new Object[]{sampleValue};
+
+ Object result = _managementServer.getAttribute(_resourceObjectName, name);
+ if (result == null)
+ {
+ _resourceClient.insertResourceProperty(
+ new QName(
+ Names.NAMESPACE_URI,
+ name,
+ Names.PREFIX),
+ values);
+ } else
+ {
+ _resourceClient.updateResourceProperty(
+ new QName(
+ Names.NAMESPACE_URI,
+ name,
+ Names.PREFIX),
+ values);
+ }
+
+ Object propertyValues = _resourceClient.getPropertyAsObject(
+ new QName(
+ Names.NAMESPACE_URI,
+ name,
+ Names.PREFIX),
+ Class.forName(attributeMetadata.getType()));
+ int length = Array.getLength(propertyValues);
+ if (length != 0)
+ {
+ Object propertyValue = Array.get(propertyValues, 0);
+
+ assertEquals(
+ "Comparison failed for property "+name,
+ sampleValue,
+ propertyValue);
+ } else {
+ assertNull(
+ String.format(
+ "\"%s\" property value shouldn't be null. Its value is %s",
+ name,
+ _managementServer.getAttribute(_resourceObjectName,name)),
+ sampleValue);
+ }
+ }
+ }
+ assertTrue(
+ "It's not possibile to run successfully this test case if " +
+ "the target WS-Resource has no at least one writable property",
+ atLeastThereIsOneWritableProperty);
+ }
+
+ /**
+ * Test the WS-RP SetResourceProperty interface of the WS-DM adapter when the
+ * target property is null.
+ * According to WS-RP specs this operation is not allowed because in this case a SetResourceProperty with an "Insert"
+ * message should be sent in order to initialize the property.
+ *
+ * <br>precondition : a ws resource exists and is registered. The value of the target property is null.
+ * <br>postcondition : a Soap fault is received indicating the failuire.
+ */
+ public void testSetResourcePropertiesKO() throws Exception
+ {
+ Object typePropertyValue = _managementServer.getAttribute(_resourceObjectName, "Type");
+ assertNull(typePropertyValue);
+
+ try
+ {
+ _resourceClient.updateResourceProperty(
+ new QName(
+ Names.NAMESPACE_URI,
+ "Type",
+ Names.PREFIX),
+ new Object[]{"sampleValue"});
+ fail(
+ "If the property is null on the target ws resource, according " +
+ "to WS-RP specs, an update of its value is not possible.");
+ } catch(SoapFault expected)
+ {
+
+ }
+ }
+
+ /**
+ * Tests the SetResourceProperties (update) interface when the request contains
+ * an unknwon target resource.
+ *
+ * <br>precondition : the SetResourceProperties contains an unknwon resource.
+ * <br>postcondition : a SoapFault is thrown and the corresponding detail contains an
+ * UnknownResourceFault element.
+ */
+ public void testUpdateResourcePropertiesKO_WithUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+
+ _resourceClient.updateResourceProperty(
+ new QName(
+ Names.NAMESPACE_URI,
+ "Type",
+ Names.PREFIX),
+ new Object[]{"sampleValue"});
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+
+ /**
+ * Tests the SetResourceProperties (insert) interface when the request contains
+ * an unknwon target resource.
+ *
+ * <br>precondition : the SetResourceProperties contains an unknwon resource.
+ * <br>postcondition : a SoapFault is thrown and the corresponding detail contains an
+ * UnknownResourceFault element.
+ */
+ public void testInsertResourcePropertiesKO_WithUnknownResourceFault() throws Exception
+ {
+ try
+ {
+ _resourceClient.getEndpointReference().removeParameter(Names.RESOURCE_ID_QNAME);
+ _resourceClient.getEndpointReference().addParameter(Names.RESOURCE_ID_QNAME,"lablabalbal");
+
+ _resourceClient.insertResourceProperty(
+ new QName(
+ Names.NAMESPACE_URI,
+ "Type",
+ Names.PREFIX),
+ new Object[]{"sampleValue"});
+ } catch(SoapFault expected)
+ {
+ assertEquals(
+ WsrfConstants.RESOURCE_UNKNOWN_QNAME.getLocalPart(),
+ expected.getDetail().getLocalName());
+ }
+ }
+}
diff --git a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/WsDmAdapterTest.java b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/WsDmAdapterTest.java index 6644b5ae25..07395b3be9 100644 --- a/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/WsDmAdapterTest.java +++ b/qpid/java/management/client/src/test/java/org/apache/qpid/management/wsdm/WsDmAdapterTest.java @@ -21,36 +21,13 @@ package org.apache.qpid.management.wsdm;
import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.lang.reflect.Array;
-import java.lang.reflect.Method;
import java.net.ServerSocket;
-import java.net.URI;
-import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;
-import javax.management.MBeanAttributeInfo;
-import javax.management.MBeanInfo;
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-import javax.xml.namespace.QName;
-
-import junit.extensions.TestSetup;
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.muse.core.proxy.ProxyHandler;
-import org.apache.muse.core.proxy.ReflectionProxyHandler;
import org.apache.muse.core.serializer.SerializerRegistry;
-import org.apache.muse.util.xml.XmlUtils;
-import org.apache.muse.ws.addressing.EndpointReference;
-import org.apache.muse.ws.addressing.soap.SoapFault;
-import org.apache.muse.ws.resource.remote.WsResourceClient;
-import org.apache.muse.ws.resource.sg.remote.ServiceGroupClient;
import org.apache.qpid.management.Names;
import org.apache.qpid.management.Protocol;
import org.apache.qpid.management.wsdm.capabilities.Result;
@@ -61,26 +38,14 @@ import org.apache.qpid.management.wsdm.muse.serializer.ObjectSerializer; import org.apache.qpid.management.wsdm.muse.serializer.UUIDSerializer;
import org.mortbay.component.LifeCycle;
import org.mortbay.component.LifeCycle.Listener;
-import org.w3c.dom.Element;
-/**
- * Test case for WS-Resource lifecycle management.
- *
- * @author Andrea Gazzarini
- */
-public class WsDmAdapterTest extends TestCase {
-
- private MBeanServer _managementServer;
- private ObjectName _resourceObjectName;
-
- private WsResourceClient _resourceClient;
- private MBeanInfo _mbeanInfo;
-
- private Map<String, ProxyHandler> _invocationHandlers = createInvocationHandlers();
- final Long retCodeOk = new Long(0);
+import junit.extensions.TestSetup;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class WsDmAdapterTest
+{
- private static ServerThread _server;
-
/**
* Test case wide set up.
* Provides Server startup & shutdown global procedure.
@@ -102,6 +67,7 @@ public class WsDmAdapterTest extends TestCase { }
};
+ private ServerThread _server;
/**
* Builds a new test setup with for the given test.
@@ -153,927 +119,30 @@ public class WsDmAdapterTest extends TestCase { };
/**
- * Set up fixture for this test case.
- *
- * @throws Exception when the test case intialization fails.
- */
- protected void setUp() throws Exception
- {
- _managementServer = ManagementFactory.getPlatformMBeanServer();
-
- ServiceGroupClient serviceGroup = getServiceGroupClient();
- WsResourceClient [] members = serviceGroup.getMembers();
-
- assertEquals(
- "No resource has been yet created so how is " +
- "it possible that service group children list is not empty?",
- 0,
- members.length);
-
- _managementServer.invoke(
- Names.QPID_EMULATOR_OBJECT_NAME,
- "createQueue", new Object[]{_resourceObjectName = createResourceName()},
- new String[]{ObjectName.class.getName()});
-
- members = serviceGroup.getMembers();
- assertEquals(
- "One resource has just been created so " +
- "I expect to find it on service group children list...",
- 1,
- members.length);
-
- _resourceClient = members[0];
- _mbeanInfo = _managementServer.getMBeanInfo(_resourceObjectName);
- }
-
- /**
- * Shutdown procedure for this test case.
- *
- * @throws Exception when either the server or some resource fails to shutdown.
- */
- @Override
- protected void tearDown() throws Exception
- {
- ServiceGroupClient serviceGroup = getServiceGroupClient();
- WsResourceClient [] members = serviceGroup.getMembers();
-
- _managementServer.invoke(
- Names.QPID_EMULATOR_OBJECT_NAME,
- "unregister",
- new Object[]{_resourceObjectName},
- new String[]{ObjectName.class.getName()});
-
- members = serviceGroup.getMembers();
-
- assertEquals(
- "No resource has been yet created so how is it possible that service group children list is not empty?",
- 0,
- members.length);
- }
-
- /**
- * Test the WS-RP GetResourceProperty interface of the WS-DM adapter.
- *
- * <br>precondition : a ws resource exists and is registered.
- * <br>postcondition : property values coming from WS-DM resource are the same of the JMX interface.
- */
- public void testGetResourcePropertiesOK() throws Exception
- {
- MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
- for (MBeanAttributeInfo attributeMetadata : attributesMetadata)
- {
- String name = attributeMetadata.getName();
- Object propertyValues = _resourceClient.getPropertyAsObject(
- new QName(
- Names.NAMESPACE_URI,
- name,
- Names.PREFIX),
- Class.forName(attributeMetadata.getType()));
-
- int length = Array.getLength(propertyValues);
- if (length != 0)
- {
- Object propertyValue = Array.get(propertyValues, 0);
-
- assertEquals(
- "Comparison failed for property "+name,
- _managementServer.getAttribute(_resourceObjectName,name),
- propertyValue);
- } else {
- assertNull(
- String.format(
- "\"%s\" property value shouldn't be null. Its value is %s",
- name,
- _managementServer.getAttribute(_resourceObjectName,name)),
- _managementServer.getAttribute(_resourceObjectName,name));
- }
- }
- }
-
- /**
- * Test the WS-RP SetResourceProperty interface of the WS-DM adapter.
+ * Gets the test suite composition.
*
- * <br>precondition : a WS-Resource exists and is registered.
- * <br>postcondition : property values are correctly updated on the target WS-Resource..
+ * @return the test suite composition.
*/
- public void testSetResourcePropertiesOK() throws Exception
+ public static Test suite()
{
- Map<String, Object> sampleMap = new HashMap<String, Object>();
- sampleMap.put("Key1", "BLABALABLABALBAL");
- sampleMap.put("Key2", 182838484l);
- sampleMap.put("Key3", -928376362);
- sampleMap.put("Key4", 23762736276.33D);
- sampleMap.put("Key4", 2327363.2F);
-
- Map<String, Object> sampleValues = new HashMap<String, Object>();
- sampleValues.put(String.class.getName(),"SAMPLE_STRING");
- sampleValues.put(UUID.class.getName(),UUID.randomUUID());
- sampleValues.put(Boolean.class.getName(),Boolean.FALSE);
- sampleValues.put(Map.class.getName(),sampleMap);
- sampleValues.put(Long.class.getName(),283781273L);
- sampleValues.put(Integer.class.getName(),12727);
- sampleValues.put(Short.class.getName(),new Short((short)22));
- sampleValues.put(Date.class.getName(),new Date());
-
- MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
- boolean atLeastThereIsOneWritableProperty = false;
-
- for (MBeanAttributeInfo attributeMetadata : attributesMetadata)
- {
- String name = attributeMetadata.getName();
-
- if (attributeMetadata.isWritable())
- {
- atLeastThereIsOneWritableProperty = true;
- Object sampleValue = sampleValues.get(attributeMetadata.getType());
- Object []values = new Object[]{sampleValue};
-
- Object result = _managementServer.getAttribute(_resourceObjectName, name);
- if (result == null)
- {
- _resourceClient.insertResourceProperty(
- new QName(
- Names.NAMESPACE_URI,
- name,
- Names.PREFIX),
- values);
- } else
- {
- _resourceClient.updateResourceProperty(
- new QName(
- Names.NAMESPACE_URI,
- name,
- Names.PREFIX),
- values);
- }
-
- Object propertyValues = _resourceClient.getPropertyAsObject(
- new QName(
- Names.NAMESPACE_URI,
- name,
- Names.PREFIX),
- Class.forName(attributeMetadata.getType()));
- int length = Array.getLength(propertyValues);
- if (length != 0)
- {
- Object propertyValue = Array.get(propertyValues, 0);
-
- assertEquals(
- "Comparison failed for property "+name,
- sampleValue,
- propertyValue);
- } else {
- assertNull(
- String.format(
- "\"%s\" property value shouldn't be null. Its value is %s",
- name,
- _managementServer.getAttribute(_resourceObjectName,name)),
- sampleValue);
- }
- }
- }
- assertTrue(
- "It's not possibile to run successfully this test case if " +
- "the target WS-Resource has no at least one writable property",
- atLeastThereIsOneWritableProperty);
- }
-
- /**
- * Test the WS-RP SetResourceProperty interface of the WS-DM adapter when the
- * target property is null.
- * According to WS-RP specs this operation is not allowed because in this case a SetResourceProperty with an "Insert"
- * message should be sent in order to initialize the property.
- *
- * <br>precondition : a ws resource exists and is registered. The value of the target property is null.
- * <br>postcondition : a Soap fault is received indicating the failuire.
- */
- public void testSetResourcePropertiesKO() throws Exception
- {
- Object typePropertyValue = _managementServer.getAttribute(_resourceObjectName, "Type");
- assertNull(typePropertyValue);
-
- try
- {
- _resourceClient.updateResourceProperty(
- new QName(
- Names.NAMESPACE_URI,
- "Type",
- Names.PREFIX),
- new Object[]{"sampleValue"});
- fail(
- "If the property is null on the target ws resource, according " +
- "to WS-RP specs, an update of its value is not possible.");
- } catch(SoapFault expected)
- {
-
- }
- }
-
- /**
- * Tests the WS-RP PutResourcePropertyDocument interface of the WS-DM adapter.
- *
- * <br>precondition : a ws resource exists and is registered.
- * <br>postcondition : A read / write property is correctly set according to WSRP interface.
- */
- public void testGetAndPutResourcePropertyDocumentOK() throws Exception
- {
- String expectedMgmtPubIntervalValue = "4321";
- String propertyName = "MgmtPubInterval";
-
- Element propertiesDocument = _resourceClient.getResourcePropertyDocument();
- Element [] properties = XmlUtils.getAllElements(propertiesDocument);
-
- for (Element element : properties)
- {
- if (propertyName.equals(element.getLocalName())) {
- element.setTextContent(expectedMgmtPubIntervalValue);
- } else {
- propertiesDocument.removeChild(element);
- }
- }
-
- _resourceClient.putResourcePropertyDocument(propertiesDocument);
-
- Element newProperties = _resourceClient.getResourcePropertyDocument();
-
- Element mgmtPubInterval = XmlUtils.getElement(
- newProperties, new QName(
- Names.NAMESPACE_URI,
- propertyName,
- Names.PREFIX));
-
- assertEquals(expectedMgmtPubIntervalValue,mgmtPubInterval.getTextContent());
- }
-
- /**
- * Tests the WS-RP PutResourcePropertyDocument interface of the WS-DM adapter.
- * Specifically it tries to update the value of a read-only property.
- *
- * <br>precondition : a ws resource exists, it is registered and has at least one read-only property.
- * <br>postcondition : An exception is thrown indicating the failure.
- */
- public void testGetAndPutResourcePropertyDocumentKO_WithReadOnlyProperty() throws Exception
- {
- String propertyName = "Name";
-
- Element propertiesDocument = _resourceClient.getResourcePropertyDocument();
- Element [] properties = XmlUtils.getAllElements(propertiesDocument);
-
- for (Element element : properties)
- {
- if (propertyName.equals(element.getLocalName())) {
- element.setTextContent("ThisIsTheNewValueOfNameProperty");
- } else {
- propertiesDocument.removeChild(element);
- }
- }
-
- try
- {
- _resourceClient.putResourcePropertyDocument(propertiesDocument);
- fail("It's not possible to update the value of a read-only property.");
- } catch (SoapFault expected)
- {
-
- }
- }
-
- /**
- * Test the WS-RP GetResourceProperties interface of the WS-DM adapter.
- *
- * <br>precondition : a ws resource exists and is registered.
- * <br>postcondition : Properties are correctly returned according to WSRP interface and they (their value)
- * are matching with corresponding MBean properties.
- */
- public void testGetMultipleResourcePropertiesOK() throws Exception
- {
- MBeanAttributeInfo [] attributesMetadata = _mbeanInfo.getAttributes();
- QName[] names = new QName[attributesMetadata.length];
-
- int index = 0;
- for (MBeanAttributeInfo attributeMetadata : _mbeanInfo.getAttributes())
- {
- QName qname = new QName(Names.NAMESPACE_URI,attributeMetadata.getName(),Names.PREFIX);
- names[index++] = qname;
- }
-
- Element[] properties =_resourceClient.getMultipleResourceProperties(names);
- for (Element element : properties)
- {
- String name = element.getLocalName();
- Object value = _managementServer.getAttribute(_resourceObjectName, name);
- if ("Name".equals(name))
- {
- assertEquals(
- value,
- element.getTextContent());
- } else if ("Durable".equals(name))
- {
- assertEquals(
- value,
- Boolean.valueOf(element.getTextContent()));
- } else if ("ExpireTime".equals(name))
- {
- assertEquals(
- value,
- new Date(Long.valueOf(element.getTextContent())));
- } else if ("MsgTotalEnqueues".equals(name))
- {
- assertEquals(
- value,
- Long.valueOf(element.getTextContent()));
- } else if ("ConsumerCount".equals(name))
- {
- assertEquals(
- value,
- Integer.valueOf(element.getTextContent()));
- }else if ("VhostRef".equals(name))
- {
- assertEquals(
- value,
- UUID.fromString(element.getTextContent()));
- }
- }
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of simple types between requestor and service provider.
- * With simple types we mean :
- *
- * <ul>
- * <li>java.lang.Long / long (xsd:long)
- * <li>java.lang.Integer / int (xsd:int / xsd:integer)
- * <li>java.lang.Double/ double (xsd:double)
- * <li>java.lang.Float / float (xsd:float)
- * <li>java.lang.Short / short (xsd:short)
- * <li>java.lang.Boolean / boolean (xsd:boolean)
- * <li>java.lang.String (xsd:string)
- * <li>java.net.URI (xsd:anyURI)
- * <li>java.util.Date(xsd:dateTime)
- * </ul>
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withSimpleTypes() throws Exception
- {
- Long expectedLongResult = new Long(1373);
- Boolean expectedBooleanResult = Boolean.TRUE;
- Double expectedDoubleResult = new Double(12763.44);
- Float expectedFloatResult = new Float(2727.233f);
- Integer expectedIntegerResult = new Integer(28292);
- Short expectedShortResult = new Short((short)227);
- String expectedStringResult = "expectedStringResult";
- URI expectedUriResult = URI.create("http://qpid.apache.org/");
- Date expectedDateResult = new Date();
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithSimpleTypes"),
- new Object[]{
- expectedLongResult,
- expectedBooleanResult,
- expectedDoubleResult,
- expectedFloatResult,
- expectedIntegerResult,
- expectedShortResult,
- expectedStringResult,
- expectedUriResult,
- expectedDateResult});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
-
- assertEquals("Output parameters must be 9.",9,out.size());
- assertTrue("Long output parameter not found on result object.",out.containsValue(expectedLongResult));
- assertTrue("Boolean output parameter not found on result object.",out.containsValue(expectedBooleanResult));
- assertTrue("Double output parameter not found on result object.",out.containsValue(expectedDoubleResult));
- assertTrue("Float output parameter not found on result object.",out.containsValue(expectedFloatResult));
- assertTrue("Integer output parameter not found on result object.",out.containsValue(expectedIntegerResult));
- assertTrue("Short output parameter not found on result object.",out.containsValue(expectedShortResult));
- assertTrue("String output parameter not found on result object.",out.containsValue(expectedStringResult));
- assertTrue("URI output parameter not found on result object.",out.containsValue(expectedUriResult));
- assertTrue("Date output parameter not found on result object.",out.containsValue(expectedDateResult));
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of arrays between requestor and service provider.
- * For this test exchanged arrays contain :
- *
- * <ul>
- * <li>java.lang.Long (xsd:long)
- * <li>java.lang.Integer (xsd:int / xsd:integer)
- * <li>java.lang.Double (xsd:double)
- * <li>java.lang.Float (xsd:float)
- * <li>java.lang.Short (xsd:short)
- * <li>java.lang.Boolean (xsd:boolean)
- * <li>java.lang.String (xsd:string)
- * <li>java.net.URI (xsd:anyURI)
- * <li>java.util.Date(xsd:dateTime)
- * </ul>
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withWrapperArrays() throws Exception
- {
- Long [] expectedLongResult = {new Long(2),new Long(1),new Long(3),new Long(4)};
- Boolean [] expectedBooleanResult = { Boolean.TRUE,Boolean.FALSE,Boolean.FALSE};
- Double [] expectedDoubleResult = {12763.44d,2832.33d,2292.33d,22293.22d};
- Float [] expectedFloatResult = {2727.233f,1f,2f,4f,5.4f,33.2f};
- Integer [] expectedIntegerResult = {1,2,3,4,55,66,77,88,99};
- Short [] expectedShortResult = {(short)227,(short)23,(short)9};
- String [] expectedStringResult = {"s1","s2","s333","s4"};
- URI [] expectedUriResult = {
- URI.create("http://qpid.apache.org/"),
- URI.create("http://www.apache.org"),
- URI.create("http://projects.apache.org")};
-
- Date [] expectedDateResult = {
- new Date(),
- new Date(38211897),
- new Date(903820382)};
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithArrays"),
- new Object[]{
- expectedLongResult,
- expectedBooleanResult,
- expectedDoubleResult,
- expectedFloatResult,
- expectedIntegerResult,
- expectedShortResult,
- expectedStringResult,
- expectedUriResult,
- expectedDateResult});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
-
- assertEquals("Output parameters must be 9.",9,out.size());
- assertTrue("Long array doesn't match.",Arrays.equals(expectedLongResult, (Long[])out.get(Long.class.getName())));
- assertTrue("Boolean array doesn't match.",Arrays.equals(expectedBooleanResult, (Boolean[])out.get(Boolean.class.getName())));
- assertTrue("Double array doesn't match.",Arrays.equals(expectedDoubleResult, (Double[])out.get(Double.class.getName())));
- assertTrue("Float array doesn't match.",Arrays.equals(expectedFloatResult, (Float[])out.get(Float.class.getName())));
- assertTrue("Integer array doesn't match.", Arrays.equals(expectedIntegerResult, (Integer[])out.get(Integer.class.getName())));
- assertTrue("Short array doesn't match.",Arrays.equals(expectedShortResult, (Short[])out.get(Short.class.getName())));
- assertTrue("String array doesn't match.",Arrays.equals(expectedStringResult, (String[])out.get(String.class.getName())));
- assertTrue("URI array doesn't match.",Arrays.equals(expectedUriResult, (URI[])out.get(URI.class.getName())));
- assertTrue("Date array doesn't match.",Arrays.equals(expectedDateResult, (Date[])out.get(Date.class.getName())));
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of primitive type arrays between requestor and service provider.
- * NOte that even the sent array contain primtiive type QMan deals only with objects so in the result
- * object you will find the corresponding wrapper types.
- *
- * For this test exchanged arrays contain :
- *
- * <ul>
- * <li>java.lang.Long / long (xsd:long)
- * <li>java.lang.Integer / int (xsd:int / xsd:integer)
- * <li>java.lang.Double/ double (xsd:double)
- * <li>java.lang.Float / float (xsd:float)
- * <li>java.lang.Short / short (xsd:short)
- * <li>java.lang.Boolean / boolean (xsd:boolean)
- * </ul>
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withPrimitiveArrays() throws Exception
- {
- long [] expectedLongResult = {1L,2L,3L,4L};
- boolean [] expectedBooleanResult = { true,false,false};
- double [] expectedDoubleResult = {12763.44d,2832.33d,2292.33d,22293.22d};
- float [] expectedFloatResult = {2727.233f,1f,2f,4f,5.4f,33.2f};
- int [] expectedIntegerResult = {1,2,3,4,55,66,77,88,99};
- short [] expectedShortResult = {(short)227,(short)23,(short)9};
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithSimpleTypeArrays"),
- new Object[]{
- expectedLongResult,
- expectedBooleanResult,
- expectedDoubleResult,
- expectedFloatResult,
- expectedIntegerResult,
- expectedShortResult});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
-
- assertEquals("Output parameters must be 6.",6,out.size());
- assertArrayEquals(expectedLongResult, out.get(long.class.getName()));
- assertArrayEquals(expectedBooleanResult, out.get(boolean.class.getName()));
- assertArrayEquals(expectedDoubleResult, out.get(double.class.getName()));
- assertArrayEquals(expectedFloatResult, out.get(float.class.getName()));
- assertArrayEquals(expectedIntegerResult, out.get(int.class.getName()));
- assertArrayEquals(expectedShortResult, out.get(short.class.getName()));
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of a byte type array between requestor and service provider.
- *
- * <br>precondition : a WS-Resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and byte array are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withByteArray() throws Exception
- {
- byte [] expectedByteResult = {1,3,4,2,2,44,22,3,3,55,66};
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithByteArray"),
- new Object[]{expectedByteResult});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
-
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
-
- assertEquals("Output parameters must be 1.",1,out.size());
- assertArrayEquals(expectedByteResult, out.get(byte[].class.getName()));
- }
-
- /**
- * Test a simple operation invocation on a WS-Resource.
- * This method tests a simple operation without any input and output parameters.
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully an no exception is thrown.
- */
- @SuppressWarnings("unchecked")
- public void testSimpleOperationInvocationOK() throws Exception
- {
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("voidWithoutArguments"),
- null);
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- assertEquals(
- "Something was wrong...expected return code is "+retCodeOk,
- retCodeOk,
- getStatusCode.invoke(result));
- }
-
- /**
- * Test a the invocation on a WS-Resource with a method that throws an exception..
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : an exception is thrown by the requested method.
- */
- @SuppressWarnings("unchecked")
- public void testInvocationException_OK() throws Exception
- {
- try
- {
- _resourceClient.invoke(
- _invocationHandlers.get("throwsException"),
- null);
- fail("The requested operation has thrown an exception so a Soap Fault is expected...");
- } catch(SoapFault expected)
- {
- }
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of UUID type between requestor and service provider.
- *
- * <br>precondition : a WS-Resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withUUID() throws Exception
- {
- UUID expectedUuid = UUID.randomUUID();
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithUUID"),
- new Object[]{expectedUuid});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
-
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) getOutputParameters.invoke(result);
-
- assertEquals("Output parameters must be 1.",1,out.size());
- assertEquals(expectedUuid, out.get("uuid"));
- }
-
- /**
- * Test operation invocation on WS-Resource.
- * This method tests the exchange of Map type between requestor and service provider.
- * For this test exchanged arrays contain :
- *
- * <br>precondition : a ws resource exists and is registered and the requested operation is available on that.
- * <br>postcondition : invocations are executed successfully, no exception is thrown and parameters are correctly returned.
- */
- @SuppressWarnings("unchecked")
- public void testOperationInvocationOK_withMap() throws Exception
- {
- Map<String,Object> expectedMap = new HashMap<String, Object>();
- expectedMap.put("p1", new Long(1));
- expectedMap.put("p2", Boolean.TRUE);
- expectedMap.put("p3", 1234d);
- expectedMap.put("p4", 11.2f);
- expectedMap.put("p5", 1272);
- expectedMap.put("p6", (short)12);
- expectedMap.put("p7", "aString");
- expectedMap.put("p8", "http://qpid.apache.org");
- expectedMap.put("p9", new Date(12383137128L));
- expectedMap.put("p10", new byte[]{1,2,2,3,3,4});
-
- Object result = _resourceClient.invoke(
- _invocationHandlers.get("echoWithMap"),
- new Object[]{expectedMap});
-
- Method getStatusCode = result.getClass().getMethod("getStatusCode");
- Method getOutputParameters = result.getClass().getMethod("getOutputParameters");
-
- assertEquals(retCodeOk,getStatusCode.invoke(result));
- Map<String,Object> out = (Map<String, Object>) ((Map<String, Object>) getOutputParameters.invoke(result)).get("map");
-
- assertEquals("Output parameters must be 10.",10,out.size());
- assertEquals(expectedMap.get("p1"),out.get("p1"));
- assertEquals(expectedMap.get("p2"),out.get("p2"));
- assertEquals(expectedMap.get("p3"),out.get("p3"));
- assertEquals(expectedMap.get("p4"),out.get("p4"));
- assertEquals(expectedMap.get("p5"),out.get("p5"));
- assertEquals(expectedMap.get("p6"),out.get("p6"));
- assertEquals(expectedMap.get("p7"),out.get("p7"));
- assertEquals(expectedMap.get("p8"),out.get("p8"));
- assertEquals(expectedMap.get("p9"),out.get("p9"));
- assertTrue( Arrays.equals((byte[])expectedMap.get("p10"),(byte[])out.get("p10")));
- }
-
- /**
- * Main entry point for running this test case.
- *
- * @return the decorated test case.
- */
- public static Test suite() {
- TestSuite suite = new TestSuite("Test Suite for WS-DM Adapter");
- suite.addTestSuite(WsDmAdapterTest.class);
+ TestSuite suite = new TestSuite("Test suite for QMan WS-DM.");
+ suite.addTestSuite(MetadataExchangeInterfaceTestCase.class);
+ suite.addTestSuite(OperationInvocationInterfaceTestCase.class);
+ suite.addTestSuite(GetResourcePropertyDocumentTestCase.class);
+ suite.addTestSuite(SetResourcePropertiesTestCase.class);
+ suite.addTestSuite(GetMultipleResourcePropertiesTestCase.class);
+ suite.addTestSuite(GetResourcePropertiesTestCase.class);
return new WsDmAdapterTestSetup(suite);
}
/**
- * Creates a service group client reference.
- *
- * @return a service group client reference.
- */
- private ServiceGroupClient getServiceGroupClient()
- {
- URI address = URI.create(
- Protocol.DEFAULT_ENDPOINT_URI.replaceFirst("8080",System.getProperty(Names.ADAPTER_PORT_PROPERTY_NAME)));
- return new ServiceGroupClient(new EndpointReference(address));
- }
-
- /**
- * In order to test the behaviour of the WS-DM adapter, at
- * least one resource must be created. This is the method that
- * returns the name (ObjectName on JMX side, Resource-ID on WSDM side)
- * of that resource
- *
- * @return the name of the MBean instance that will be created.
- * @throws Exception when the name if malformed. Practically never.
- */
- private ObjectName createResourceName() throws Exception
- {
- return new ObjectName(
- "Q-MAN:objectId="+UUID.randomUUID()+
- ", brokerID="+UUID.randomUUID()+
- ",class=queue"+
- ",package=org.apache.qpid"+
- ",name="+System.currentTimeMillis());
- }
-
- private Map<String,ProxyHandler> createInvocationHandlers()
- {
- Map<String, ProxyHandler> handlers = new HashMap<String, ProxyHandler>();
-
- ProxyHandler handler = new ReflectionProxyHandler();
- handler.setAction(Names.NAMESPACE_URI+"/"+"voidWithoutArguments");
- handler.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "voidWithoutArgumentsRequest",
- Names.PREFIX));
- handler.setRequestParameterNames(new QName[]{});
- handler.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "voidWithoutArgumentsResponse",
- Names.PREFIX));
- handler.setReturnType(Result.class);
-
- ProxyHandler exceptionHandler = new ReflectionProxyHandler();
- exceptionHandler.setAction(Names.NAMESPACE_URI+"/"+"throwsException");
- exceptionHandler.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "throwsExceptionRequest",
- Names.PREFIX));
-
- exceptionHandler.setRequestParameterNames(new QName[]{});
- exceptionHandler.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "throwsExceptionResponse",
- Names.PREFIX));
-
- exceptionHandler.setReturnType(Result.class);
-
- ProxyHandler echoWithWrapperTypesHandler = new ReflectionProxyHandler();
- echoWithWrapperTypesHandler.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypes");
- echoWithWrapperTypesHandler.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithSimpleTypesRequest",
- Names.PREFIX));
-
- echoWithWrapperTypesHandler.setRequestParameterNames(new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
- });
-
- echoWithWrapperTypesHandler.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithSimpleTypesResponse",
- Names.PREFIX));
-
- echoWithWrapperTypesHandler.setReturnType(Result.class);
-
- ProxyHandler echoWithArrayOfWrapperTypes = new ReflectionProxyHandler();
- echoWithArrayOfWrapperTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithArrays");
- echoWithArrayOfWrapperTypes.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithArraysRequest",
- Names.PREFIX));
-
- echoWithArrayOfWrapperTypes.setRequestParameterNames(new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p7",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p8",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p9",Names.PREFIX),
- });
-
- echoWithArrayOfWrapperTypes.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithArraysResponse",
- Names.PREFIX));
-
- echoWithArrayOfWrapperTypes.setReturnType(Result.class);
-
- ProxyHandler echoWithArrayOfPrimitiveTypes = new ReflectionProxyHandler();
- echoWithArrayOfPrimitiveTypes.setAction(Names.NAMESPACE_URI+"/"+"echoWithSimpleTypeArrays");
- echoWithArrayOfPrimitiveTypes.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithSimpleTypeArraysRequest",
- Names.PREFIX));
-
- echoWithArrayOfPrimitiveTypes.setRequestParameterNames(new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p2",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p3",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p4",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p5",Names.PREFIX),
- new QName(Names.NAMESPACE_URI,"p6",Names.PREFIX)});
-
- echoWithArrayOfPrimitiveTypes.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithSimpleTypeArraysResponse",
- Names.PREFIX));
-
- echoWithArrayOfPrimitiveTypes.setReturnType(Result.class);
-
- ProxyHandler echoWithByteArray = new EnhancedReflectionProxyHandler();
- echoWithByteArray.setAction(Names.NAMESPACE_URI+"/"+"echoWithByteArray");
- echoWithByteArray.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithByteArrayRequest",
- Names.PREFIX));
-
- echoWithByteArray.setRequestParameterNames(
- new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
-
- echoWithByteArray.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithByteArrayResponse",
- Names.PREFIX));
-
- echoWithByteArray.setReturnType(Result.class);
-
- ProxyHandler echoWithUUID = new EnhancedReflectionProxyHandler();
- echoWithUUID.setAction(Names.NAMESPACE_URI+"/"+"echoWithUUID");
- echoWithUUID.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithUUIDRequest",
- Names.PREFIX));
-
- echoWithUUID.setRequestParameterNames(
- new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
-
- echoWithUUID.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithUUIDResponse",
- Names.PREFIX));
-
- echoWithUUID.setReturnType(Result.class);
-
- ProxyHandler echoWithMap = new EnhancedReflectionProxyHandler();
- echoWithMap.setAction(Names.NAMESPACE_URI+"/"+"echoWithMap");
- echoWithMap.setRequestName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithMapRequest",
- Names.PREFIX));
-
- echoWithMap.setRequestParameterNames(
- new QName[]{
- new QName(Names.NAMESPACE_URI,"p1",Names.PREFIX)});
-
- echoWithMap.setResponseName(
- new QName(
- Names.NAMESPACE_URI,
- "echoWithMapResponse",
- Names.PREFIX));
-
- echoWithMap.setReturnType(Result.class);
-
- handlers.put("voidWithoutArguments",handler);
- handlers.put("echoWithSimpleTypes",echoWithWrapperTypesHandler);
- handlers.put("echoWithArrays",echoWithArrayOfWrapperTypes);
- handlers.put("echoWithSimpleTypeArrays", echoWithArrayOfPrimitiveTypes);
- handlers.put("echoWithByteArray", echoWithByteArray);
- handlers.put("echoWithUUID", echoWithUUID);
- handlers.put("echoWithMap", echoWithMap);
- handlers.put("throwsException",exceptionHandler);
- return handlers;
- }
-
- /**
- * Internal method used for array comparison using reflection.
+ * Finds a free port that will be used to run the embedded
+ * web server.
*
- * @param expectedArray the expected array.
- * @param resultArray the array that must match the expected one.
+ * @return a free port that will be used to run the
+ * embedded web server.
*/
- private void assertArrayEquals(Object expectedArray, Object resultArray)
- {
- int expectedArrayLength = Array.getLength(expectedArray);
- int resultArrayLength = Array.getLength(resultArray);
-
- assertEquals(expectedArrayLength,resultArrayLength);
-
- for (int index = 0; index < expectedArrayLength; index++)
- {
- Object expected = Array.get(expectedArray, index);
- Object result = Array.get(resultArray, index);
-
- assertEquals(expected,result);
- }
- }
-
- public static int getFreePort() throws IOException {
+ private static int getFreePort() throws IOException {
ServerSocket server = null;
try
{
diff --git a/qpid/java/management/eclipse-plugin/META-INF/MANIFEST.MF b/qpid/java/management/eclipse-plugin/META-INF/MANIFEST.MF index 32d1b7a1b2..9b5a240bb6 100644 --- a/qpid/java/management/eclipse-plugin/META-INF/MANIFEST.MF +++ b/qpid/java/management/eclipse-plugin/META-INF/MANIFEST.MF @@ -10,8 +10,8 @@ Bundle-Localization: plugin Require-Bundle: org.eclipse.ui, org.eclipse.core.runtime, org.eclipse.ui.forms, - jmxremote.sasl;resolution:=optional, - qpid-management-common + qpid-management-common, + org.apache.commons.codec;bundle-version="1.3.0" Eclipse-LazyStart: true Export-Package: org.apache.qpid.management.ui, org.apache.qpid.management.ui.actions, diff --git a/qpid/java/management/eclipse-plugin/build-release-linux-gtk-x86_64.properties b/qpid/java/management/eclipse-plugin/build-release-linux-gtk-x86_64.properties new file mode 100644 index 0000000000..f1c35c82e8 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/build-release-linux-gtk-x86_64.properties @@ -0,0 +1,36 @@ +# +# +# 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. +# +# + +release.name=${module.namever}-linux-gtk-x86_64 + +release.subdir=${module.release.base}/${release.name} + +release.tar.gz=${module.release.base}/${release.name}.tar.gz + +qpidmc.ini=src/main/resources/linux-gtk-x86_64/qpidmc.ini + +qpidmc.executable=src/main/resources/linux-gtk-x86_64/qpidmc + +qpidmc.companion.library=src/main/resources/linux-gtk-x86_64/libcairo-swt.so + +rcp.libs=${management-eclipse-plugin-linux-gtk-x86_64.libs} + +rcp.configuration.dir=src/main/resources/linux-gtk-x86_64/Configuration diff --git a/qpid/java/management/eclipse-plugin/build-release-solaris-gtk-sparc.properties b/qpid/java/management/eclipse-plugin/build-release-solaris-gtk-sparc.properties new file mode 100644 index 0000000000..7d5b613e06 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/build-release-solaris-gtk-sparc.properties @@ -0,0 +1,39 @@ +# +# +# 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. +# +# + +release.name=${module.namever}-solaris-gtk-sparc + +release.subdir=${module.release.base}/${release.name} + +release.tar.gz=${module.release.base}/${release.name}.tar.gz + +qpidmc.ini=src/main/resources/solaris-gtk-sparc/qpidmc.ini + +qpidmc.solaris.xpm.files=src/main/resources/solaris-gtk-sparc/Qpidmc.l.pm \ + src/main/resources/solaris-gtk-sparc/Qpidmc.m.pm \ + src/main/resources/solaris-gtk-sparc/Qpidmc.s.pm \ + src/main/resources/solaris-gtk-sparc/Qpidmc.t.pm + +qpidmc.executable=src/main/resources/solaris-gtk-sparc/qpidmc + +rcp.libs=${management-eclipse-plugin-solaris-gtk-sparc.libs} + +rcp.configuration.dir=src/main/resources/solaris-gtk-sparc/Configuration diff --git a/qpid/java/management/eclipse-plugin/build-release.xml b/qpid/java/management/eclipse-plugin/build-release.xml index b396974c9a..3cb1af194f 100644 --- a/qpid/java/management/eclipse-plugin/build-release.xml +++ b/qpid/java/management/eclipse-plugin/build-release.xml @@ -44,6 +44,9 @@ For linux libcairo-swt.so file: qpidmc.companion.library + + For solaris .xpm files: + qpidmc.solaris.xpm.files --> </condition> @@ -86,15 +89,22 @@ <fileset file="${qpidmc.companion.library}"/> </copy> </target> + + <target name="release-bin-executable-solaris-xpm-files" if="qpidmc.solaris.xpm.files"> + <!-- Copy the solaris xpm files --> + <copy todir="${release.subdir}" flatten="true" failonerror="true"> + <fileset dir="${basedir}" includes="${qpidmc.solaris.xpm.files}"/> + </copy> + </target> <target name="release-bin-rcp-deps" description="copy eclipse-rcp dependencies into module release" - depends="release-bin-executable-companion-library"> + depends="release-bin-executable-companion-library, release-bin-executable-solaris-xpm-files"> <!-- Copy the rcp executable file --> <copy todir="${release.subdir}" flatten="true" failonerror="true"> <fileset file="${qpidmc.executable}"/> </copy> - <chmod dir="${release.subdir}" perm="u+rx" includes="**/*"/> + <chmod dir="${release.subdir}" perm="u+rx" includes="qpidmc*"/> <!-- Copy remaining startup & license files --> <copy todir="${release.subdir}" flatten="true" failonerror="true"> diff --git a/qpid/java/management/eclipse-plugin/build.xml b/qpid/java/management/eclipse-plugin/build.xml index 4dd279f721..8513c6487d 100644 --- a/qpid/java/management/eclipse-plugin/build.xml +++ b/qpid/java/management/eclipse-plugin/build.xml @@ -70,6 +70,19 @@ <property file="build-release-linux-gtk-x86.properties"/> <property file="build-release-common.properties"/> </ant> + + <!-- linux gtk x86_64 --> + <ant antfile="build-release.xml"> + <property file="build-release-linux-gtk-x86_64.properties"/> + <property file="build-release-common.properties"/> + </ant> + + <!-- solaris gtk sparc --> + <ant antfile="build-release.xml"> + <property file="build-release-solaris-gtk-sparc.properties"/> + <property file="build-release-common.properties"/> + </ant> + <!-- mac os x --> <ant antfile="build-release-macosx.xml"> <property file="build-release-macosx.properties"/> diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java index 5e05375e28..5a6b3f8856 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java @@ -28,12 +28,13 @@ package org.apache.qpid.management.ui; public class Constants { public final static String APPLICATION_NAME = "Qpid Management Console"; + public static final String DEFAULT_DOMAIN = "org.apache.qpid"; public final static String ACTION_REMOVE_MBEANNODE = "Remove from list"; public final static String VALUE = "value"; public final static String TYPE = "type"; + public final static String VERSION = "version"; public final static String NODE_TYPE_SERVER = "server"; - public final static String NODE_TYPE_DOMAIN = "domain"; public final static String NODE_TYPE_MBEANTYPE = "mbeantype"; // currently used only for virtual host instances, but will work as general also public final static String NODE_TYPE_TYPEINSTANCE = "mbeantype_instance"; @@ -80,8 +81,6 @@ public class Constants public final static String[] EXCHANGE_TYPE_VALUES = {"direct", "fanout", "headers", "topic"}; public final static String[] BOOLEAN_TYPE_VALUES = {"false", "true"}; public final static String[] ATTRIBUTE_TABLE_TITLES = {"Attribute Name", "Value"}; - public static final String[] CONNECTION_PROTOCOLS ={"RMI"}; - public static final String DEFAULT_PROTOCOL = CONNECTION_PROTOCOLS[0]; public final static String ACTION_ADDSERVER = "New Connection"; public final static String ACTION_RECONNECT = "Reconnect"; diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java index 31825e925d..ae01f30f32 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedBean.java @@ -20,13 +20,17 @@ */ package org.apache.qpid.management.ui; -import static org.apache.qpid.management.ui.Constants.*; +import static org.apache.qpid.management.ui.Constants.ADMIN_MBEAN_TYPE; +import static org.apache.qpid.management.ui.Constants.CONNECTION; +import static org.apache.qpid.management.ui.Constants.DEFAULT_VH; +import static org.apache.qpid.management.ui.Constants.EXCHANGE; +import static org.apache.qpid.management.ui.Constants.QUEUE; +import static org.apache.qpid.management.ui.Constants.VIRTUAL_HOST; + import java.util.HashMap; /** * Class representing a managed bean on the managed server - * @author Bhupendra Bhardwaj - * */ public abstract class ManagedBean extends ManagedObject { @@ -36,27 +40,50 @@ public abstract class ManagedBean extends ManagedObject private String _virtualHostName = null; private ManagedServer _server = null; private HashMap _properties = null; - + private int _version; + public String getProperty(String key) { - return (String)_properties.get(key); + return (String) _properties.get(key); } - + public HashMap getProperties() { return _properties; } + public void setProperties(HashMap properties) { this._properties = properties; setName(getProperty("name")); setType(getProperty("type")); + setVersion(getProperty("version")); _virtualHostName = getProperty(VIRTUAL_HOST); } + + public void setVersion(String version) + { + try + { + _version = Integer.parseInt(version); + } + catch (NumberFormatException nfe) + { + _version = 1; + } + + } + + public int getVersion() + { + return _version; + } + public String getDomain() { return _domain; } + public void setDomain(String domain) { this._domain = domain; @@ -66,65 +93,75 @@ public abstract class ManagedBean extends ManagedObject { return _server; } + public void setServer(ManagedServer server) { this._server = server; } + public String getType() { return _type; } + public void setType(String type) { this._type = type; } + public String getUniqueName() { return _uniqueName; } + public void setUniqueName(String uniqueName) { this._uniqueName = uniqueName; } - + public String getVirtualHostName() { // To make it work with the broker with no virtual host implementation return _virtualHostName == null ? DEFAULT_VH : _virtualHostName; } - + /** * Returns mbean instance name. MBeans which have only one instance, the type attribute will be returned + * * @return */ public String getInstanceName() { if (getName() != null) + { return getName(); + } else + { return getType(); + } } - + public boolean isQueue() { return _type.endsWith(QUEUE); } - + public boolean isConnection() { return _type.endsWith(CONNECTION); } - + public boolean isExchange() { return _type.endsWith(EXCHANGE); } - + public boolean isTempQueue() { return (isQueue() && getName().startsWith("tmp_")); } - + public boolean isAdmin() { return _type.endsWith(ADMIN_MBEAN_TYPE); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java index 480fdb429a..9ca8787bb5 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/ManagedServer.java @@ -20,20 +20,16 @@ */ package org.apache.qpid.management.ui; -import static org.apache.qpid.management.ui.Constants.DEFAULT_PROTOCOL; /** * Class representing a server being managed eg. MBeanServer - * @author Bhupendra Bhardwaj */ public class ManagedServer extends ManagedObject { private String _host; private int _port; - private String _url; private String _domain; private String _user; private String _password; - private String _protocol = DEFAULT_PROTOCOL; public ManagedServer(String host, int port, String domain) { @@ -46,7 +42,6 @@ public class ManagedServer extends ManagedObject _host = host; _port = port; _domain = domain; - _url = getRMIURL(host, port); _user = user; _password = password; } @@ -65,17 +60,7 @@ public class ManagedServer extends ManagedObject { return _port; } - - public String getUrl() - { - return _url; - } - public String getProtocol() - { - return _protocol; - } - public String getPassword() { return _password; @@ -96,8 +81,4 @@ public class ManagedServer extends ManagedObject _user = user; } - private String getRMIURL(String host, int port) - { - return "service:jmx:rmi:///jndi/rmi://" + host + ":" + port + "/jmxrmi"; - } } diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java index ce7d8816ba..e487c02a67 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/AddServer.java @@ -35,7 +35,6 @@ import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; -import org.eclipse.swt.widgets.Combo; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; @@ -46,12 +45,9 @@ import org.eclipse.ui.IWorkbenchWindowActionDelegate; public class AddServer extends AbstractAction implements IWorkbenchWindowActionDelegate { - private static final String[] _domains ={"org.apache.qpid"}; - - private String _transport = DEFAULT_PROTOCOL; private String _host; private String _port; - private String _domain; + private String _domain = DEFAULT_DOMAIN; private String _user; private String _password; @@ -73,7 +69,7 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD { if (_addServer) { - getNavigationView().addNewServer(_transport, _host, Integer.parseInt(_port), _domain, _user, _password); + getNavigationView().addNewServer(_host, Integer.parseInt(_port), _domain, _user, _password); } } catch(InfoRequiredException ex) @@ -91,7 +87,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD _addServer = false; _host = null; _port = null; - _domain = null; _user = null; _password = null; } @@ -103,6 +98,8 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD */ private void createAddServerPopup() { + final Shell appShell = _window.getShell(); + Display display = Display.getCurrent(); final Shell shell = new Shell(display, SWT.BORDER | SWT.CLOSE); shell.setText(ACTION_ADDSERVER); @@ -112,21 +109,23 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD createWidgets(shell); shell.pack(); - //get current size dialog, and screen size - int displayWidth = display.getBounds().width; - int displayHeight = display.getBounds().height; + //get current size dialog, and application window size and location + int appWidth = appShell.getBounds().width; + int appHeight = appShell.getBounds().height; + int appLocX = appShell.getBounds().x; + int appLocY = appShell.getBounds().y; int currentShellWidth = shell.getSize().x; int currentShellHeight = shell.getSize().y; //default sizes for the dialog int minShellWidth = 425; - int minShellHeight= 290; + int minShellHeight= 265; //ensure this is large enough, increase it if its not int newShellWidth = currentShellWidth > minShellWidth ? currentShellWidth : minShellWidth; int newShellHeight = currentShellHeight > minShellHeight ? currentShellHeight : minShellHeight; - //set the final size and centre the dialog - shell.setBounds((displayWidth - newShellWidth)/2 , (displayHeight - newShellHeight)/2, newShellWidth, newShellHeight); + //set the final size and centre the dialog within the app window + shell.setBounds((appWidth - newShellWidth)/2 + appLocX, (appHeight - newShellHeight)/2 + appLocY, newShellWidth, newShellHeight); shell.open(); _window.getShell().setEnabled(false); @@ -189,17 +188,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD // Verify if the value entered is numeric textPort.addVerifyListener(new NumberVerifyListener()); - - Label domain = new Label(composite, SWT.NONE); - domain.setText("Domain"); - domain.setLayoutData(new GridData(SWT.TRAIL, SWT.TOP, false, false)); - - final Combo comboDomain = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY); - comboDomain.setItems(_domains); - comboDomain.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); - comboDomain.select(0); - - Label user = new Label(composite, SWT.NONE); user.setText(USERNAME); user.setLayoutData(new GridData(SWT.TRAIL, SWT.TOP, false, false)); @@ -228,7 +216,7 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD if (event.character == SWT.ESC) { //Escape key acts as cancel on all widgets - shell.close(); + shell.dispose(); } } }); @@ -283,7 +271,6 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD return; } - _domain = comboDomain.getText(); _addServer = true; shell.dispose(); } @@ -314,7 +301,7 @@ public class AddServer extends AbstractAction implements IWorkbenchWindowActionD if (event.character == SWT.ESC) { //Escape key acts as cancel on all widgets - shell.close(); + shell.dispose(); } } }); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java index ce9d80d49b..5eb9d9a168 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/actions/ReconnectServer.java @@ -99,6 +99,8 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA // Create the login popup fot th user to enter usernaem and password private void createLoginPopup() { + final Shell appShell = _window.getShell(); + Display display = Display.getCurrent(); final Shell shell = new Shell(display, SWT.BORDER | SWT.CLOSE); shell.setText(_title); @@ -108,9 +110,11 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA createWidgets(shell); shell.pack(); - //get current size dialog, and screen size - int displayWidth = display.getBounds().width; - int displayHeight = display.getBounds().height; + //get current size dialog, and application window size and location + int appWidth = appShell.getBounds().width; + int appHeight = appShell.getBounds().height; + int appLocX = appShell.getBounds().x; + int appLocY = appShell.getBounds().y; int currentShellWidth = shell.getSize().x; int currentShellHeight = shell.getSize().y; @@ -121,8 +125,8 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA int newShellWidth = currentShellWidth > minShellWidth ? currentShellWidth : minShellWidth; int newShellHeight = currentShellHeight > minShellHeight ? currentShellHeight : minShellHeight; - //set the final size and centre the dialog - shell.setBounds((displayWidth - newShellWidth)/2 , (displayHeight - newShellHeight)/2, newShellWidth, newShellHeight); + //set the final size and centre the dialog within the app window + shell.setBounds((appWidth - newShellWidth)/2 + appLocX, (appHeight - newShellHeight)/2 + appLocY, newShellWidth, newShellHeight); shell.open(); _window.getShell().setEnabled(false); @@ -182,7 +186,7 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA if (event.character == SWT.ESC) { //Escape key acts as cancel on all widgets - shell.close(); + shell.dispose(); } } }); @@ -248,7 +252,7 @@ public class ReconnectServer extends AbstractAction implements IWorkbenchWindowA if (event.character == SWT.ESC) { //Escape key acts as cancel on all widgets - shell.close(); + shell.dispose(); } } }); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientListener.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientListener.java index 2be0ddbebf..c3348b32f0 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientListener.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientListener.java @@ -45,7 +45,6 @@ public class ClientListener implements NotificationListener { ObjectName objName = null; String type = notification.getType(); - MBeanUtility.printOutput(type + ":" + objName); if (MBeanServerNotification.REGISTRATION_NOTIFICATION.equals(type)) { @@ -60,6 +59,7 @@ public class ClientListener implements NotificationListener else if (JMXConnectionNotification.FAILED.equals(type)) { ApplicationRegistry.serverConnectionClosed(server); + MBeanUtility.printOutput("Recieved notification from " + server.getName() + ": " + type ); } } diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientNotificationListener.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientNotificationListener.java index c6ecda4b4c..2af8e681ae 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientNotificationListener.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/ClientNotificationListener.java @@ -35,7 +35,6 @@ public class ClientNotificationListener extends ClientListener public void handleNotification(Notification notification, Object handback) { ObjectName objName = (ObjectName)notification.getSource(); - //String type = notification.getType(); getServerRegistry().addNotification(objName, notification); } } diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java index 945c63f19a..cf3db26f4b 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java @@ -164,7 +164,6 @@ public class JMXServerRegistry extends ServerRegistry public void removeManagedObject(ManagedBean mbean) { - MBeanUtility.printOutput("Removing MBean:" + mbean.getUniqueName()); if (mbean.isQueue()) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java index 29d7b9c557..479f68de03 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java @@ -440,18 +440,6 @@ public class MBeanUtility return mbeans; } - /** - * Returns all the domains for the given server. This method can be removed as now this RCP is specific to - * Qpid and domain is also fixed - */ - public static List<String> getAllDomains(ManagedServer server) throws Exception - { - JMXServerRegistry serverRegistry = (JMXServerRegistry)ApplicationRegistry.getServerRegistry(server); - MBeanServerConnection mbsc = serverRegistry.getServerConnection(); - String[] domains = mbsc.getDomains(); - return Arrays.asList(domains); - } - public static void printOutput(String statement) { if (ApplicationRegistry.debug) diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java index 5476c27871..3c8e52f1d2 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/MBeanView.java @@ -30,6 +30,7 @@ import org.apache.qpid.management.ui.ServerRegistry; import org.apache.qpid.management.ui.exceptions.InfoRequiredException; import org.apache.qpid.management.ui.jmx.MBeanUtility; import org.apache.qpid.management.ui.model.AttributeData; +import org.apache.qpid.management.ui.model.NotificationInfoModel; import org.apache.qpid.management.ui.model.OperationData; import org.apache.qpid.management.ui.model.OperationDataModel; import org.eclipse.jface.viewers.ISelection; @@ -135,8 +136,7 @@ public class MBeanView extends ViewPart { try { - if (_selectedNode == null || NODE_TYPE_SERVER.equals(_selectedNode.getType()) || - NODE_TYPE_DOMAIN.equals(_selectedNode.getType()) ) + if (_selectedNode == null || NODE_TYPE_SERVER.equals(_selectedNode.getType())) { return; } @@ -176,8 +176,7 @@ public class MBeanView extends ViewPart */ private void setServer() { - if (NODE_TYPE_SERVER.equals(_selectedNode.getType()) || - NODE_TYPE_DOMAIN.equals(_selectedNode.getType()) ) + if (NODE_TYPE_SERVER.equals(_selectedNode.getType())) { _server = (ManagedServer)_selectedNode.getManagedObject(); _virtualHostName = null; @@ -359,6 +358,13 @@ public class MBeanView extends ViewPart private void createNotificationsTab(TabFolder tabFolder) { + NotificationInfoModel[] items = MBeanUtility.getNotificationInfo(_mbean); + if (items == null || items.length == 0) + { + //the mbean has no notifications to subscribe for, do not create the tab. + return; + } + NotificationsTabControl controller = new NotificationsTabControl(tabFolder); TabItem tab = new TabItem(tabFolder, SWT.NONE); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java index ec8a612d41..fedb1c4bd0 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/NavigationView.java @@ -130,16 +130,26 @@ public class NavigationView extends ViewPart { public void treeExpanded(TreeExpansionEvent event) { - _treeViewer.setExpandedState(event.getElement(), true); - // Following will cause the selection event to be sent, so commented - // _treeViewer.setSelection(new StructuredSelection(event.getElement())); - _treeViewer.refresh(); + getSite().getShell().getDisplay().asyncExec( + new Runnable() + { + public void run() + { + _treeViewer.refresh(); + } + }); } public void treeCollapsed(TreeExpansionEvent event) { - _treeViewer.setExpandedState(event.getElement(), false); - _treeViewer.refresh(); + getSite().getShell().getDisplay().asyncExec( + new Runnable() + { + public void run() + { + _treeViewer.refresh(); + } + }); } }); @@ -201,11 +211,11 @@ public class NavigationView extends ViewPart } /** - * Creates Qpid Server connection using JMX RMI protocol + * Creates Qpid Server connection * @param server * @throws Exception */ - private void createRMIServerConnection(ManagedServer server) throws Exception + private void createJMXServerConnection(ManagedServer server) throws Exception { // Currently Qpid Management Console only supports JMX MBeanServer ServerRegistry serverRegistry = new JMXServerRegistry(server); @@ -220,42 +230,32 @@ public class NavigationView extends ViewPart * @param domain * @throws Exception */ - public void addNewServer(String transportProtocol, String host, int port, String domain, String user, String pwd) + public void addNewServer(String host, int port, String domain, String user, String pwd) throws Exception { - String serverAddress = host + ":" + port; - String url = null; ManagedServer managedServer = new ManagedServer(host, port, domain, user, pwd); - if ("RMI".equals(transportProtocol)) + String server = managedServer.getName(); + List<TreeObject> list = _serversRootNode.getChildren(); + for (TreeObject node : list) { - url = managedServer.getUrl(); - List<TreeObject> list = _serversRootNode.getChildren(); - for (TreeObject node : list) + ManagedServer nodeServer = (ManagedServer)node.getManagedObject(); + if (server.equals(nodeServer.getName())) { - ManagedServer nodeServer = (ManagedServer)node.getManagedObject(); - if (url.equals(nodeServer.getUrl())) - { - // Server is already in the list of added servers, so now connect it. - // Set the server node as selected and then connect it. - _treeViewer.setSelection(new StructuredSelection(node)); - reconnect(user, pwd); + // Server is already in the list of added servers, so now connect it. + // Set the server node as selected and then connect it. + _treeViewer.setSelection(new StructuredSelection(node)); + reconnect(user, pwd); - return; - } + return; } - - // The server is not in the list of already added servers, so now connect and add it. - managedServer.setName(serverAddress); - createRMIServerConnection(managedServer); - } - else - { - throw new InfoRequiredException(transportProtocol + " transport is not supported"); } + // The server is not in the list of already added servers, so now connect and add it. + createJMXServerConnection(managedServer); + // Server connection is successful. Now add the server in the tree - TreeObject serverNode = new TreeObject(serverAddress, NODE_TYPE_SERVER); + TreeObject serverNode = new TreeObject(server, NODE_TYPE_SERVER); serverNode.setManagedObject(managedServer); _serversRootNode.addChild(serverNode); @@ -276,10 +276,12 @@ public class NavigationView extends ViewPart // Add the Queue/Exchanges/Connections from config file into the navigation tree addConfiguredItems(managedServer); + expandInitialMBeanView(serverNode); + _treeViewer.refresh(); // save server address in file - addServerInConfigFile(serverAddress); + addServerInConfigFile(server); } /** @@ -405,50 +407,33 @@ public class NavigationView extends ViewPart } } - /** - * Queries the qpid server for MBeans and populates the navigation view with all MBeans for - * the given server node. - * @param serverNode - */ - private void populateServer(TreeObject serverNode) throws Exception + //check if the MBeanInfo can be retrieved. + private boolean haveAccessPermission(ManagedBean mbean) { - ManagedServer server = (ManagedServer) serverNode.getManagedObject(); - String domain = server.getDomain(); - if (!domain.equals(ALL)) - { - TreeObject domainNode = new TreeObject(domain, NODE_TYPE_DOMAIN); - domainNode.setParent(serverNode); - - populateDomain(domainNode); + try + { + MBeanUtility.getMBeanInfo(mbean); } - else + catch(Exception ex) { - List<TreeObject> domainList = new ArrayList<TreeObject>(); - List<String> domains = MBeanUtility.getAllDomains(server); - - for (String domainName : domains) - { - TreeObject domainNode = new TreeObject(domainName, NODE_TYPE_DOMAIN); - domainNode.setParent(serverNode); - - domainList.add(domainNode); - populateDomain(domainNode); - } + return false; } + + return true; } - + /** - * Queries the Qpid Server and populates the given domain node with all MBeans undser that domain. - * @param domain - * @throws IOException + * Queries the qpid server for MBeans and populates the navigation view with all MBeans for + * the given server node. + * @param serverNode * @throws Exception */ - private void populateDomain(TreeObject domain) throws IOException, Exception + private void populateServer(TreeObject serverNode) throws Exception { - ManagedServer server = (ManagedServer) domain.getParent().getManagedObject(); + ManagedServer server = (ManagedServer) serverNode.getManagedObject(); + String domain = server.getDomain(); - // Now populate the mbenas under those types - List<ManagedBean> mbeans = MBeanUtility.getManagedObjectsForDomain(server, domain.getName()); + List<ManagedBean> mbeans = MBeanUtility.getManagedObjectsForDomain(server, domain); for (ManagedBean mbean : mbeans) { mbean.setServer(server); @@ -459,13 +444,17 @@ public class NavigationView extends ViewPart // manually by selecting from MBeanView if (!(mbean.isConnection() || mbean.isExchange() || mbean.isQueue())) { - addManagedBean(domain, mbean); + //if we cant get the MBeanInfo then we cant display the mbean, so dont add it to the tree + if (haveAccessPermission(mbean)) + { + addManagedBean(serverNode, mbean); + } } } // To make it work with the broker without virtual host implementation. // This will add the default nodes to the domain node boolean hasVirtualHost = false; - for (TreeObject child : domain.getChildren()) + for (TreeObject child : serverNode.getChildren()) { if (child.getName().startsWith(VIRTUAL_HOST)) { @@ -475,7 +464,7 @@ public class NavigationView extends ViewPart } if (!hasVirtualHost){ - addDefaultNodes(domain); + addDefaultNodes(serverNode); } } @@ -540,15 +529,14 @@ public class NavigationView extends ViewPart } /** - * Adds the given MBean to the given domain node. Creates Notification node for the MBean. + * Adds the given MBean to the given domain node. * sample ObjectNames - * org.apache.qpid:type=VirtualHost.VirtualHostManager,VirtualHost=localhost * org.apache.qpid:type=VirtualHost.Queue,VirtualHost=test,name=ping_1 - * @param domain - * @param mbean - * @throws Exception + * @param parent parent tree node to add the mbean to + * @param mbean mbean to add */ - private void addManagedBean(TreeObject domain, ManagedBean mbean) // throws Exception + private void addManagedBean(TreeObject parent, ManagedBean mbean) { String name = mbean.getName(); // Split the mbean type into array of Strings, to create hierarchy @@ -558,7 +546,7 @@ public class NavigationView extends ViewPart // test->Queue->ping String[] types = mbean.getType().split("\\."); TreeObject typeNode = null; - TreeObject parentNode = domain; + TreeObject parentNode = parent; // Run this loop till all nodes(hierarchy) for this mbean are created. This loop only creates // all the required parent nodes for the mbean @@ -638,11 +626,6 @@ public class NavigationView extends ViewPart { addItemInConfigFile(mbeanNode); } - - // Add notification node - // TODO: show this only if the mbean sends any notification - //TreeObject notificationNode = new TreeObject(NOTIFICATION, NOTIFICATION); - //notificationNode.setParent(mbeanNode); } private TreeObject createTypeNode(TreeObject parent, String name) @@ -755,7 +738,7 @@ public class NavigationView extends ViewPart managedServer.setUser(user); managedServer.setPassword(password); - createRMIServerConnection(managedServer); + createJMXServerConnection(managedServer); // put the server in the managed server map _managedServerMap.put(managedServer, selectedNode); @@ -775,8 +758,31 @@ public class NavigationView extends ViewPart // Add the Queue/Exchanges/Connections from config file into the navigation tree addConfiguredItems(managedServer); + expandInitialMBeanView(selectedNode); + _treeViewer.refresh(); } + + private void expandInitialMBeanView(TreeObject serverNode) + { + if (serverNode.getChildren().size() == 0 ) + { + return; + } + else + { + _treeViewer.setExpandedState(serverNode , true); + } + + List<TreeObject> children = serverNode.getChildren(); + for (TreeObject child : children) + { + if (child.getChildren().size() > 0) + { + _treeViewer.setExpandedState(child, true); + } + } + } /** * Adds the items(queues/exchanges/connectins) from config file to the server tree @@ -1157,25 +1163,12 @@ public class NavigationView extends ViewPart /** * Adds the mbean to the navigation tree - * @param mbean - * @throws Exception + * @param mbean mbean to add to the tree */ - public void addManagedBean(ManagedBean mbean) // throws Exception + public void addManagedBean(ManagedBean mbean) { TreeObject treeServerObject = _managedServerMap.get(mbean.getServer()); - List<TreeObject> domains = treeServerObject.getChildren(); - TreeObject domain = null; - for (TreeObject child : domains) - { - if (child.getName().equals(mbean.getDomain())) - { - domain = child; - - break; - } - } - - addManagedBean(domain, mbean); + addManagedBean(treeServerObject, mbean); _treeViewer.refresh(); } @@ -1200,20 +1193,8 @@ public class NavigationView extends ViewPart for (ManagedBean mbean : removalList) { TreeObject treeServerObject = _managedServerMap.get(mbean.getServer()); - List<TreeObject> domains = treeServerObject.getChildren(); - TreeObject domain = null; - for (TreeObject child : domains) - { - if (child.getName().equals(mbean.getDomain())) - { - domain = child; - - break; - } - } - removeManagedObject(domain, mbean); - // serverRegistry.removeManagedObject(mbean); + removeManagedObject(treeServerObject, mbean); } _treeViewer.refresh(); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java index 36ad1b4fdc..11df1b6f00 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/OperationTabControl.java @@ -33,8 +33,6 @@ import static org.apache.qpid.management.ui.Constants.*; import org.apache.qpid.management.ui.ApplicationRegistry; import org.apache.qpid.management.ui.ManagedBean; -import org.apache.qpid.management.ui.ServerRegistry; -import org.apache.qpid.management.ui.jmx.JMXServerRegistry; import org.apache.qpid.management.ui.jmx.MBeanUtility; import org.apache.qpid.management.ui.model.OperationData; import org.apache.qpid.management.ui.model.ParameterData; @@ -69,8 +67,6 @@ import org.eclipse.ui.forms.widgets.FormToolkit; /** * Control class for the MBean operations tab. It creates the required widgets * for the selected MBean. - * @author Bhupendra Bhardwaj - * @author Robert Gemmell */ public class OperationTabControl extends TabControl { @@ -521,7 +517,7 @@ public class OperationTabControl extends TabControl private void populateResults(Object result) { Display display = Display.getCurrent(); - int width = 600; + int width = 610; int height = 400; Shell shell = ViewUtility.createPopupShell(RESULT, width, height); shell.setImage(ApplicationRegistry.getImage(CONSOLE_IMAGE)); @@ -605,23 +601,37 @@ public class OperationTabControl extends TabControl return; } - // customized for passwords - if (PASSWORD.equalsIgnoreCase(param.getName())) + //Custom handling for the PASSWORD field + if (param.getName().equalsIgnoreCase(PASSWORD)) { + //Convert the String value to a character array if that is what is required. if (param.getType().equals("[C")) { - try + // Retreive the mBean type and version. + // If we have a version 1 UserManagement class mbean then it expects the password + // to be sent as the hashed version. + if (_mbean.getType().equals("UserManagement") && _mbean.getVersion() == 1) { - param.setValue(ViewUtility.getHash((String)param.getValue())); + try + { + param.setValue(ViewUtility.getHash((String) param.getValue())); + } + catch (Exception hashException) + { + ViewUtility.popupErrorMessage(_form.getText(), + "Unable to calculate hash for Password:" + + hashException.getMessage()); + return; + } } - catch (Exception ex) + else { - MBeanUtility.handleException(_mbean, ex); - return; + param.setValue(((String) param.getValue()).toCharArray()); } } } // end of customization + } } @@ -725,7 +735,14 @@ public class OperationTabControl extends TabControl { boolean success = Boolean.parseBoolean(result.toString()); String message = success ? OPERATION_SUCCESSFUL : OPERATION_UNSUCCESSFUL; - ViewUtility.popupInfoMessage(title, message); + if(success) + { + ViewUtility.popupInfoMessage(title, message); + } + else + { + ViewUtility.popupErrorMessage(title, message); + } } else if (_opData.getParameters() != null && !_opData.getParameters().isEmpty()) { diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/QueueTypeTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/QueueTypeTabControl.java index 9fcf32abdd..6e37e96695 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/QueueTypeTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/QueueTypeTabControl.java @@ -271,12 +271,50 @@ public class QueueTypeTabControl extends MBeanTypeTabControl for (AttributeData data : list) { ManagedBean mbean = _queueDepthMap.get(data); - String value = data.getValue().toString(); - items[i++] = mbean.getName() + " (" + value + " KB)"; + items[i++] = mbean.getName() + " (" + getQueueDepthString(mbean, data) + ")"; } getListWidget().setItems(items); } + private String getQueueDepthString(ManagedBean mbean, AttributeData data) + { + if (mbean.getVersion() == 1) //mbean returns KB + { + Long value = (Long)data.getValue(); + + Double mb = 1024.0; + + if(value > mb) //MB + { + return String.format("%.3f", (Double)(value / mb)) + " MB"; + } + else //KB + { + return data.getValue().toString() + " KB"; + } + } + else //mbean returns Bytes + { + Long value = (Long)data.getValue(); + + double mb = 1024.0 * 1024.0; + double kb = 1024.0; + + if(value >= mb) //MB + { + return String.format("%.3f", (Double)(value / mb)) + " MB"; + } + else if (value >= kb) //KB + { + return String.format("%.3f", (Double)(value / kb)) + " KB"; + } + else //Bytes + { + return data.getValue().toString() + " Bytes"; + } + } + } + private void sortQueuesByConsumerCount() { java.util.List<AttributeData> list = new ArrayList<AttributeData>(_queueConsumerCountMap.keySet()); diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java index 5d6a03b238..16bae07e48 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/ViewUtility.java @@ -39,14 +39,15 @@ import javax.management.openmbean.OpenType; import javax.management.openmbean.TabularDataSupport; import javax.management.openmbean.TabularType; -import org.apache.qpid.management.ui.ApplicationWorkbenchAdvisor; -import org.eclipse.core.runtime.IStatus; -import org.eclipse.core.runtime.Status; -import org.eclipse.jface.dialogs.ErrorDialog; +import org.apache.commons.codec.binary.Hex; + import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ControlAdapter; +import org.eclipse.swt.events.ControlEvent; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.Font; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -56,12 +57,12 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.ScrollBar; import org.eclipse.swt.widgets.Text; import org.eclipse.ui.forms.widgets.FormToolkit; /** * Utility Class for displaying OpenMbean data types by creating required SWT widgets - * @author Bhupendra Bhardwaj */ public class ViewUtility { @@ -89,6 +90,10 @@ public class ViewUtility SUPPORTED_ARRAY_DATATYPES.add("java.util.Date"); } + private static final int DEFAULT_CONTENT_SIZE = 198; + static Button _firstButton, _nextButton, _previousButton, _lastButton; + static Text _hexNumTextToEnd, _hexNumTextToStart; + /** * Populates the composite with given openmbean data type (TabularType or CompositeType) * @param toolkit @@ -190,15 +195,15 @@ public class ViewUtility layoutData.widthHint = 80; firstRecordButton.setLayoutData(layoutData); - final Button nextRecordButton = toolkit.createButton(dataHolder, NEXT, SWT.PUSH); + final Button previousRecordButton = toolkit.createButton(dataHolder, PREV, SWT.PUSH); layoutData = new GridData (GridData.HORIZONTAL_ALIGN_END); layoutData.widthHint = 80; - nextRecordButton.setLayoutData(layoutData); + previousRecordButton.setLayoutData(layoutData); - final Button previousRecordButton = toolkit.createButton(dataHolder, PREV, SWT.PUSH); + final Button nextRecordButton = toolkit.createButton(dataHolder, NEXT, SWT.PUSH); layoutData = new GridData (GridData.HORIZONTAL_ALIGN_BEGINNING); layoutData.widthHint = 80; - previousRecordButton.setLayoutData(layoutData); + nextRecordButton.setLayoutData(layoutData); final Button lastRecordButton = toolkit.createButton(dataHolder, LAST, SWT.PUSH); layoutData = new GridData (GridData.HORIZONTAL_ALIGN_BEGINNING); @@ -352,7 +357,7 @@ public class ViewUtility } else { - setNotSupportedDataType(toolkit, compositeHolder); + handleBinaryMessageContent(toolkit, compositeHolder, data, itemName, encoding); } } // If array of any other supported type, show as a list of String array @@ -436,6 +441,321 @@ public class ViewUtility return messageBox.open(); } + /** + * Creates widgets for object messages and populates the content in hexadecimal format. + * @param toolkit + * @param compositeHolder + * @param data + * @param itemName + * @param encoding + */ + private static void handleBinaryMessageContent(FormToolkit toolkit, Composite compositeHolder, CompositeData data, String itemName, String encoding) + { + final String thisEncoding = encoding; + final Byte[] arrayItems = (Byte[]) data.get(itemName); + final byte[] byteArray = new byte[arrayItems.length]; + + for (int i = 0; i < arrayItems.length; i++) + { + byteArray[i] = arrayItems[i]; + } + + try + { + //create a new composite to contain the widgets required to display object messages. + final Composite localComposite = toolkit.createComposite(compositeHolder, SWT.NONE); + localComposite.setData("currentBytePos", 0); + localComposite.setData("startingBytePos", 0); + GridLayout layout = new GridLayout(2, true); + layout.marginWidth = 0; + layout.marginHeight = 0; + localComposite.setLayout(layout); + localComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1)); + + int startContentSize = DEFAULT_CONTENT_SIZE; + + if (byteArray.length < DEFAULT_CONTENT_SIZE) + { + startContentSize = byteArray.length; + } + + //create a text to display the hexadecimal views of object messages, it takes more space than ascii view as + //a hex uses 2 chars and 1 space, while ascii only uses 1 char and 1 space. + final Text hexText = toolkit.createText(localComposite, + new String(displayByteFormat(localComposite, byteArray, startContentSize * 2, thisEncoding, "<<", true)), + SWT.READ_ONLY | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); + GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); + gridData.widthHint = 144; //set to 222 if not using any fonts + gridData.heightHint = 200; + hexText.setLayoutData(gridData); + + final Text asciiText = toolkit.createText(localComposite, + new String(displayByteFormat(localComposite, byteArray, startContentSize * 2, thisEncoding, "<<", false)), + SWT.READ_ONLY | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL | SWT.BORDER); + + + gridData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); + gridData.widthHint = 52;//set to 98 if not using any fonts + gridData.heightHint = 200; + asciiText.setLayoutData(gridData); + + //use a monospaced font for a better layout + Font font = new Font(compositeHolder.getDisplay(), "Courier", 10, SWT.NORMAL); + hexText.setFont(font); + asciiText.setFont(font); + + final ScrollBar hexScrollBar = hexText.getVerticalBar(); + final ScrollBar asciiScrollBar = asciiText.getVerticalBar(); + + //create a sub composite to contain all the buttons + final Composite buttonComposite = toolkit.createComposite(localComposite, SWT.NONE); + layout = new GridLayout(7, false); + layout.marginWidth = 0; + buttonComposite.setLayout(layout); + buttonComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1)); + + _firstButton = toolkit.createButton(buttonComposite, "<<", SWT.PUSH); + GridData layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _firstButton.setLayoutData(layoutData); + _firstButton.setToolTipText("See the first n bytes"); + + _previousButton = toolkit.createButton(buttonComposite, "<", SWT.PUSH); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _previousButton.setLayoutData(layoutData); + _previousButton.setToolTipText("See the previous n bytes"); + _previousButton.setEnabled(false); + + _hexNumTextToStart = toolkit.createText(buttonComposite, "0"); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _hexNumTextToStart.setLayoutData(layoutData); + _hexNumTextToStart.setEditable(false); + + final Text hexNumText = toolkit.createText(buttonComposite, "" + startContentSize); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + hexNumText.setLayoutData(layoutData); + + _hexNumTextToEnd = toolkit.createText(buttonComposite, "" + (byteArray.length - startContentSize)); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _hexNumTextToEnd.setLayoutData(layoutData); + _hexNumTextToEnd.setEditable(false); + + _nextButton = toolkit.createButton(buttonComposite, ">", SWT.PUSH); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _nextButton.setLayoutData(layoutData); + _nextButton.setToolTipText("See the next n bytes"); + _nextButton.setEnabled(true); + + _lastButton = toolkit.createButton(buttonComposite, ">>", SWT.PUSH); + layoutData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + layoutData.widthHint = 40; + _lastButton.setToolTipText("See the last n bytes"); + _lastButton.setLayoutData(layoutData); + + SelectionListener listener = new SelectionAdapter() + { + public void widgetSelected(SelectionEvent e) + { + if (e.widget instanceof Button) + { + String numOfBytes = hexNumText.getText(); + try + { + int n = Integer.parseInt(numOfBytes); + + //Reset range display if user requests a large value + if (n > byteArray.length) + { + n = (byteArray.length > DEFAULT_CONTENT_SIZE) ? DEFAULT_CONTENT_SIZE : byteArray.length; + hexNumText.setText("" + n); + } + + //rest if the user requests 0 + if (n < 1) + { + n = DEFAULT_CONTENT_SIZE; + hexNumText.setText("" + n); + } + + Button button = (Button) e.widget; + hexText.setText(displayByteFormat(localComposite, byteArray, n * 2, thisEncoding, + button.getText(), true)); + asciiText.setText(displayByteFormat(localComposite, byteArray, n * 2, thisEncoding, + button.getText(), false)); + } + catch (NumberFormatException exp) + { + popupErrorMessage("Error", "Please input the number of bytes you wish to look at"); + } + } + if (e.widget instanceof ScrollBar) + { + //synchronize the movements of the two scrollbars + ScrollBar sb = (ScrollBar) e.widget; + if (sb.getParent().equals(hexText)) + { + asciiScrollBar.setIncrement(sb.getIncrement()); + asciiScrollBar.setSelection(sb.getSelection()); + } + else if (sb.getParent().equals(asciiText)) + { + hexScrollBar.setSelection(sb.getSelection()); + hexScrollBar.setIncrement(sb.getIncrement()); + } + } + } + }; + localComposite.addControlListener(new ControlAdapter() + { + public void controlResized(ControlEvent e) + { + //if the control is resized, set different parameters to make a single line displays the same contents. + if (((GridLayout) localComposite.getLayout()).makeColumnsEqualWidth) + { + ((GridLayout) localComposite.getLayout()).makeColumnsEqualWidth = false; + ((GridLayout) localComposite.getLayout()).numColumns = 2; + ((GridData) hexText.getLayoutData()).horizontalSpan = 1; + ((GridData) hexText.getLayoutData()).widthHint = 144; + ((GridData) asciiText.getLayoutData()).horizontalSpan = 1; + ((GridData) asciiText.getLayoutData()).widthHint = 52; + ((GridData) buttonComposite.getLayoutData()).horizontalSpan = 2; + } + else + { + ((GridLayout) localComposite.getLayout()).makeColumnsEqualWidth = true; + ((GridLayout) localComposite.getLayout()).numColumns = 42; //set to 47 if not using any fonts + ((GridData) hexText.getLayoutData()).horizontalSpan = 25; // set to 30 if not using any fonts + ((GridData) asciiText.getLayoutData()).horizontalSpan = 17; // set to 17 if not using any fonts + ((GridData) buttonComposite.getLayoutData()).horizontalSpan = 42; + } + } + }); + + _firstButton.addSelectionListener(listener); + _previousButton.addSelectionListener(listener); + _nextButton.addSelectionListener(listener); + _lastButton.addSelectionListener(listener); + hexScrollBar.addSelectionListener(listener); + asciiScrollBar.addSelectionListener(listener); + //f.dispose(); + } + catch (Exception ex) + { + ex.printStackTrace(); + } + } + + /** + * Format object messages to have a hexadecimal view and a ascii view. + * @param numOfBytes + * @param encoding + * @return + */ + private static String displayByteFormat(Composite localComposite, byte[] byteArray, int numOfBytes, + String encoding, String direction, boolean isHex) + { + final Hex hexeconder = new Hex(); + final byte[] encoded = hexeconder.encode(byteArray); + + int hexLength = byteArray.length * 2; + StringBuilder sb = new StringBuilder(); + int currentBytePos = (Integer) localComposite.getData("currentBytePos"); + int startingBytePos = (Integer) localComposite.getData("startingBytePos"); + + int strLength = 0; + int offset = 0; + String encStr; + if (isHex) + { + if (direction.equals("<<")) + { + strLength = (numOfBytes > hexLength) ? hexLength : numOfBytes; + offset = 0; + } + else if (direction.equals("<")) + { + strLength = (startingBytePos - numOfBytes < 0) ? startingBytePos : numOfBytes; + offset = (startingBytePos - numOfBytes < 0) ? 0 : startingBytePos - numOfBytes; + } + else if (direction.equals(">")) + { + strLength = (numOfBytes > (hexLength - currentBytePos)) ? hexLength - currentBytePos : numOfBytes; + offset = currentBytePos; + } + else if (direction.equals(">>")) + { + strLength = (numOfBytes > hexLength) ? hexLength : numOfBytes; + offset = (hexLength - numOfBytes > 0) ? hexLength - numOfBytes : 0; + } + else + { + strLength = hexLength; + offset = 0; + } + localComposite.setData("strLength", strLength); + localComposite.setData("currentBytePos", offset + strLength); + localComposite.setData("startingBytePos", offset); + + if (_lastButton != null && !_lastButton.isDisposed()) + { + //Set button state + _previousButton.setEnabled(offset != 0); + _nextButton.setEnabled(offset + strLength != hexLength); + + //set the text fields + _hexNumTextToStart.setText("" + offset / 2); + _hexNumTextToEnd.setText("" + (hexLength - (offset + strLength)) / 2); + } + } + + try + { + if (isHex) + { + encStr = new String(encoded, offset, strLength, encoding); + for (int c = 0; c < strLength; c++) + { + sb.append(encStr.charAt(c)); + if (c % 2 == 1) + { + sb.append(" "); + } + } + return sb.toString().toUpperCase(); + } + else + { + strLength = (Integer) localComposite.getData("strLength"); + sb = new StringBuilder(); + encStr = new String(byteArray, startingBytePos / 2, strLength / 2, encoding); + for (int c = 0; c < encStr.length(); c++) + { + char ch = encStr.charAt(c); + if (ch > 31 && ch < 127) + { + sb.append(ch); + } + else + { + sb.append("?"); + } + + sb.append(" "); + } + } + } + catch (UnsupportedEncodingException e) + { + e.printStackTrace(); + } + return sb.toString(); + } + public static int popupInfoMessage(String title, String message) { return showBox(title, message, SWT.ICON_INFORMATION | SWT.OK); @@ -448,7 +768,7 @@ public class ViewUtility public static int popupConfirmationMessage(String title, String message) { - return showBox(title, message,SWT.ICON_QUESTION | SWT.YES | SWT.NO | SWT.CANCEL); + return showBox(title, message,SWT.ICON_QUESTION | SWT.YES | SWT.NO); } diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86/Configuration/config.ini b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86/Configuration/config.ini index be058e2ae5..dc15366740 100644 --- a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86/Configuration/config.ini +++ b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86/Configuration/config.ini @@ -45,4 +45,5 @@ org.eclipse.ui, \ org.eclipse.ui.forms, \ org.eclipse.ui.workbench, \ org.eclipse.equinox.launcher, \ -org.eclipse.equinox.launcher.gtk.linux.x86 +org.eclipse.equinox.launcher.gtk.linux.x86, \ +org.apache.commons.codec diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/Configuration/config.ini b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/Configuration/config.ini new file mode 100644 index 0000000000..f437e830b5 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/Configuration/config.ini @@ -0,0 +1,49 @@ +###############################################################################
+# 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.
+###############################################################################
+
+#Product Runtime Configuration File + +osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui +eclipse.product=org.apache.qpid.management.ui.product +osgi.bundles.defaultStartLevel=4 +osgi.bundles=jmxremote.sasl, \ +qpid-management-common, \ +org.apache.qpid.management.ui, \ +com.ibm.icu, \ +org.eclipse.core.commands, \ +org.eclipse.core.contenttype, \ +org.eclipse.core.databinding, \ +org.eclipse.core.expressions, \ +org.eclipse.core.jobs, \ +org.eclipse.core.runtime@start, \ +org.eclipse.core.runtime.compatibility.registry, \ +org.eclipse.equinox.app,org.eclipse.equinox.common, \ +org.eclipse.equinox.preferences, \ +org.eclipse.equinox.registry, \ +org.eclipse.help, \ +org.eclipse.jface, \ +org.eclipse.jface.databinding, \ +org.eclipse.swt, \ +org.eclipse.swt.gtk.linux.x86_64, \ +org.eclipse.ui, \ +org.eclipse.ui.forms, \ +org.eclipse.ui.workbench, \ +org.eclipse.equinox.launcher, \ +org.eclipse.equinox.launcher.gtk.linux.x86_64, \ +org.apache.commons.codec diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/libcairo-swt.so b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/libcairo-swt.so Binary files differnew file mode 100644 index 0000000000..5734427fb8 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/libcairo-swt.so diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc Binary files differnew file mode 100644 index 0000000000..ff1f3a7507 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc.ini b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc.ini new file mode 100644 index 0000000000..19ceb6f717 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/linux-gtk-x86_64/qpidmc.ini @@ -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. +############################################################################### + +-vmargs +-Xms40m +-Xmx256m +-XX:MaxPermSize=256m +-Dosgi.requiredJavaVersion=1.5 +-Declipse.consoleLog=true + +#=============================================== +# SSL trust store configuration options. +#=============================================== + +# Uncomment lines below to specify custom truststore for server SSL +# certificate verification, eg when using self-signed server certs. +# +#-Djavax.net.ssl.trustStore=<path.to.truststore> +#-Djavax.net.ssl.trustStorePassword=<truststore.password> + + diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Configuration/config.ini b/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Configuration/config.ini index a7c671ce2d..3ac3aa20f3 100644 --- a/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Configuration/config.ini +++ b/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Configuration/config.ini @@ -45,4 +45,5 @@ org.eclipse.ui, \ org.eclipse.ui.forms, \ org.eclipse.ui.workbench, \ org.eclipse.equinox.launcher, \ -org.eclipse.equinox.launcher.carbon.macosx +org.eclipse.equinox.launcher.carbon.macosx, \ +org.apache.commons.codec diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/qpid-management-common-plugin/MANIFEST.MF b/qpid/java/management/eclipse-plugin/src/main/resources/qpid-management-common-plugin/MANIFEST.MF index 5ef0c78606..818daef003 100644 --- a/qpid/java/management/eclipse-plugin/src/main/resources/qpid-management-common-plugin/MANIFEST.MF +++ b/qpid/java/management/eclipse-plugin/src/main/resources/qpid-management-common-plugin/MANIFEST.MF @@ -8,4 +8,4 @@ Export-Package: org.apache.qpid.management.common, org.apache.qpid.management.common.sasl Bundle-Vendor: Bundle-Localization: plugin -Require-Bundle: jmxremote.sasl +Require-Bundle: jmxremote.sasl;resolution:=optional diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Configuration/config.ini b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Configuration/config.ini new file mode 100644 index 0000000000..a99a8b3f7d --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Configuration/config.ini @@ -0,0 +1,49 @@ +###############################################################################
+# 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.
+###############################################################################
+
+#Product Runtime Configuration File + +osgi.splashPath=platform:/base/plugins/org.apache.qpid.management.ui +eclipse.product=org.apache.qpid.management.ui.product +osgi.bundles.defaultStartLevel=4 +osgi.bundles=jmxremote.sasl, \ +qpid-management-common, \ +org.apache.qpid.management.ui, \ +com.ibm.icu, \ +org.eclipse.core.commands, \ +org.eclipse.core.contenttype, \ +org.eclipse.core.databinding, \ +org.eclipse.core.expressions, \ +org.eclipse.core.jobs, \ +org.eclipse.core.runtime@start, \ +org.eclipse.core.runtime.compatibility.registry, \ +org.eclipse.equinox.app,org.eclipse.equinox.common, \ +org.eclipse.equinox.preferences, \ +org.eclipse.equinox.registry, \ +org.eclipse.help, \ +org.eclipse.jface, \ +org.eclipse.jface.databinding, \ +org.eclipse.swt, \ +org.eclipse.swt.gtk.solaris.sparc, \ +org.eclipse.ui, \ +org.eclipse.ui.forms, \ +org.eclipse.ui.workbench, \ +org.eclipse.equinox.launcher, \ +org.eclipse.equinox.launcher.gtk.solaris.sparc, \ +org.apache.commons.codec diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.l.pm b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.l.pm new file mode 100644 index 0000000000..995d7c9bb0 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.l.pm @@ -0,0 +1,311 @@ +/* XPM */ +static char *ProductIcon48[] = { +/* columns rows colors chars-per-pixel */ +"48 48 257 2", +" c black", +". c gray100", +"X c #69695A5AE8E8", +"o c #494949499191", +"O c #CECE9292BFBF", +"+ c #E7E7CACAE0E0", +"@ c #C8C88C8CBBBB", +"# c #C2C28A8ABABA", +"$ c #EAEAD7D7E8E8", +"% c #CFCFA9A9CCCC", +"& c #D9D9BCBCD8D8", +"* c #B6B68787B9B9", +"= c #C3C39999C7C7", +"- c #A7A77D7DB5B5", +"; c #BDBDA3A3CDCD", +": c #D8D8CACAE3E3", +"> c #A8A88D8DC4C4", +", c #92927575B2B2", +"< c #87876C6CAAAA", +"1 c #9A9A8383BABA", +"2 c #7B7B6363A3A3", +"3 c #666654549595", +"4 c #73735F5FADAD", +"5 c #626251519292", +"6 c #7F7F7272A7A7", +"7 c #6D6D5E5E9E9E", +"8 c #64645454A9A9", +"9 c #77776969B1B1", +"0 c #49493E3E8282", +"q c #7D7D7373B6B6", +"w c #5B5B4E4EADAD", +"e c #55554949BABA", +"r c #56564949BABA", +"t c #56564A4ABABA", +"y c #56564949B9B9", +"u c #55554949B8B8", +"i c #4F4F4444ACAC", +"p c #53534848B4B4", +"a c #53534848B3B3", +"s c #54544949B5B5", +"d c #52524747B0B0", +"f c #52524747AFAF", +"g c #54544949B3B3", +"h c #DEDEDCDCEEEE", +"j c #3E3E36369898", +"k c #43433B3B9F9F", +"l c #33332C2C7777", +"z c #42423A3A9C9C", +"x c #4A4A4040A8A8", +"c c #55554A4ABABA", +"v c #55554A4AB9B9", +"b c #54544949B7B7", +"n c #52524848B1B1", +"m c #51514747AEAE", +"M c #4E4E4545A9A9", +"N c #49494141A0A0", +"B c #52524848AFAF", +"V c #51514848AEAE", +"C c #50504747ACAC", +"Z c #4F4F4646AAAA", +"A c #51514848ADAD", +"S c #50504747ABAB", +"D c #50504848ACAC", +"F c #50504747A9A9", +"G c #4E4E4646A7A7", +"H c #4E4E4545A4A4", +"J c #4D4D4545A4A4", +"K c #4F4F4747A8A8", +"L c #4E4E4646A5A5", +"P c #4D4D4545A3A3", +"I c #3B3B35357D7D", +"U c #4E4E4646A3A3", +"Y c #55554D4D9F9F", +"T c #4A4A43438989", +"R c #51514B4B9090", +"E c #67676060A5A5", +"W c #1D1D18186A6A", +"Q c #272722227D7D", +"! c #282823237D7D", +"~ c #2B2B26268181", +"^ c #33332C2C8989", +"/ c #3B3B36368E8E", +"( c #454540409797", +") c #4D4D4646A4A4", +"_ c #4C4C4545A1A1", +"` c #4D4D4646A2A2", +"' c #4B4B4545A0A0", +"] c #4D4D4646A1A1", +"[ c #4C4C45459F9F", +"{ c #4B4B45459E9E", +"} c #4A4A44449C9C", +"| c #494944449898", +" . c #484843439696", +".. c #4A4A45459999", +"X. c #4F4F4A4AA0A0", +"o. c #68686363AAAA", +"O. c #21211D1D7676", +"+. c #242420207575", +"@. c #2D2D2A2A7F7F", +"#. c #2D2D2A2A7B7B", +"$. c #3D3D39398F8F", +"%. c #484844449696", +"&. c #474743439393", +"*. c #464643439191", +"=. c #454542428E8E", +"-. c #4D4D4A4A9C9C", +";. c #57575454A3A3", +":. c #5A5A58589797", +">. c #5F5F5D5D9999", +",. c #85858282C1C1", +"<. c #95959292C9C9", +"1. c #B8B8B6B6DCDC", +"2. c #070705055353", +"3. c #080807075555", +"4. c #0A0A09095757", +"5. c #0C0C0B0B5858", +"6. c #0F0F0D0D5C5C", +"7. c #10100F0F5C5C", +"8. c #131311116464", +"9. c #141413136060", +"0. c #141413135F5F", +"q. c #171715156767", +"w. c #161615156262", +"e. c #161615156161", +"r. c #181817176464", +"t. c #1A1A19196666", +"y. c #1C1C1A1A6464", +"u. c #1D1D1C1C6868", +"i. c #1F1F1E1E6A6A", +"p. c #222221216C6C", +"a. c #242423236F6F", +"s. c #272725257171", +"d. c #272726267272", +"f. c #272726267171", +"g. c #292928287474", +"h. c #2A2A29297474", +"j. c #2C2C2B2B7777", +"k. c #2F2F2E2E7C7C", +"l. c #2E2E2D2D7979", +"z. c #343433337E7E", +"x. c #393937378686", +"c. c #373736368181", +"v. c #3A3A39398484", +"b. c #3A3A39398383", +"n. c #3D3D3B3B8686", +"m. c #424241418C8C", +"M. c #424241418B8B", +"N. c #444442428B8B", +"B. c #434341418989", +"V. c #454544448E8E", +"C. c #454544448D8D", +"Z. c #424241418787", +"A. c #434342428888", +"S. c #444442428787", +"D. c #424241418585", +"F. c #414140408383", +"G. c #484847479090", +"H. c #434342428686", +"J. c #4A4A49499393", +"K. c #464645458A8A", +"L. c #4D4D4C4C9595", +"P. c #54545252A0A0", +"I. c #50504F4F9898", +"U. c #58585757A0A0", +"Y. c #525250509393", +"T. c #5B5B5959A2A2", +"R. c #585857579F9F", +"E. c #62626161A9A9", +"W. c #64646363ACAC", +"Q. c #6B6B6A6AB2B2", +"!. c #6B6B6A6AB1B1", +"~. c #75757474B8B8", +"^. c #7F7F7D7DBDBD", +"/. c #9C9C9B9BCFCF", +"(. c #0B0B0B0B5858", +"). c #0D0D0D0D5A5A", +"_. c #111111115E5E", +"`. c #131313136060", +"'. c #212121216D6D", +"]. c #242424246F6F", +"[. c #2B2B2C2C7777", +"{. c #2B2B2B2B7777", +"}. c #2C2C2C2C7777", +"|. c #2E2E2E2E7979", +" X c #313131317C7C", +".X c #313131317B7B", +"XX c #343434347E7E", +"oX c #3C3C3C3C8686", +"OX c #3F3F3F3F8989", +"+X c #414142428B8B", +"@X c #424242428B8B", +"#X c #474747479090", +"$X c #414141418484", +"%X c #404040408181", +"&X c #4A4A4A4A9494", +"*X c #4A4A4A4A9393", +"=X c #4D4D4D4D9696", +"-X c #4F4F4F4F9898", +";X c #505050509898", +":X c #525252529B9B", +">X c #555555559E9E", +",X c #555555559D9D", +"<X c #57575858A0A0", +"1X c #58585858A0A0", +"2X c #575758589F9F", +"3X c #575757579F9F", +"4X c #5A5A5A5AA2A2", +"5X c #5D5D5D5DA5A5", +"6X c #5F5F5F5FA7A7", +"7X c #61616262AAAA", +"8X c #61616161A9A9", +"9X c #61616262A9A9", +"0X c #62626262AAAA", +"qX c #64646464ACAC", +"wX c #62626262A9A9", +"eX c #64646464ABAB", +"rX c #66666666AEAE", +"tX c #66666666ADAD", +"yX c #68686868B0B0", +"uX c #69696969AFAF", +"iX c #6D6D6D6DB4B4", +"pX c #6F6F6F6FB5B5", +"aX c #73737373BABA", +"sX c #71717171B7B7", +"dX c #76767676BCBC", +"fX c #79797979BFBF", +"gX c #77777777B9B9", +"hX c #80808080C1C1", +"jX c #8C8C8C8CC5C5", +"kX c #90909090C9C9", +"lX c #98989898CBCB", +"zX c #A0A0A0A0CFCF", +"xX c #A5A5A5A5D3D3", +"cX c #ABABABABD6D6", +"vX c #C4C4C4C4E3E3", +"bX c #D1D1D1D1E9E9", +"nX c #E5E5E5E5F3F3", +"mX c #9F9FA0A0D1D1", +"MX c #B6B6C5C5E5E5", +"NX c #8E8EA6A6D6D6", +"BX c #9090A7A7D7D7", +"VX c #9191A9A9D7D7", +"CX c #9595ABABD8D8", +"ZX c #9999AFAFDADA", +"AX c #9D9DB2B2DCDC", +"SX c #A1A1B5B5DDDD", +"DX c #A5A5B8B8DEDE", +"FX c #A9A9BBBBE0E0", +"GX c #ACACBDBDE1E1", +"HX c #B0B0C1C1E3E3", +"JX c #B4B4C4C4E4E4", +"KX c #B8B8C7C7E5E5", +"LX c #BBBBC9C9E6E6", +"PX c #AEAEC0C0E2E2", +"IX c #B2B2C3C3E3E3", +"UX c gray100", +"YX c None", +/* pixels */ +"YXX X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X X YX", +"X %X%X%XF.F.F.F.$XD.Z.Z.Z.B.B.B.N.N.=.=.=.*.*.*.&.&. . .| ....} } { { _ _ P P H G G G K S S C o ", +"X %X%X%X%XF.F.$XD.D.Z.Z.B.A.B.N.N.N.=.=.=.*.*.&.&.%.%.%.| | ..} { { [ _ _ ` U J L G K F Z S C o ", +"X %X%X%X%XF.F.F.D.D.H.Z.Z.A.B.N.N.N.C.=.=.*.*.&.&. . .%.| | ..} } { [ [ _ P P H G G K F S S C o ", +"X %XF.%XF.F.$XF.$XZ.Z.Z.B.A.K.Y.7 , - - 1 1 ^.^.~.aX~.q 9 6XY { } { ' _ ] P P H L G K F Z S C o ", +"X %XF.F.F.F.F.D.D.Z.Z.Z.K.:.1 ; % ; <.hXfXfXdXaXaXsXpXiX!.yXrXo.;.X.[ _ _ ` H H G K K F S S C o ", +"X F.F.F.F.F.D.D.D.Z.H.Y.1 & & 1.cXmX/.kXfXdXaXaXsXpXiXQ.yXtXeXE.6X5XP.X._ ` J L G G K F Z S C o ", +"X D.$XF.$XD.D.Z.Z.S.>.% + : vX1.1.cXmX/.dXaXaXsXpXiXQ.uXrXqX8X6X5XT.R.P.X.P ) H G K K S S S m o ", +"X D.$XD.D.D.D.D.S.6 & $ h bXvXvX1.xX/.kXfXaXsXpXiXQ.yXrXW.E.6X5X4XU.,X:XI.-.` L G G K F Z C C o ", +"X D.D.D.D.D.Z.H.6 & $ h h h bXvX1.cXmXkX,.dXpXiXQ.yXtXqXwX6X5XT.U.,X:XI.=X*X..` G K K Z S S m o ", +"X Z.D.Z.H.Z.Z.7 & $ h h nXh bXvX1.cXmXkX,.gXiXQ.uXrXW.E.6X5X4XU.,X:X-XL.J.#XV. .P G F S S C m o ", +"X Z.Z.Z.H.Z.R % + : bXh h h bXvX1.cX/.kXhX~.Q.yXrXqX9X6X5X4X2X,X:X;X=X*X#XV.M.OX( K Z S S C m o ", +"X Z.Z.Z.A.A.* & & vXvXbXbXbXvXvX1.xXlXjX^.pXuXrXeXwX6X5X4XU.,X:X-XL.*XG.V.@XOXoXb.( Z S C C V o ", +"X B.B.B.A.2 % % 1.1.vXvXvXvXvX1.cXzX<.,.gXiXrXW.E.6X5X4XU.,X:XI.=X*X#XV.@XOXn.b.c.x.N S S C m o ", +"X B.B.B.S.* % ; xX1.1.1.1.1.cXcXzXlXjX^.pXrXeX7X6X5X4XR.,X:X-XL.J.#XV.@XOXn.b.c.XX X$.S C C m o ", +"X N.N.N.2 O = /.mXxXcXcXcXcXxXzXlXjXhX~.uXeXE.6X5X4XU.,X:X-XL.J.#XV.M.OXn.v.c.z. X|.k.N D V f o ", +"X N.N.N.- @ > kX<././.mXzXzXlX<.jXhXgXuXeXE.6X5X4X1X,X:XI.L.*X#XV.m.OXn.b.c.z. Xl.j.g./ C m V o ", +"X N.N.R @ # ,.,.jXkXkX<.kXkXjX,.^.~.uXwXE.6X5X4X1X,X:XI.=XJ.#XC.M.OXn.v.c.z..X|.j.g.d.#.M m B o ", +"X =.M.< @ * fXfXhXhX,.,.,.hX^.gXpXuXqX9X6X5X4XU.,X:XI.L.*XG.V.+XOXn.b.c.z..X|.[.g.d.a.p.z V B o ", +"X =.N.- @ NXNXBXBXBXVXCXCXCXCXZXZXZXZXAXAXSXSXSXDXDXDXFXFXFXGXPXPXHXHXIXJXMXMXMXKXKXLXLXLXB d o ", +"X =.=.* @ 1 dXdXaXaXsXpXiX!.yXrXeXwX6X5X4X<X,X:XI.=X*XG.V.M.OXn.v.c.XX.X|.j.g.d.a.p.i.u.@.f d o ", +"X *.=.# @ ^.dXaXaXsXpXiXQ.yXrXeXwX6X5XT.U.,X:X-XL.&XG.C.m.OXoXv.c.z..X|.j.g.f.a.p.i.u.t.+.d d o ", +"X *.*.@ @ NXNXNXBXVXVXCXCXCXCXZXZXZXZXAXAXAXSXSXDXDXDXFXFXGXGXPXPXHXHXJXJXJXMXKXKXKXLXLXLXd n o ", +"X &.*.@ @ dXaXsXpXiXQ.yXtXeXE.6X5X4XU.>X:XI.L.*XG.V.m.OXoXv.c.z. X|.j.g.d.a.'.i.u.t.r.w.9.d n o ", +"X &.&.@ @ ~.sXpXiXQ.yXtXW.E.6X5X4X1X,X:XI.=X*X#XC.m.OXn.b.c.z. X|.[.g.f.a.p.i.u.t.r.w.9.0.n a o ", +"X &.&.@ @ NXNXBXBXVXVXVXCXCXCXZXZXZXZXAXAXSXSXSXDXDXDXFXFXGXGXPXPXHXIXIXJXMXMXKXKXKXLXLXLXn n o ", +"X %. .# @ q iXQ.yXrXW.0X6X5X4XU.>X:XI.L.*X#XV.@XOXn.b.c.XX.X|.{.g.f.].'.i.u.t.r.w.0._.7.W n a o ", +"X %. .* # , Q.yXtXeX7X6X5X4XU.,X:X-XL.*X#XV.@XOXn.b.c.XX Xl.{.g.d.a.p.i.u.t.r.e.0._.7.).+.a a o ", +"X | | - # NXNXNXBXVXVXCXCXCXCXZXZXZXAXAXAXAXSXSXDXDXDXFXFXGXGXPXPXHXHXIXJXMXMXMXKXKXLXLXLXa a o ", +"X | | < # - rXeX9X6X5X4XU.,X:X-XL.*X#XC.@XOXoXb.c.z. X|.j.h.s.a.'.i.u.t.r.w.9._.7.).5.4.j a p o ", +"X | } Y # * 9 8X6X5X4X3X,X:XI.=X*XG.V.@XOXn.v.c.XX X|.j.g.f.a.p.i.u.t.r.e.0._.7.).5.4.q.i g p o ", +"X } } | - # , 6X5X4XR.,X:XI.=X*XG.V.m.OXoXb.c.XX X|.j.g.f.a.p.i.u.t.r.e.9._.7.).5.4.3.~ a s s o ", +"X } } } 4 # - E 4XU.>X:X-X=XJ.#XV.M.OXoXb.c.XX X|.{.h.d.a.'.i.u.t.r.e.9._.7.).5.4.3.6.z p s s o ", +"X { { } } - # < U.,X:XI.=X*XG.V.+XOXoXb.c.z. X|.}.g.d.a.'.i.u.t.r.w.0._.7.).5.4.3.2.! g p s s o ", +"X [ { ' [ 4 * - E :X;XL.J.#XV.m.OXoXb.c.z..X|.j.h.f.a.'.i.u.t.r.w.9._.6.).(.4.3.2.8.k p s s s o ", +"X [ [ ' _ [ , * , ;XL.J.#XV.@XOXoXv.c.z..X|.{.g.f.a.p.i.u.t.r.w.`._.7.).(.4.3.2.2.^ s p s s s o ", +"X _ _ _ _ P ] - * 2 *X#XV.m.OXn.v.c.XX X|.j.h.f.a.p.i.u.t.r.w.`._.7.).(.4.3.2.2.Q p s s s b u o ", +"X ` ` ` ` ` ` 8 - - 7 V.@XOXoXv.c.XX.X|.j.g.d.a.'.i.u.t.r.w.0._.7.).5.4.3.2.2.O.x p s s s u u o ", +"X P P ) P U U ) 8 - - 7 OXn.v.c.XX X|.j.h.f.a.p.i.u.t.r.w.0._.7.).5.4.3.2.2.O.x s s s s b u u o ", +"X L L ) H ) L L L 8 1 - 7 b.c.z. X|.j.h.f.a.'.i.u.t.r.w.0._.7.).5.4.3.2.2.Q x p s s s b b u e o ", +"X L G L G G G G G G G , * 2 T .Xl.j.h.f.a.p.i.u.t.r.e.0._.7.).5.4.3.2.8.^ p p s s s s u u e e o ", +"X G G G G G G G K K M M 4 , , 3 I g.d.a.p.i.u.t.r.e.`._.7.).5.4.3.7.! k p s p s s s u u u e v o ", +"X K G K K K K K K Z Z M F F 4 , < 3 I p.i.u.t.r.w.9._.7.).5.4.W ~ z a p p s s b s u u u e e e o ", +"X F Z F F F F Z Z F F S S S S S w 9 < 2 5 0 l p.e.9.y.a.l ^ j i a p p p s s b b b u e v y r e o ", +"X S Z Z S Z S Z S S S S S C C C A m d V f m B m B d d n d a a a p s p s s b u u u u e v e r t o ", +"X S S S S S S S S S S C C C m m A V V B B B d d d n n a a a p p s p s s b u u u e e e c t r t o ", +"X C C C C C C C C m C A m A m f V f f B d d d n n n a a a a s s s s s u b u u u u v t t r t t o ", +"YXo o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o YX" +}; diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.m.pm b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.m.pm new file mode 100644 index 0000000000..e64aa0cc06 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.m.pm @@ -0,0 +1,295 @@ +/* XPM */ +static char *ProductIcon32[] = { +/* columns rows colors chars-per-pixel */ +"32 32 257 2", +" c black", +". c gray100", +"X c #69695A5AE8E8", +"o c #494949499191", +"O c #E8E8CBCBE0E0", +"+ c #DDDDB3B3D2D2", +"@ c #F0F0DDDDEBEB", +"# c #CDCD9191BEBE", +"$ c #C8C88B8BBBBB", +"% c #CACA9898C2C2", +"& c #C3C38A8ABBBB", +"* c #BABA8787B9B9", +"= c #DCDCC4C4DEDE", +"- c #C5C5A3A3CACA", +"; c #ADAD8181B8B8", +": c #A3A37A7AB5B5", +"> c #E2E2D6D6E9E9", +", c #B3B39A9AC4C4", +"< c #EBEBE3E3F0F0", +"1 c #C9C9B6B6D6D6", +"2 c #96967676B8B8", +"3 c #8C8C7171ABAB", +"4 c #A4A49292BEBE", +"5 c #7D7D6565A6A6", +"6 c #83836D6DABAB", +"7 c #9A9A8787C2C2", +"8 c #7B7B6464B7B7", +"9 c #5E5E50509191", +"0 c #646457579A9A", +"q c #85857B7BBEBE", +"w c #7C7C7373B6B6", +"e c #62625353D5D5", +"r c #61615353D4D4", +"t c #60605252D1D1", +"y c #5F5F5252D0D0", +"u c #5F5F5151CFCF", +"i c #60605353D2D2", +"p c #5F5F5252CFCF", +"a c #5E5E5151CDCD", +"s c #5C5C4F4FC7C7", +"d c #5F5F5252CDCD", +"f c #5E5E5151CBCB", +"g c #5B5B4F4FC4C4", +"h c #5A5A4E4EC1C1", +"j c #71716969B0B0", +"k c #48483E3EADAD", +"l c #5D5D5151CDCD", +"z c #5C5C5050C9C9", +"x c #5D5D5151CBCB", +"c c #5C5C5050C7C7", +"v c #5B5B4F4FC6C6", +"b c #5B5B5050C6C6", +"n c #59594E4EC1C1", +"m c #58584D4DBFBF", +"M c #59594F4FC2C2", +"N c #5A5A4F4FC2C2", +"B c #58584D4DBCBC", +"V c #57574D4DBCBC", +"C c #59594E4EBEBE", +"Z c #58584E4EBDBD", +"A c #58584D4DBBBB", +"S c #57574D4DBABA", +"D c #56564D4DB9B9", +"F c #56564C4CB6B6", +"G c #55554C4CB6B6", +"H c #54544B4BB4B4", +"J c #54544B4BB1B1", +"K c #53534B4BB1B1", +"L c #52524A4AAEAE", +"P c #51514949ACAC", +"I c #51514949ABAB", +"U c #474741418787", +"Y c #32322C2C8F8F", +"T c #2B2B25257777", +"R c #36362F2F9696", +"E c #2B2B26266E6E", +"W c #4D4D4545ACAC", +"Q c #55554D4DB8B8", +"! c #54544C4CB4B4", +"~ c #54544C4CB3B3", +"^ c #51514A4AACAC", +"/ c #51514A4AABAB", +"( c #50504949A9A9", +") c #4F4F4949A6A6", +"_ c #4C4C4747A1A1", +"` c #4E4E4848A3A3", +"' c #4D4D4848A1A1", +"] c #4B4B46469C9C", +"[ c #4C4C47479E9E", +"{ c #51514C4CA6A6", +"} c #A9A9A6A6D5D5", +"| c #1E1E1A1A6666", +" . c #292925258181", +".. c #3D3D39399292", +"X. c #4A4A46469B9B", +"o. c #53534E4EABAB", +"O. c #494945459797", +"+. c #4A4A46469999", +"@. c #474744449494", +"#. c #484845459494", +"$. c #474744449292", +"%. c #464643439090", +"&. c #464642428D8D", +"*. c #54545050A9A9", +"=. c #474744448F8F", +"-. c #4C4C49499999", +";. c #57575454A6A6", +":. c #5B5B5757AAAA", +">. c #545451519B9B", +",. c #5A5A57579C9C", +"<. c #65656262A7A7", +"1. c #68686666A2A2", +"2. c #CACAC9C9E5E5", +"3. c #050504045151", +"4. c #080807075454", +"5. c #0A0A09095858", +"6. c #0C0C0A0A5858", +"7. c #10100E0E6262", +"8. c #0E0E0D0D5A5A", +"9. c #121211115D5D", +"0. c #131312125D5D", +"q. c #161615156161", +"w. c #171716166161", +"e. c #1A1A19196565", +"r. c #20201E1E7070", +"t. c #1E1E1D1D6969", +"y. c #2A2A29297676", +"u. c #2F2F2D2D7676", +"i. c #3A3A39398787", +"p. c #3A3A39398383", +"a. c #3F3F3E3E8888", +"s. c #414140408989", +"d. c #454543438D8D", +"f. c #444442428B8B", +"g. c #444443438C8C", +"h. c #434342428A8A", +"j. c #434341418888", +"k. c #434342428989", +"l. c #424241418787", +"z. c #434342428787", +"x. c #424241418585", +"c. c #41413F3F8181", +"v. c #414140408282", +"b. c #484846468D8D", +"n. c #494948489090", +"m. c #4B4B4A4A9191", +"M. c #4B4B49498E8E", +"N. c #525251519A9A", +"B. c #525251519999", +"V. c #565654549A9A", +"C. c #545453539494", +"Z. c #60605F5FA7A7", +"A. c #64646363ABAB", +"S. c #5A5A59599797", +"D. c #68686767ADAD", +"F. c #6C6C6B6BB2B2", +"G. c #5E5E5D5D9A9A", +"H. c #76767575BABA", +"J. c #78787777BBBB", +"K. c #76767474B5B5", +"L. c #7E7E7D7DBABA", +"P. c #A5A5A4A4D2D2", +"I. c #040404045252", +"U. c #070707075454", +"Y. c #070708085353", +"T. c #080808085454", +"R. c #0A0A0B0B5757", +"E. c #0E0E0E0E5A5A", +"W. c #111112125E5E", +"Q. c #111111115E5E", +"!. c #111111115D5D", +"~. c #111112125D5D", +"^. c #161616166868", +"/. c #151516166161", +"(. c #151515156161", +"). c #19191A1A6565", +"_. c #191919196565", +"`. c #1A1A1A1A6464", +"'. c #1D1D1E1E6969", +"]. c #1E1E1E1E6969", +"[. c #222222226D6D", +"{. c #272727277171", +"}. c #2B2B2C2C7676", +"|. c #2B2B2B2B7676", +" X c #2B2B2B2B7575", +".X c #303030307A7A", +"XX c #303030307979", +"oX c #353535357F7F", +"OX c #393939398383", +"+X c #3A3A3A3A8383", +"@X c #3F3F3F3F8787", +"#X c #434343438C8C", +"$X c #434344448C8C", +"%X c #424242428686", +"&X c #414141418484", +"*X c #484848489191", +"=X c #484849499090", +"-X c #4D4D4D4D9696", +";X c #515151519D9D", +":X c #4D4D4D4D9595", +">X c #515152529A9A", +",X c #515152529999", +"<X c #525252529A9A", +"1X c #525252529999", +"2X c #565657579E9E", +"3X c #575757579D9D", +"4X c #5B5B5B5BA2A2", +"5X c #5F5F6060A6A6", +"6X c #5F5F5F5FA6A6", +"7X c #63636464AAAA", +"8X c #64646464AAAA", +"9X c #67676767AEAE", +"0X c #67676868AEAE", +"qX c #68686868AEAE", +"wX c #6F6F6F6FB5B5", +"eX c #6C6C6C6CB1B1", +"rX c #73737373B8B8", +"tX c #82828282BEBE", +"yX c #86868686C2C2", +"uX c #89898989C4C4", +"iX c #98989898CBCB", +"pX c #A0A0A0A0CFCF", +"aX c #A9A9A9A9D5D5", +"sX c #B0B0B0B0D8D8", +"dX c #B8B8B8B8DDDD", +"fX c #BDBDBDBDE0E0", +"gX c #D9D9D9D9EDED", +"hX c #90909191C6C6", +"jX c #71718989BCBC", +"kX c #73738B8BBFBF", +"lX c #72728989BCBC", +"zX c #79799090C3C3", +"xX c #7E7E9595C7C7", +"cX c #81819898CACA", +"vX c #84849B9BCCCC", +"bX c #8C8CA3A3D4D4", +"nX c #71718A8ABCBC", +"mX c #73738B8BBDBD", +"MX c #75758D8DBFBF", +"NX c #74748C8CBEBE", +"BX c #76768E8EC0C0", +"VX c #7C7C9494C6C6", +"CX c #7B7B9393C4C4", +"ZX c #7F7F9797C9C9", +"AX c #82829A9ACBCB", +"SX c #85859E9ECECE", +"DX c #8888A0A0D1D1", +"FX c #87879F9FD0D0", +"GX c #8B8BA4A4D4D4", +"HX c #8B8BA3A3D4D4", +"JX c #8989A1A1D2D2", +"KX c #8D8DA5A5D6D6", +"LX c #8B8BA3A3D3D3", +"PX c #8E8EA6A6D6D6", +"IX c #8D8DA5A5D5D5", +"UX c gray100", +"YX c None", +/* pixels */ +"YXX X X X X X X X X X X X X X X X X X X X X X X X X X X X X X YX", +"X v.v.v.v.&Xl.z.k.&.d.%.$.@.O.+.] [ _ ` ) ( ^ L K ! G D V m m o ", +"X c.c.c.v.&Xx.z.f.f.d.%.$.#.O.+.X.[ _ ` ) ( / L K H F D V C n o ", +"X v.c.v.v.x.x.z.k.f.n.V.,.>.-.+.] [ _ ` ) ( ^ L K H G D V C h o ", +"X &Xv.&Xx.x.l.j.M.1.4 - - , 7 q J.H.K.j :.*.P L K H F S B C n o ", +"X x.&Xx.x.z.j.S., = = 1 } iXuXH.rXwXF.qX7XZ.;.o.J ! F S B m n o ", +"X x.l.z.%Xz.G.1 @ > 2.dXaXiXuXrXwXF.qX8X5X4X2X;X{ H F S V C n o ", +"X z.j.j.j.C.1 @ < gX2.fXaXpXuXwXeX9X7X5X4X2XN.:X*X_ D S Z m h o ", +"X k.k.h.b., O > gXgX2.dXaXiXyXF.D.A.Z.4X3X1X:Xn.g.a._ V B m N o ", +"X f.f.f.3 + = 2.2.2.fXsXpXhXtXD.8XZ.4X2X1X:X*X$X@Xp.i.W C n N o ", +"X d.&.%.% + 1 dXdXdXsXP.iXyXK.8X5X4X2X>X:X*Xg.a.+XoX.X..m n N o ", +"X %.=.5 % - P.} aXP.pXiXyXK.D.Z.4X3X1X-Xn.$X@X+XoX.X Xy.W h g o ", +"X $.$.: # PXIXGXGXLXJXFXFXSXvXAXcXZXxXVXCXzXzXBXMXkXmXnXjXh g o ", +"X #.@.* $ 7 yXuXyXtXL.K.D.6X4X2X1X:Xo g.a.OXoX.X|.{.[.t. .g v o ", +"X O.#.$ $ q H.rXwXF.0XA.6X4X2X1X:Xo $Xa.p.oX.X|.{.[.'.`.r.g b o ", +"X X.+.$ $ PXKXbXbXLXJXDXFXSXvXAXcXZXxXCXCXzXBXBXMXNXmXlXjXb c o ", +"X ] ] $ $ H.wXF.0X7X6X4X2X<X:Xo #Xa.+XoX.X|.{.[.].)./.~.Q.c z o ", +"X [ [ & & w F.qX7XZ.4X2X,X:Xo #Xa.+XoX.X}.{.[.'.e./.9.E.^.c z o ", +"X ' _ * & PXKXbXHXLXJXDXSXSXvXAXcXZXxXVXCXzXzXBXMXNXkXjXjXz x o ", +"X ` ` : & 2 8XZ.4X2XB.:X*Xg.@Xp.oX.X|.{.[.].).q.!.E.R.U.Y z f o ", +"X ) ) 5 & ; <.4X2X>X:Xo #Xa.+XoXXX|.{.[.t._.q.~.E.R.4.5.k x a o ", +"X ( ( I ; * 6 2X>X:X=X$X@X+XoX.X|.{.[.t.e./.W.E.R.Y.3. .z a a o ", +"X I ^ / 8 * : 0 :X*X#X@X+XoX.X|.{.[.'._.(.~.E.R.T.3.7.k x a p o ", +"X L L L ^ 2 * 3 m.$Xa.p.oX.X}.{.[.t.).(.~.E.6.T.3.I.R x a a y o ", +"X J K K K K 2 * 5 s.OXoX.X}.{.[.'._.(.9.8.R.4.3.I.Y x l a p t o ", +"X ~ H H ! ! ! 2 ; 5 U XX}.{.[.].e.(.W.E.R.U.3.7.R x l u u y t o ", +"X G F G G G Q Q 8 : 3 9 u.[.]._./.Q.E.R.T.6. .k x a a u t t t o ", +"X D S D S D S S S V 8 2 6 9 c.E w.0.| T Y k z z a a p t t i r o ", +"X A V B V V V B B m m n n h h g g g c z z z l l d p y t i r r o ", +"X m C C C C C C C n n n M N g g b c z z x a a a u y t t r r e o ", +"X n n n n n h h h N N g g v b s z z z x a p p u t t r r r e e o ", +"YXo o o o o o o o o o o o o o o o o o o o o o o o o o o o o o YX" +}; diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.s.pm b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.s.pm new file mode 100644 index 0000000000..e2b9379f3a --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.s.pm @@ -0,0 +1,287 @@ +/* XPM */ +static char *ProductIcon24[] = { +/* columns rows colors chars-per-pixel */ +"24 24 257 2", +" c black", +". c gray100", +"X c #69695A5AE8E8", +"o c #494949499191", +"O c #F1F1DFDFECEC", +"+ c #D7D7ACACCDCD", +"@ c #DFDFBBBBD6D6", +"# c #E2E2C4C4DBDB", +"$ c #CECE9C9CC4C4", +"% c #C4C48B8BBABA", +"& c #C2C28A8ABABA", +"* c #C4C48E8EBCBC", +"= c #BFBF8A8AB9B9", +"- c #EBEBD9D9E9E9", +"; c #BFBF8888B9B9", +": c #D8D8B9B9D6D6", +"> c #B9B98686B9B9", +", c #B8B88989B9B9", +"< c #BBBB9393BFBF", +"1 c #A9A97B7BB2B2", +"2 c #E4E4D4D4E7E7", +"3 c #C6C6AFAFCECE", +"4 c #A6A68080B6B6", +"5 c #A2A27E7EB4B4", +"6 c #9E9E7E7EB1B1", +"7 c #ABAB9090BBBB", +"8 c #B7B7A0A0C5C5", +"9 c #9D9D7C7CB2B2", +"0 c #AAAA8B8BBEBE", +"q c #AAAA9090BCBC", +"w c #8C8C6B6BABAB", +"e c #90907070B1B1", +"r c #C4C4B3B3D7D7", +"t c #CDCDBFBFDDDD", +"y c #EAEAE4E4F1F1", +"u c #88886A6AADAD", +"i c #9E9E8585C1C1", +"p c #84846A6AAFAF", +"a c #81816B6BAAAA", +"s c #D7D7CFCFE6E6", +"d c #81816969B1B1", +"f c #78786363A5A5", +"g c #6E6E5D5D9C9C", +"h c #717160609D9D", +"j c #83837474AAAA", +"k c #6A6A5757A3A3", +"l c #6E6E5E5EA0A0", +"z c #5E5E50509292", +"x c #88887B7BBCBC", +"c c #68685858ABAB", +"v c #5A5A4D4DA2A2", +"b c #7D7D7373B4B4", +"n c #5A5A4E4EA6A6", +"m c #5F5F56569595", +"M c #56564A4ABBBB", +"N c #56564949B9B9", +"B c #55554949B8B8", +"V c #53534848B3B3", +"C c #54544949B4B4", +"Z c #52524747B0B0", +"A c #52524747AFAF", +"S c #5B5B53539393", +"D c #3E3E36369797", +"F c #49494040A6A6", +"G c #48484040A5A5", +"H c #55554A4ABABA", +"J c #54544949B7B7", +"K c #53534949B4B4", +"L c #51514747AFAF", +"P c #52524848B1B1", +"I c #51514848B0B0", +"U c #51514848AEAE", +"Y c #51514747ADAD", +"T c #51514848ADAD", +"R c #4F4F4747ABAB", +"E c #50504747ABAB", +"W c #50504646A9A9", +"Q c #4F4F4646A8A8", +"! c #4E4E4646A7A7", +"~ c #4E4E4545A4A4", +"^ c #4D4D4545A4A4", +"/ c #4E4E4646A5A5", +"( c #4D4D4545A1A1", +") c #3D3D36367E7E", +"_ c #4B4B44449C9C", +"` c #2A2A25257F7F", +"' c #3E3E37379898", +"] c #474740409C9C", +"[ c #4D4D4646A4A4", +"{ c #4C4C4545A2A2", +"} c #4D4D4646A2A2", +"| c #4D4D4646A1A1", +" . c #4B4B45459F9F", +".. c #4C4C45459F9F", +"X. c #4C4C46469F9F", +"o. c #4B4B45459D9D", +"O. c #494943439898", +"+. c #494944449A9A", +"@. c #4A4A45459A9A", +"#. c #494944449898", +"$. c #484843439696", +"%. c #494944449797", +"&. c #484843439595", +"*. c #51514C4CA1A1", +"=. c #6B6B6767AEAE", +"-. c #95959191C9C9", +";. c #23231F1F7676", +":. c #21211E1E7070", +">. c #292925257F7F", +",. c #252521217070", +"<. c #242421216D6D", +"1. c #2B2B27278080", +"2. c #393935358C8C", +"3. c #444440409494", +"4. c #3B3B38388282", +"5. c #474743439494", +"6. c #484844449595", +"7. c #474743439393", +"8. c #474744449393", +"9. c #464643439191", +"0. c #454542428F8F", +"q. c #4A4A47479898", +"w. c #464643438F8F", +"e. c #454542428D8D", +"r. c #444441418B8B", +"t. c #484844449191", +"y. c #444441418989", +"u. c #494946469090", +"i. c #4C4C48489393", +"p. c #51514E4E9E9E", +"a. c #73737070B6B6", +"s. c #77777474BBBB", +"d. c #A0A09E9ED1D1", +"f. c #D6D6D5D5EBEB", +"g. c #0E0E0D0D5A5A", +"h. c #11110F0F5E5E", +"j. c #121211115E5E", +"k. c #131312125F5F", +"l. c #171716166363", +"z. c #1D1D1B1B6868", +"x. c #1D1D1C1C6868", +"c. c #222221216E6E", +"v. c #222221216D6D", +"b. c #282827277474", +"n. c #282827277373", +"m. c #292928287373", +"M. c #2F2F2E2E7979", +"N. c #353534347F7F", +"B. c #363635358181", +"V. c #3C3C3B3B8585", +"C. c #424241418C8C", +"Z. c #424241418B8B", +"A. c #444442428B8B", +"S. c #434341418989", +"D. c #434342428989", +"F. c #424241418787", +"G. c #414140408484", +"H. c #474745458D8D", +"J. c #434342428787", +"K. c #424241418585", +"L. c #414140408282", +"P. c #494948489191", +"I. c #4F4F4E4E9797", +"U. c #59595757A6A6", +"Y. c #5F5F5D5DA4A4", +"T. c #6C6C6B6BB3B3", +"R. c #7C7C7B7BB9B9", +"E. c #A8A8A7A7D3D3", +"W. c #0D0D0D0D5A5A", +"Q. c #1F1F1F1F6C6C", +"!. c #222222226E6E", +"~. c #3B3B3B3B8585", +"^. c #414141418C8C", +"/. c #414141418B8B", +"(. c #424242428B8B", +"). c #484848489292", +"_. c #404040408181", +"`. c #4E4E4E4E9898", +"'. c #555555559E9E", +"]. c #555555559D9D", +"[. c #5B5B5B5BA3A3", +"{. c #5C5C5C5CA3A3", +"}. c #61616161A9A9", +"|. c #66666666AEAE", +" X c #66666666ADAD", +".X c #6B6B6B6BB2B2", +"XX c #70707070B7B7", +"oX c #6A6A6A6AADAD", +"OX c #74747474BBBB", +"+X c #89898989C2C2", +"@X c #90909090C8C8", +"#X c #8F8F8F8FC6C6", +"$X c #92929292C6C6", +"%X c #9F9F9F9FCFCF", +"&X c #A5A5A5A5D2D2", +"*X c #B5B5B5B5DBDB", +"=X c #B8B8B8B8DEDE", +"-X c #B7B7B7B7DCDC", +";X c #BBBBBBBBDEDE", +":X c #BDBDBDBDDFDF", +">X c #C9C9C9C9E5E5", +",X c #D1D1D1D1EAEA", +"<X c #7C7C7D7DBABA", +"1X c #89898A8AC7C7", +"2X c #8F8F9090C7C7", +"3X c #A3A3A4A4D3D3", +"4X c #A2A2B5B5DEDE", +"5X c #ADADBDBDE1E1", +"6X c #B9B9C7C7E5E5", +"7X c #BABAC8C8E6E6", +"8X c #8E8EA6A6D6D6", +"9X c #9090A7A7D7D7", +"0X c #9191A9A9D7D7", +"qX c #9292A9A9D8D8", +"wX c #9494ABABD8D8", +"eX c #9898AEAED9D9", +"rX c #9B9BB0B0DADA", +"tX c #9E9EB3B3DCDC", +"yX c #A1A1B5B5DDDD", +"uX c #A5A5B8B8DEDE", +"iX c #A8A8BBBBE0E0", +"pX c #ACACBEBEE1E1", +"aX c #AFAFC0C0E3E3", +"sX c #B3B3C3C3E4E4", +"dX c #B2B2C2C2E3E3", +"fX c #B5B5C5C5E5E5", +"gX c #B8B8C7C7E6E6", +"hX c #B6B6C5C5E4E4", +"jX c #9797AEAED9D9", +"kX c #A1A1B6B6DDDD", +"lX c #A8A8BBBBDFDF", +"zX c gray100", +"xX c black", +"cX c black", +"vX c black", +"bX c black", +"nX c black", +"mX c black", +"MX c black", +"NX c black", +"BX c black", +"VX c black", +"CX c black", +"ZX c black", +"AX c black", +"SX c black", +"DX c black", +"FX c black", +"GX c black", +"HX c black", +"JX c black", +"KX c black", +"LX c black", +"PX c black", +"IX c black", +"UX c black", +"YX c None", +/* pixels */ +"YXX X X X X X X X X X X X X X X X X X X X X X YX", +"X _._.L.G.K.F.D.A.e.0.9.&.$.%.+._ ..{ ^ ! W E o ", +"X L.L.L.G.F.F.D.r.e.0.9.7.&.O.@.o. .{ ~ ! Q E o ", +"X L.G.G.K.F.S.y.r.e.w.9.5.$.+.@.o...( ~ ! W E o ", +"X G.K.K.F.J.D.h 6 0 i x s.a.=.U.*...} ~ ! W E o ", +"X K.F.F.F.S 7 : r d.1XOXXX.X|.}.[.p.| / ! W E o ", +"X F.F.F.m 3 - s =X3X@XXXT. X}.[.].I.q.{ Q E T o ", +"X S.D.H.8 O y ,X;X&X2X.X|.}.[.].I.P.C.3.Q E Y o ", +"X A.r.j # 2 f.>X*X%X+X|.}.[.].I.P.^.~.B.] E Y o ", +"X e.u.q @ t :X-XE.$X<X}.[.].`.P.Z.V.N.M.2.Y L o ", +"X 0.i.< + 8X8XqXwXeXrXtX4XuXlXpXaXsXfXgX7XY A o ", +"X 9.t.* $ -.#X+XR.oX{.'.`.P.(.~.N.M.m.c.Q.T Z o ", +"X 8.7.; % 8X9X0XwXeXrXtXyXuXiXpXaXdXfXgX7XL Z o ", +"X 6.&.1 & b X}.[.'.I.P./.~.N.M.n.!.x.l.:.I P o ", +"X #.#.w = 8X9XqXwXjXrXtXkXuXiX5XaXsXhX6X7XP V o ", +"X +.+.k > 5 Y.].I.)./.~.N.M.b.v.x.l.k.h.' V C o ", +"X o.o.o.u , a I.).Z.V.N.M.n.c.z.l.j.W.` P V C o ", +"X .. .X.v e 4 l ^.V.N.M.m.!.x.l.j.g.;.F V C J o ", +"X ( | ( ( n p 9 g 4.M.n.c.x.l.j.h.>.G V K C J o ", +"X ~ [ [ ^ / / c d f z ) <.z.,.1.D P V C C B B o ", +"X ! Q ! Q Q Q Q W E E Y T A Z P V V K C J B B o ", +"X Q W Q W R W E E T T T L Z P V V K J J J B N o ", +"X R E E E E E Y Y U L Z P P P C V J J B B H M o ", +"YXo o o o o o o o o o o o o o o o o o o o o o YX" +}; diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.t.pm b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.t.pm new file mode 100644 index 0000000000..3f6b21f428 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/Qpidmc.t.pm @@ -0,0 +1,279 @@ +/* XPM */ +static char *ProductIcon16[] = { +/* columns rows colors chars-per-pixel */ +"16 16 257 2", +" c black", +". c gray100", +"X c #E2E2C0C0D9D9", +"o c #EDEDD9D9E8E8", +"O c #D5D5ABABCDCD", +"+ c #E2E2C3C3DCDC", +"@ c #C5C58E8EBCBC", +"# c #D4D4ABABCDCD", +"$ c #CACA9F9FC6C6", +"% c #D6D6B4B4D3D3", +"& c #CACAA0A0C8C8", +"* c #C6C69D9DC6C6", +"= c #C5C59F9FC8C8", +"- c #CCCCACACCECE", +"; c #CCCCB0B0D3D3", +": c #A6A68383B3B3", +"> c #BABA9A9AC6C6", +", c #B7B79A9AC2C2", +"< c #E3E3D5D5E9E9", +"1 c #B0B08E8EC0C0", +"2 c #9F9F8080B8B8", +"3 c #AFAF9898C1C1", +"4 c #DBDBCFCFE5E5", +"5 c #96967878B2B2", +"6 c #9A9A7E7EBABA", +"7 c #8E8E7878AFAF", +"8 c #91917F7FBDBD", +"9 c #D3D3CCCCE4E4", +"0 c #535348488B8B", +"q c #69695A5AE8E8", +"w c #55554949B9B9", +"e c #55554949B8B8", +"r c #54544848B6B6", +"t c #53534848B4B4", +"y c #54544848B4B4", +"u c #53534848B3B3", +"i c #53534848B2B2", +"p c #52524747AFAF", +"a c #53534848B1B1", +"s c #54544949B8B8", +"d c #54544949B6B6", +"f c #52524848B3B3", +"g c #52524848B2B2", +"h c #53534949B3B3", +"j c #52524848B1B1", +"k c #52524848B0B0", +"l c #51514747AEAE", +"z c #52524848AFAF", +"x c #51514848AEAE", +"c c #51514747ADAD", +"v c #51514747ACAC", +"b c #4F4F4646AAAA", +"n c #51514848ADAD", +"m c #50504747ABAB", +"M c #50504747AAAA", +"N c #4F4F4646A8A8", +"B c #50504747A9A9", +"V c #4E4E4646A7A7", +"C c #4E4E4646A6A6", +"Z c #4F4F4646A6A6", +"A c #4F4F4747A7A7", +"S c #4D4D4545A3A3", +"D c #4D4D4545A2A2", +"F c #4C4C45459E9E", +"G c #74746E6EB3B3", +"H c #2E2E29298383", +"J c #383832329090", +"K c #464640409999", +"L c #4D4D4646A2A2", +"P c #4E4E4747A3A3", +"I c #4B4B45459F9F", +"U c #4B4B45459E9E", +"Y c #4C4C46469F9F", +"T c #4A4A44449B9B", +"R c #4A4A44449A9A", +"E c #494943439797", +"W c #494944449797", +"Q c #484843439494", +"! c #78787474B8B8", +"~ c #272724247878", +"^ c #2D2D2A2A7575", +"/ c #484844449797", +"( c #474743439393", +") c #454542429090", +"_ c #4B4B48489A9A", +"` c #464643438F8F", +"' c #464643438E8E", +"] c #454542428C8C", +"[ c #51514D4DA0A0", +"{ c #5C5C5959A5A5", +"} c #535350509090", +"| c #C8C8C7C7E3E3", +" . c #121211115D5D", +".. c #1A1A19196565", +"X. c #242422226D6D", +"o. c #3F3F3E3E8888", +"O. c #444442428D8D", +"+. c #444442428989", +"@. c #424241418787", +"#. c #454543438A8A", +"$. c #434342428888", +"%. c #424241418686", +"&. c #414140408484", +"*. c #414140408383", +"=. c #424240408383", +"-. c #414140408282", +";. c #474746468D8D", +":. c #464644448989", +">. c #525251519999", +",. c #64646363AAAA", +"<. c #61615F5FA2A2", +"1. c #6E6E6C6CB2B2", +"2. c #A5A5A4A4D3D3", +"3. c #B0B0AFAFD6D6", +"4. c #111112125D5D", +"5. c #19191A1A6565", +"6. c #1E1E1E1E6C6C", +"7. c #222222226D6D", +"8. c #2B2B2B2B7676", +"9. c #2B2B2B2B7575", +"0. c #2B2B2C2C7575", +"q. c #343435357F7F", +"w. c #343435357E7E", +"e. c #353535357F7F", +"r. c #3E3E3E3E8888", +"t. c #3E3E3E3E8787", +"y. c #414141418484", +"u. c #404040408282", +"i. c #484849499191", +"p. c #494949499191", +"a. c #484848489090", +"s. c #484849499090", +"d. c #404040408080", +"f. c #525252529A9A", +"g. c #525252529999", +"h. c #5B5B5B5BA3A3", +"j. c #5B5B5B5BA2A2", +"k. c #64646464ABAB", +"l. c #63636464AAAA", +"z. c #6B6B6C6CB2B2", +"x. c #72727373B9B9", +"c. c #71717171A4A4", +"v. c #78787878ABAB", +"b. c #7F7F7F7FB1B1", +"n. c #8C8C8C8CBEBE", +"m. c #A5A5A5A5D2D2", +"M. c #C9C9C9C9E5E5", +"N. c #85858686B7B7", +"B. c #91919292C4C4", +"V. c #71718989BCBC", +"C. c #73738B8BBEBE", +"Z. c #75758D8DC0C0", +"A. c #78789090C3C3", +"S. c #7A7A9292C5C5", +"D. c #71718A8ABDBD", +"F. c #76768E8EC0C0", +"G. c #78789090C2C2", +"H. c #7B7B9393C5C5", +"J. c #7D7D9595C7C7", +"K. c #80809999CACA", +"L. c #7E7E9696C7C7", +"P. c #83839B9BCDCD", +"I. c #83839B9BCCCC", +"U. c #86869E9ECFCF", +"Y. c #8888A1A1D1D1", +"T. c #8A8AA2A2D3D3", +"R. c #8989A1A1D1D1", +"E. c #8B8BA3A3D3D3", +"W. c gray100", +"Q. c black", +"!. c black", +"~. c black", +"^. c black", +"/. c black", +"(. c black", +"). c black", +"_. c black", +"`. c black", +"'. c black", +"]. c black", +"[. c black", +"{. c black", +"}. c black", +"|. c black", +" X c black", +".X c black", +"XX c black", +"oX c black", +"OX c black", +"+X c black", +"@X c black", +"#X c black", +"$X c black", +"%X c black", +"&X c black", +"*X c black", +"=X c black", +"-X c black", +";X c black", +":X c black", +">X c black", +",X c black", +"<X c black", +"1X c black", +"2X c black", +"3X c black", +"4X c black", +"5X c black", +"6X c black", +"7X c black", +"8X c black", +"9X c black", +"0X c black", +"qX c black", +"wX c black", +"eX c black", +"rX c black", +"tX c black", +"yX c black", +"uX c black", +"iX c black", +"pX c black", +"aX c black", +"sX c black", +"dX c black", +"fX c black", +"gX c black", +"hX c black", +"jX c black", +"kX c black", +"lX c black", +"zX c black", +"xX c black", +"cX c black", +"vX c black", +"bX c black", +"nX c black", +"mX c black", +"MX c black", +"NX c black", +"BX c black", +"VX c black", +"CX c black", +"ZX c black", +"AX c black", +"SX c black", +"DX c black", +"FX c black", +"GX c black", +"HX c black", +"JX c black", +"KX c black", +"LX c black", +"PX c black", +"IX c black", +"UX c black", +"YX c None", +/* pixels */ +"YXq q q q q q q q q q q q q q YX", +"q d.-.y.%.+.O.` ( E R U D C B p.", +"q u.*.&.$.#.] ) Q W T F L V M p.", +"q =.y.} , % ; 8 ! 1.{ [ S Z b p.", +"q @.:.- o 4 2.x.z.,.j.>._ A m p.", +"q +.: X < M.m.z.l.j.g.s.r.K v p.", +"q ' $ + 9 | 3.B.n.N.b.v.c.<.n p.", +"q ` O T.Y.U.P.K.L.S.G.F.C.D.l p.", +"q ( # @ G k.h.g.i.t.e.9.7.6.z p.", +"q / * E.R.U.I.K.J.H.A.Z.C.V.a p.", +"q T 2 & 5 f.a.o.q.8.7...4.J u p.", +"q I Y 1 = 7 ;.w.0.7.5. .H f y p.", +"q L D P 6 > 3 0 ^ X.~ J i t d p.", +"q C C V A N M m n p k g y r e p.", +"q M b M m m c x p j h y d s w p.", +"YXp.p.p.p.p.p.p.p.p.p.p.p.p.p.YX" +}; diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc Binary files differnew file mode 100755 index 0000000000..b88ff49e8e --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc.ini b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc.ini new file mode 100644 index 0000000000..cfa715e5a8 --- /dev/null +++ b/qpid/java/management/eclipse-plugin/src/main/resources/solaris-gtk-sparc/qpidmc.ini @@ -0,0 +1,40 @@ +############################################################################### +# 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. +############################################################################### +-startup +plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar +--launcher.library +plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc_1.0.101.R34x_v20080731 +-vmargs +-Xms40m +-Xmx256m +-XX:MaxPermSize=256m +-Dosgi.requiredJavaVersion=1.5 +-Declipse.consoleLog=true + +#=============================================== +# SSL trust store configuration options. +#=============================================== + +# Uncomment lines below to specify custom truststore for server SSL +# certificate verification, eg when using self-signed server certs. +# +#-Djavax.net.ssl.trustStore=<path.to.truststore> +#-Djavax.net.ssl.trustStorePassword=<truststore.password> + + diff --git a/qpid/java/management/eclipse-plugin/src/main/resources/win32-win32-x86/Configuration/config.ini b/qpid/java/management/eclipse-plugin/src/main/resources/win32-win32-x86/Configuration/config.ini index d00d756706..a61bea2fa8 100644 --- a/qpid/java/management/eclipse-plugin/src/main/resources/win32-win32-x86/Configuration/config.ini +++ b/qpid/java/management/eclipse-plugin/src/main/resources/win32-win32-x86/Configuration/config.ini @@ -45,4 +45,5 @@ org.eclipse.ui, \ org.eclipse.ui.forms, \
org.eclipse.ui.workbench, \
org.eclipse.equinox.launcher, \
-org.eclipse.equinox.launcher.win32.win32.x86
+org.eclipse.equinox.launcher.win32.win32.x86, \ +org.apache.commons.codec
|