You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2006/07/28 17:29:26 UTC
svn commit: r426566 - in /webservices/muse/trunk/modules/muse-wsrf-rmd: ./
src/ src/org/ src/org/apache/ src/org/apache/ws/
src/org/apache/ws/resource/ src/org/apache/ws/resource/properties/
src/org/apache/ws/resource/properties/metadata/ src/org/apach...
Author: danj
Date: Fri Jul 28 08:29:25 2006
New Revision: 426566
URL: http://svn.apache.org/viewvc?rev=426566&view=rev
Log:
Original WS-RMD implementation, which extends the simple WS-MEx impl in muse-wsx-impl to provide support
for the WS-RMD dialect. There is also an extension of the MetadataExchangeClient with a getRMD() method.
Added:
webservices/muse/trunk/modules/muse-wsrf-rmd/
webservices/muse/trunk/modules/muse-wsrf-rmd/pom.xml
webservices/muse/trunk/modules/muse-wsrf-rmd/src/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchange.java
webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchangeClient.java
Added: webservices/muse/trunk/modules/muse-wsrf-rmd/pom.xml
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-rmd/pom.xml?rev=426566&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-rmd/pom.xml (added)
+++ webservices/muse/trunk/modules/muse-wsrf-rmd/pom.xml Fri Jul 28 08:29:25 2006
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsrf-rmd</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <name>Apache Muse - WS-RF WS-ResourceMetadataDescriptor 1.0 CD</name>
+ <url>http://ws.apache.org/muse</url>
+ <dependencies>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-core</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-util</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-util-qname</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-util-xml</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsa-soap</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsrf-api</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsrf-impl</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsx-api</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>muse</groupId>
+ <artifactId>muse-wsx-impl</artifactId>
+ <version>2.0.0-M2-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+ <build>
+ <sourceDirectory>src</sourceDirectory>
+ <outputDirectory>build/classes</outputDirectory>
+ <directory>build/jars</directory>
+
+ <!--
+
+ This feature can be used when Maven 2.1 is released
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <addMavenDescriptor>false</addMavenDescriptor>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ -->
+
+ </build>
+</project>
Added: webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchange.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchange.java?rev=426566&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchange.java (added)
+++ webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchange.java Fri Jul 28 08:29:25 2006
@@ -0,0 +1,39 @@
+/*=============================================================================*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+
+package org.apache.ws.resource.properties.metadata.ext;
+
+import org.w3c.dom.Element;
+
+import org.apache.muse.ws.metadata.impl.SimpleMetadataExchange;
+import org.apache.muse.ws.resource.WsResource;
+import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
+
+public class WsrfMetadataExchange extends SimpleMetadataExchange
+{
+ public Element[] getMetadata(String dialect)
+ {
+ if (dialect != null && dialect.equals(WsrmdConstants.NAMESPACE_URI))
+ {
+ WsResource resource = (WsResource)getResource();
+ MetadataDescriptor rmd = resource.getPropertyCollection().getMetadata();
+ return new Element[]{ rmd.toXML() };
+ }
+
+ return super.getMetadata(dialect);
+ }
+}
Added: webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchangeClient.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchangeClient.java?rev=426566&view=auto
==============================================================================
--- webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchangeClient.java (added)
+++ webservices/muse/trunk/modules/muse-wsrf-rmd/src/org/apache/ws/resource/properties/metadata/ext/WsrfMetadataExchangeClient.java Fri Jul 28 08:29:25 2006
@@ -0,0 +1,62 @@
+/*=============================================================================*
+ * Copyright 2006 The Apache Software Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *=============================================================================*/
+
+package org.apache.ws.resource.properties.metadata.ext;
+
+import org.w3c.dom.Element;
+
+import org.apache.muse.core.Environment;
+import org.apache.muse.ws.addressing.EndpointReference;
+import org.apache.muse.ws.addressing.soap.SoapClient;
+import org.apache.muse.ws.addressing.soap.SoapFault;
+import org.apache.muse.ws.metadata.remote.MetadataExchangeClient;
+import org.apache.muse.ws.resource.metadata.MetadataDescriptor;
+import org.apache.muse.ws.resource.metadata.WsrmdConstants;
+import org.apache.muse.ws.resource.metadata.impl.SimpleMetadataDescriptor;
+
+public class WsrfMetadataExchangeClient extends MetadataExchangeClient
+{
+ public WsrfMetadataExchangeClient(EndpointReference destination, EndpointReference source, Environment environment)
+ {
+ super(destination, source, environment);
+ }
+
+ public WsrfMetadataExchangeClient(EndpointReference destination, EndpointReference source, SoapClient soapClient)
+ {
+ super(destination, source, soapClient);
+ }
+
+ public WsrfMetadataExchangeClient(EndpointReference destination, EndpointReference source)
+ {
+ super(destination, source);
+ }
+
+ public WsrfMetadataExchangeClient(EndpointReference destination)
+ {
+ super(destination);
+ }
+
+ public MetadataDescriptor getRMD()
+ throws SoapFault
+ {
+ Element[] results = getMetadata(WsrmdConstants.NAMESPACE_URI);
+
+ if (results.length == 0)
+ return null;
+
+ return new SimpleMetadataDescriptor(results[0]);
+ }
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org