Author: agazzarini
Date: Mon Mar  2 08:26:41 2009
New Revision: 749233

URL: http://svn.apache.org/viewvc?rev=749233&view=rev
Log:
QPID-1581 : QMan Admin Console fixes.

Removed:
    qpid/trunk/qpid/java/management/client/console/css/
    qpid/trunk/qpid/java/management/client/console/definitions/
    qpid/trunk/qpid/java/management/client/console/wsdl-viewer.xsl
Modified:
    qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.cmd
    qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.sh
    qpid/trunk/qpid/java/management/client/console/brokers_management.jsp
    qpid/trunk/qpid/java/management/client/console/fragments/menu.jsp
    qpid/trunk/qpid/java/management/client/console/wsdm_rmd_perspective.jsp
    qpid/trunk/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp
    qpid/trunk/qpid/java/management/client/src/main/java/muse.xml
    
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java
    
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java
    
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java
    
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java
    
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java

Modified: qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.cmd
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.cmd?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.cmd (original)
+++ qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.cmd Mon Mar  2 
08:26:41 2009
@@ -58,7 +58,6 @@
 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

Modified: qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.sh
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.sh?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.sh (original)
+++ qpid/trunk/qpid/java/management/client/bin/qman-wsdm-start.sh Mon Mar  2 
08:26:41 2009
@@ -58,7 +58,7 @@
 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""

Modified: qpid/trunk/qpid/java/management/client/console/brokers_management.jsp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/console/brokers_management.jsp?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/console/brokers_management.jsp 
(original)
+++ qpid/trunk/qpid/java/management/client/console/brokers_management.jsp Mon 
Mar  2 08:26:41 2009
@@ -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.

Modified: qpid/trunk/qpid/java/management/client/console/fragments/menu.jsp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/console/fragments/menu.jsp?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/console/fragments/menu.jsp (original)
+++ qpid/trunk/qpid/java/management/client/console/fragments/menu.jsp Mon Mar  
2 08:26:41 2009
@@ -3,8 +3,8 @@
                <a href="<%=request.getContextPath()%>/console"> &nbsp; &gt; 
System Overview</a>
                <a 
href="<%=request.getContextPath()%>/brokers_management">&nbsp; &gt; Brokers 
Management</a>
                <a 
href="<%=request.getContextPath()%>/resources_management">&nbsp; &gt; Resources 
Management</a>
-               <a href="<%=request.getContextPath()%>/tbd.jsp">&nbsp; &gt; 
Subscriptions Management</a>
-               <a href="<%=request.getContextPath()%>/tbd.jsp">&nbsp; &gt; 
System Health</a>
+               <a>&nbsp; &gt; Subscriptions Management</a>
+               <a>&nbsp; &gt; System Health</a>
                <a 
href="<%=request.getContextPath()%>/logging_configuration">&nbsp; &gt; Logging 
Configuration</a>
        </div>  
 </div>

Modified: 
qpid/trunk/qpid/java/management/client/console/wsdm_rmd_perspective.jsp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/console/wsdm_rmd_perspective.jsp?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/console/wsdm_rmd_perspective.jsp 
(original)
+++ qpid/trunk/qpid/java/management/client/console/wsdm_rmd_perspective.jsp Mon 
Mar  2 08:26:41 2009
@@ -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>

Modified: 
qpid/trunk/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp 
(original)
+++ qpid/trunk/qpid/java/management/client/console/wsdm_wsdl_perspective.jsp 
Mon Mar  2 08:26:41 2009
@@ -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>

Modified: qpid/trunk/qpid/java/management/client/src/main/java/muse.xml
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/muse.xml?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/muse.xml (original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/muse.xml Mon Mar  2 
08:26:41 2009
@@ -32,7 +32,7 @@
                
<java-router-class>org.apache.muse.ws.resource.impl.WsResourceRouter</java-router-class>
                <logging>
                        <log-file>log/muse.log</log-file>
-                       <log-level>FINE</log-level>
+                       <log-level>SEVERE</log-level>
                </logging>
                <persistence>
                        
<java-persistence-class>org.apache.muse.core.routing.RouterFilePersistence</java-persistence-class>

Modified: 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java
 (original)
+++ 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokerModel.java
 Mon Mar  2 08:26:41 2009
@@ -30,12 +30,21 @@
 
 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 @@
                {
                        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

Modified: 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java
 (original)
+++ 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/BrokersManagementAction.java
 Mon Mar  2 08:26:41 2009
@@ -42,9 +42,10 @@
  * 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 @@
        /**
         * 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 @@
        }
        
        /**
-        * 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 @@
                                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) 
                        {

Modified: 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java
 (original)
+++ 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmPropertiesPerspectiveAction.java
 Mon Mar  2 08:26:41 2009
@@ -43,15 +43,12 @@
 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;
        

Modified: 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java
 (original)
+++ 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmRmdPerspectiveAction.java
 Mon Mar  2 08:26:41 2009
@@ -35,6 +35,8 @@
 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 @@
 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 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 @@
        {
                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");

Modified: 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java
URL: 
http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java?rev=749233&r1=749232&r2=749233&view=diff
==============================================================================
--- 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java
 (original)
+++ 
qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/web/action/WsdmWsdlPerspectiveAction.java
 Mon Mar  2 08:26:41 2009
@@ -35,6 +35,7 @@
 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 @@
 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 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 @@
 
                        String wsresourceid = 
objectName.getKeyProperty(Names.OBJECT_ID);
                        EndpointReference resourceEndpointReference = new 
EndpointReference(getURI(request));
+                       
                        resourceEndpointReference.addParameter(
                                        Names.RESOURCE_ID_QNAME, 
                                        wsresourceid);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscr...@qpid.apache.org

Reply via email to