From a795d2822ff74dd4b1951e71d646326dc4fe0b63 Mon Sep 17 00:00:00 2001 From: Andrea Gazzarini Date: Mon, 2 Mar 2009 08:26:41 +0000 Subject: QPID-1581 : QMan Admin Console fixes. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@749233 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/management/client/bin/qman-wsdm-start.cmd | 1 - qpid/java/management/client/bin/qman-wsdm-start.sh | 2 +- .../client/console/brokers_management.jsp | 2 +- .../management/client/console/fragments/menu.jsp | 4 +- .../java/management/client/console/wsdl-viewer.xsl | 2523 -------------------- .../client/console/wsdm_rmd_perspective.jsp | 10 +- .../client/console/wsdm_wsdl_perspective.jsp | 8 +- qpid/java/management/client/src/main/java/muse.xml | 2 +- .../qpid/management/web/action/BrokerModel.java | 42 +- .../web/action/BrokersManagementAction.java | 30 +- .../action/WsdmPropertiesPerspectiveAction.java | 3 - .../web/action/WsdmRmdPerspectiveAction.java | 78 +- .../web/action/WsdmWsdlPerspectiveAction.java | 16 +- 13 files changed, 127 insertions(+), 2594 deletions(-) delete mode 100644 qpid/java/management/client/console/wsdl-viewer.xsl (limited to 'qpid/java') 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/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 : - + 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 @@   > System Overview   > Brokers Management   > Resources Management -   > Subscriptions Management -   > System Health +   > Subscriptions Management +   > System Health   > Logging Configuration 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 @@ - - - - - - - - - - - - - - - - - - - 3.1.01 - - - - - - - - - - - - - - - - 3 - Generated by wsdl-viewer.xsl - Port type - Interface - Source code - ... is recursive - src. - src.file. - op. - port. - iface. - - - - - - - - - - - - - - - - - -/** - 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 -} -*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Web Service Fragment - - - - - Syntax error by WSDL source rendering in element - - - - - - - - - - -
Description:
-
- -
-
-
- - - - - - - - - - - - - - - - - -
-
Target Namespace:
-
- -
- - -
-
- - - - - - - - - - - SOAP 1.1 - SOAP 1.2 - MIME - HTTP - Unknown - - - - - over HTTP - - - - -
Location:
-
- -
- -
Protocol:
-
- -
- - - - - - - - -
- -

Interface - - - - - - - - - - - - - -

- - - - - - -
Extends:
-
- -
-
- - - -
Operations:
-
- - -
    - - - -
-
-
- - - - - - - - - - SOAP - MIME - HTTP - unknown - - - - - - - - - - -

Port - - - - - - - - - - - - - -

- -
Location:
-
- -
- -
Protocol:
-
- -
- - - -
Operations:
-
- - -
    - - - -
-
-
- -
  • - - - - - - - - Detail - - - -
  • -
    - - - - -
    Default style:
    -
    - -
    -
    - - - - -
    Transport protocol:
    -
    - - SOAP over HTTP - - - - -
    -
    - - -
    Default method:
    -
    - -
    -
    -
    - - - - - - - - -

    - - - - - - - - - -

    -
    - -
      - - - -
    -
    - - -
  • - - operation - - - - - - - - -
    - - - -
    - - - - - - - - -
  • -
    - - - -
    - -
    - -
    - - - - - - - - - - - - -
    -
    -
    - -
    - - port - - -

    - - - - - - - - - -

    -
    -
      - - - -
    -
    -
    - - -
  • - - operation - - - - - - - - -
    - - - -
    - - -
    Description:
    -
    - -
    -
    - - - - -
    Style:
    -
    - -
    -
    - -
    Operation type:
    -
    - - - One-way. The endpoint receives a message. - - Request-response. The endpoint receives a message, and sends a correlated message. - - Solicit-response. The endpoint sends a message, and receives a correlated message. - - Notification. The endpoint sends a message. - unknown - -
    - - -
    SOAP action:
    -
    - -
    -
    - - -
    HTTP path:
    -
    - -
    -
    -
    - - - -
  • -
    - - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - -
    - none -
    -
    -
    -
    -
    - - -
    - - - ( - - - - , use = - - - - - , part = - - - ) - - -
    - - -
    - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - unknown - - - - - - - - - - - - - none - - -
    -
    - - - - - - - - - - - 1 - - - - - - - 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - -
    -
    - - - - - -
    -
    - - - - - - - - - - - - unknown type - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      - - - -
    -
    - - - - - disc - circle - square - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  • - - - - - - - - - - - - - anonymous - - - - - - - - - - - - - - - - -
  • -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - undefined - - - - - -
    - -
    -
    - - - - - - - - - optional - - - unbounded - - - nillable - - - - - - - - , - - - - , - - - - , - - - ; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - type - - - - - - - undefined - - - - - - - - - - - - - - - - - - - - - - - undefined - - - - - - - - - with - - - - - - - - - ( - - ) - - - - - - - - - - - - - undefined - - - - - abstract - - - - - - - - - - - - - - - - - - - - - array of - - - - - - - - - - - - enum { - - } - - - - , - - ' - - ' - - - - - - - - - - - - - - -

    - -

    -
    - -

    - - - Included - Imported - - - - WSDL - Schema - - - - - -

    - -
    - -
    - - - - - - - -
    -
    -
    - -
    - - - - - - -
    -
    - - - / - - - - - - - - - / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - xmlns - : - - - - -
    -
    -
    -
    - - - - - xmlns - : - - = - - - - - - -
    - -
    - - - - - - -
    - <!-- - - --> - -
    -
    - -
    - <? - - - ?> - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - <xsl:value-of select="concat($html-title, ' - ', 'Generated by wsdl-viewer.xsl')"/> - - - - - - - - - - - - - - - - - - - - - -
    -
    - - - - - - - -
    -
    - -
    - - - - - - - - - - - - - - -
    - -
    -
    - - - - - - -
    - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - -
    - -

    - -

    -
    - - - - - - - - - - -
    -
    - - - - - - -
    - -

    Operations

    -
    -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    -
    - - - - - - -
    - -

    WSDL source code

    -
    -
    -
    - <?xml version="1.0"?> -
    - -
    - - - -
    -
    - - - - - - - -
    - -

    About wsdl-viewer.xsl -

    -
    -
    -
    -
    -
    - -
    -
    -
    - -
    - - - -
    -
    -
    -
    - - -
    \ 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 @@
    - +
    @@ -63,12 +63,8 @@ -
    - - ${wsdl} - - - +
    +
       
    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 @@ -
    - - ${wsdl} - - - +
    +
       
    diff --git a/qpid/java/management/client/src/main/java/muse.xml b/qpid/java/management/client/src/main/java/muse.xml index 4aac63ff3e..cf651c34ac 100644 --- a/qpid/java/management/client/src/main/java/muse.xml +++ b/qpid/java/management/client/src/main/java/muse.xml @@ -32,7 +32,7 @@ org.apache.muse.ws.resource.impl.WsResourceRouter log/muse.log - FINE + SEVERE org.apache.muse.core.routing.RouterFilePersistence 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> objectsByType = new HashMap>(); - - private String id; + private Map> _objectsByType = new HashMap>(); + 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 objects = objectsByType.get(fqn); + List objects = _objectsByType.get(fqn); if (objects == null) { objects = new ArrayList(); - 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 getCategoryNames(){ - return objectsByType.keySet(); + public Set getCategoryNames() + { + return _objectsByType.keySet(); } public List 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 : * *
      - *
    • prepare data for the page that is showing all connected brokers.
    • . - * connect QMan with a broker on demand. + *
    • prepare data for the page that is showing all connected brokers.
    • . + * connect QMan with a broker on demand. *
    + * * @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); -- cgit v1.2.1