qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agazzar...@apache.org
Subject svn commit: r748511 - in /qpid/trunk/qpid/java/management/client/src/main/java: ./ org/apache/qpid/management/wsdm/capabilities/ org/apache/qpid/management/wsdm/muse/serializer/ wsdl/
Date Fri, 27 Feb 2009 13:31:19 GMT
Author: agazzarini
Date: Fri Feb 27 13:31:18 2009
New Revision: 748511

URL: http://svn.apache.org/viewvc?rev=748511&view=rev
Log:
QPID-1582 : Pausable Subscription Manager capability +  WSDL Improvements.

Modified:
    qpid/trunk/qpid/java/management/client/src/main/java/muse.xml
    qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java
    qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java
    qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java
    qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java
    qpid/trunk/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl
    qpid/trunk/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl

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=748511&r1=748510&r2=748511&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 Fri Feb 27 13:31:18 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>SEVERE</log-level>
+			<log-level>FINE</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/wsdm/capabilities/MBeanCapability.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java
(original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/MBeanCapability.java
Fri Feb 27 13:31:18 2009
@@ -179,10 +179,7 @@
 						params, 
 						signature);
 			
-		return new Result(
-					output.getReturnCode(),
-					output.getStatusText(),
-					output.getOutputSection());
+		return new Result(output.getOutputSection());
 
 		} catch (InstanceNotFoundException exception)
 		{

Modified: qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java
(original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/capabilities/Result.java
Fri Feb 27 13:31:18 2009
@@ -29,11 +29,9 @@
  * 
  * @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 @@
 	 * @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 @@
 	{
 		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

Modified: qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java
(original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/InvocationResultSerializer.java
Fri Feb 27 13:31:18 2009
@@ -38,8 +38,6 @@
  */
 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 @@
 	@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 @@
 	{
 		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

Modified: qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java
(original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/org/apache/qpid/management/wsdm/muse/serializer/MapSerializer.java
Fri Feb 27 13:31:18 2009
@@ -62,25 +62,29 @@
 	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()))
+				Element[] keysAndValues = XmlUtils.getAllElements(entry);
+				Object key = null;
+				Object value = null;
+				for (Element element : keysAndValues) 
 				{
-					key = _stringSerializer.fromXML(element);
-				} else if (Names.VALUE.equals(element.getLocalName()))
-				{
-					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;
 	}

Modified: qpid/trunk/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl (original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/wsdl/QManWsResource.wsdl Fri Feb
27 13:31:18 2009
@@ -115,8 +115,6 @@
 
 			<xsd:complexType name="result">
 				<xsd:sequence>
-					<xsd:element name="statusCode" type="xsd:long" />
-					<xsd:element name="statusText" type="xsd:string" />
 					<xsd:element name="outputParameters" type="qman:map"/>
 				</xsd:sequence>
 			</xsd:complexType>

Modified: qpid/trunk/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl?rev=748511&r1=748510&r2=748511&view=diff
==============================================================================
--- qpid/trunk/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl
(original)
+++ qpid/trunk/qpid/java/management/client/src/main/java/wsdl/WS-BaseNotification-1_3.wsdl
Fri Feb 27 13:31:18 2009
@@ -424,23 +424,22 @@
 			<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"



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


Mime
View raw message