Author: kidz
Date: Tue Aug 2 07:05:25 2005
New Revision: 227008
URL: http://svn.apache.org/viewcvs?rev=227008&view=rev
Log:
Support for muse-ext properties, refactored for home interface changes
Modified:
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostHome.java
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostPropertyQNames.java
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostResource.java
webservices/muse/trunk/src/examples/enterprise/services/host/src/wsdl/host.wsdl
Modified:
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostHome.java
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostHome.java?rev=227008&r1=227007&r2=227008&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostHome.java
(original)
+++
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostHome.java
Tue Aug 2 07:05:25 2005
@@ -16,7 +16,6 @@
package org.apache.ws.muse.example.host;
import org.apache.ws.addressing.EndpointReference;
-import org.apache.ws.muse.example.ExampleConstants;
import org.apache.ws.muse.example.resourceadmin.properties.CreateParamsType;
import org.apache.ws.resource.Resource;
import org.apache.ws.resource.ResourceContext;
Modified:
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostPropertyQNames.java
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostPropertyQNames.java?rev=227008&r1=227007&r2=227008&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostPropertyQNames.java
(original)
+++
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostPropertyQNames.java
Tue Aug 2 07:05:25 2005
@@ -1,18 +1,3 @@
-/*=============================================================================*
- * Copyright 2005 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.muse.example.host;
import javax.xml.namespace.QName;
@@ -27,61 +12,38 @@
*/
public interface HostPropertyQNames
{
- /** DOCUMENT_ME */
- QName CPUUSAGE = new QName(
"http://ws.apache.org/muse/example/host/properties", "CpuUsage", "host-prop" );
-
- /** DOCUMENT_ME */
- QName AVAILABLEMEMORY =
- new QName( "http://ws.apache.org/muse/example/host/properties",
"AvailableMemory", "host-prop" );
-
- /** DOCUMENT_ME */
- QName TOPICEXPRESSIONDIALECTS =
- new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
- "TopicExpressionDialects", "wsnt" );
-
- /** DOCUMENT_ME */
- QName NUMBEROFPROCESSES =
- new QName( "http://ws.apache.org/muse/example/host/properties",
"NumberOfProcesses", "host-prop" );
-
- /** DOCUMENT_ME */
- QName RESOURCEID =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd",
"ResourceId", "muws-p1-xs" );
-
- /** DOCUMENT_ME */
- QName RESOURCEHOSTNAME =
- new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"ResourceHostname", "ws-ext" );
-
- /** DOCUMENT_ME */
- QName VERSION =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Version",
"muws-p2-xs" );
-
- /** DOCUMENT_ME */
- QName MANAGEABILITYCAPABILITY =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd",
"ManageabilityCapability",
- "muws-p1-xs" );
-
- /** DOCUMENT_ME */
- QName CAPTION =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Caption",
"muws-p2-xs" );
-
- /** DOCUMENT_ME */
- QName DESCRIPTION =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd",
"Description", "muws-p2-xs" );
-
- /** DOCUMENT_ME */
- QName FIXEDTOPICSET =
- new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
- "FixedTopicSet", "wsnt" );
-
- /** DOCUMENT_ME */
- QName CURRENTTIME =
- new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd",
"CurrentTime", "muws-p2-xs" );
-
- /** DOCUMENT_ME */
- QName RESOURCETYPE =
- new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"ResourceType", "ws-ext" );
-
- /** DOCUMENT_ME */
- QName TOPIC =
- new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
"Topic", "wsnt" );
-}
\ No newline at end of file
+
+ QName CPUUSAGE =
+ new QName( "http://ws.apache.org/muse/example/host/properties",
"CpuUsage", "host-prop");
+ QName AVAILABLEMEMORY =
+ new QName( "http://ws.apache.org/muse/example/host/properties",
"AvailableMemory", "host-prop");
+ QName TOPICEXPRESSIONDIALECTS =
+ new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
"TopicExpressionDialects", "wsnt");
+ QName NUMBEROFPROCESSES =
+ new QName( "http://ws.apache.org/muse/example/host/properties",
"NumberOfProcesses", "host-prop");
+ QName RESOURCEID =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd",
"ResourceId", "muws-p1-xs");
+ QName CREATIONTIME =
+ new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"CreationTime", "ws-ext");
+ QName RESOURCEHOSTNAME =
+ new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"ResourceHostname", "ws-ext");
+ QName VERSION =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Version",
"muws-p2-xs");
+ QName MANAGEABILITYCAPABILITY =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part1.xsd",
"ManageabilityCapability", "muws-p1-xs");
+ QName CAPTION =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd", "Caption",
"muws-p2-xs");
+ QName DESCRIPTION =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd",
"Description", "muws-p2-xs");
+ QName FIXEDTOPICSET =
+ new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
"FixedTopicSet", "wsnt");
+ QName CURRENTTIME =
+ new QName(
"http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd",
"CurrentTime", "muws-p2-xs");
+ QName RESOURCETYPE =
+ new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"ResourceType", "ws-ext");
+ QName OWNER =
+ new QName( "http://ws.apache.org/namespaces/muse/muws-ext-1.xsd",
"Owner", "ws-ext");
+ QName TOPIC =
+ new QName(
"http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd",
"Topic", "wsnt");
+
+}
Modified:
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostResource.java
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostResource.java?rev=227008&r1=227007&r2=227008&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostResource.java
(original)
+++
webservices/muse/trunk/src/examples/enterprise/services/host/src/java/org/apache/ws/muse/example/host/HostResource.java
Tue Aug 2 07:05:25 2005
@@ -15,6 +15,8 @@
*=============================================================================*/
package org.apache.ws.muse.example.host;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.apache.ws.mows.v1_0.MowsConstants;
import org.apache.ws.mows.v1_0.capability.MetricsCapability;
import org.apache.ws.muse.example.ExampleConstants;
@@ -41,7 +43,7 @@
/**
* @author Kinga Dziembowski
- *
+ *
* A Host WS-Resource.
* <p/>
* NOTE: This class is generated but IS meant to be modified.
@@ -70,6 +72,9 @@
/** A resource variable to hold the reference for backend */
private HostInstance m_instance = null;
+ /** A log object */
+ private static final Log LOG = LogFactory.getLog(
HostResource.class.getName() );
+
/**
* Creates a new [EMAIL PROTECTED] HostResource} object.
*
@@ -250,13 +255,29 @@
prop_resourcetype.setResourceType( RESOURCE_TYPE );
resourceProperty.add( prop_resourcetype );
- // init the
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}CurrentTime
ResourceProperty
+ //init the
{http://docs.oasis-open.org/wsdm/2004/12/muws/wsdm-muws-part2.xsd}CurrentTime
ResourceProperty
resourceProperty = resourcePropertySet.get(
HostPropertyQNames.CURRENTTIME );
CurrentTimeDocument currentTimeDocument =
CurrentTimeDocument.Factory.newInstance( );
currentTimeDocument.setCurrentTime( Calendar.getInstance( ) );
resourceProperty.add( currentTimeDocument );
resourceProperty.setCallback( new
org.apache.ws.resource.lifetime.callback.CurrentTimeCallback( ) );
resourceProperty.addChangeListener( metricCapability );
+
+ // init the
{http://ws.apache.org/namespaces/muse/muws-ext-1.xsd}Owner Resource Property
+ resourceProperty = resourcePropertySet.get(HostPropertyQNames.OWNER);
+ org.apache.ws.namespaces.muse.muwsExt1.OwnerDocument prop_owner
= org.apache.ws.namespaces.muse.muwsExt1.OwnerDocument.Factory.newInstance();
+ org.oasisOpen.docs.wsdm.x2004.x12.muws.wsdmMuwsPart2.LangString
oString = LangString.Factory.newInstance( );
+ oString.setStringValue( ExampleConstants.HOST_OWNER);
+ oString.setLang( "en" );
+ prop_owner.setOwner( oString );
+ resourceProperty.add(prop_owner);
+
+ // init the
{http://ws.apache.org/namespaces/muse/muws-ext-1.xsd}CreationTime Resource
Property
+ resourceProperty =
resourcePropertySet.get(HostPropertyQNames.CREATIONTIME);
+ org.apache.ws.namespaces.muse.muwsExt1.CreationTimeDocument
prop_creationtime =
org.apache.ws.namespaces.muse.muwsExt1.CreationTimeDocument.Factory.newInstance();
+ prop_creationtime.setCreationTime(Calendar.getInstance( ));
+ resourceProperty.add(prop_creationtime);
+
}
catch ( Exception e )
{
Modified:
webservices/muse/trunk/src/examples/enterprise/services/host/src/wsdl/host.wsdl
URL:
http://svn.apache.org/viewcvs/webservices/muse/trunk/src/examples/enterprise/services/host/src/wsdl/host.wsdl?rev=227008&r1=227007&r2=227008&view=diff
==============================================================================
---
webservices/muse/trunk/src/examples/enterprise/services/host/src/wsdl/host.wsdl
(original)
+++
webservices/muse/trunk/src/examples/enterprise/services/host/src/wsdl/host.wsdl
Tue Aug 2 07:05:25 2005
@@ -135,6 +135,8 @@
<element ref="ws-ext:ResourceType" minOccurs="1"
maxOccurs="1" />
<element ref="ws-ext:ResourceHostname" minOccurs="1"
maxOccurs="1" />
+ <element ref="ws-ext:CreationTime" minOccurs="1"
maxOccurs="1" />
+ <element ref="ws-ext:Owner" minOccurs="1" maxOccurs="1" />
<!-- SPECIFIC PROPERTIES DEFINED IN HOST.XSD -->
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]