You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-dev@ws.apache.org by sc...@apache.org on 2005/04/05 18:13:22 UTC
svn commit: r160192 - in incubator/muse/trunk/src/site/content/interop: lib/
src/java/org/apache/ws/resource/example/ src/java/org/everest/
src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/
Author: scamp
Date: Tue Apr 5 09:13:21 2005
New Revision: 160192
URL: http://svn.apache.org/viewcvs?view=rev&rev=160192
Log: (empty)
Added:
incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
Modified:
incubator/muse/trunk/src/site/content/interop/lib/weatherws-xbeans.jar
incubator/muse/trunk/src/site/content/interop/src/java/org/everest/AbstractWeatherStationSoapService.java
incubator/muse/trunk/src/site/content/interop/src/java/org/everest/WeatherStationSoapService.java
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationHome.java
incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
Modified: incubator/muse/trunk/src/site/content/interop/lib/weatherws-xbeans.jar
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/lib/weatherws-xbeans.jar?view=diff&r1=160191&r2=160192
==============================================================================
Binary files - no diff available.
Added: incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java?view=auto&rev=160192
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java (added)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/apache/ws/resource/example/InteropConstants.java Tue Apr 5 09:13:21 2005
@@ -0,0 +1,15 @@
+package org.apache.ws.resource.example;
+
+/**
+ * @author Sal Campana
+ */
+public interface InteropConstants
+{
+ String SERVICES_URL = "http://localhost:8080/muse/services";
+ String WEATHERSTATION_SERVICE_NAME = "weatherstation";
+ String BLACKBERRY_SERVICE_NAME = "blackberry";
+
+ String WEATHERSTATION_KEY1 = "weather1";
+ String WEATHERSTATION_KEY2 = "weather2";
+ String FCCID="weatherIsNice";
+}
Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/everest/AbstractWeatherStationSoapService.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everest/AbstractWeatherStationSoapService.java?view=diff&r1=160191&r2=160192
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/everest/AbstractWeatherStationSoapService.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/everest/AbstractWeatherStationSoapService.java Tue Apr 5 09:13:21 2005
@@ -2,9 +2,9 @@
package org.everest;
import org.apache.ws.resource.ResourceContext;
-import org.apache.ws.resource.handler.SoapMethodNameMap;
-import org.apache.ws.resource.handler.WsrfService;
import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+
import javax.xml.namespace.QName;
/**
@@ -86,6 +86,6 @@
-public abstract GetManageabilityReferencesResponseDocument getManageabilityReferences (GetManageabilityReferencesDocument request);
+public abstract org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.GetManageabilityReferencesResponseDocument getManageabilityReferences (org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.GetManageabilityReferencesDocument request);
}
Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/everest/WeatherStationSoapService.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everest/WeatherStationSoapService.java?view=diff&r1=160191&r2=160192
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/everest/WeatherStationSoapService.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/everest/WeatherStationSoapService.java Tue Apr 5 09:13:21 2005
@@ -1,10 +1,17 @@
package org.everest;
import org.apache.ws.resource.ResourceContext;
+import org.apache.ws.resource.example.InteropConstants;
+import org.apache.ws.util.XmlBeanUtils;
import org.apache.xmlbeans.XmlObject;
-import org.apache.xmlbeans.XmlException;
+import org.everestWeather.wsdm.samples.x2005.x04.schema.WeatherstationPropertyQNames;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.AttributedURI;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.EndpointReferenceType;
+import org.xmlsoap.schemas.ws.x2004.x08.addressing.ReferencePropertiesType;
+import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.GetManageabilityReferencesDocument;
+import org.oasisOpen.docs.wsdm.x2004.x12.mows.wsdmMows.GetManageabilityReferencesResponseDocument;
-import javax.xml.rpc.JAXRPCException;
+import javax.xml.namespace.QName;
/**
* This class should be generated ONCE (and not overwritten) to maintain user-added code.
@@ -44,11 +51,35 @@
return m_resourceContext;
}
-
- public org.everest.GetCurrentTemperatureResponseDocument GetCurrentTemperature( org.everest.GetCurrentTemperatureDocument requestDoc )
- {
- //todo implement
- return null;
+ public GetManageabilityReferencesResponseDocument getManageabilityReferences(GetManageabilityReferencesDocument request)
+ {
+ GetManageabilityReferencesResponseDocument getManageabilityReferencesResponseDocument = GetManageabilityReferencesResponseDocument.Factory.newInstance();
+ GetManageabilityReferencesResponseDocument.GetManageabilityReferencesResponse getManageabilityReferencesResponse = getManageabilityReferencesResponseDocument.addNewGetManageabilityReferencesResponse();
+ QName resourceKeyName = QName.valueOf("{"+WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
+ EndpointReferenceType endpointReferenceType = getManageabilityReferencesResponse.addNewManageabilityEndpointReference();
+ AttributedURI attributedURI = endpointReferenceType.addNewAddress();
+ attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
+ ReferencePropertiesType referencePropertiesType = endpointReferenceType.addNewReferenceProperties();
+ XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType,resourceKeyName);
+ XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);
+
+ EndpointReferenceType endpointReferenceType2 = getManageabilityReferencesResponse.addNewManageabilityEndpointReference();
+ attributedURI = endpointReferenceType2.addNewAddress();
+ attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
+ referencePropertiesType = endpointReferenceType2.addNewReferenceProperties();
+ key1 = XmlBeanUtils.addChildElement(referencePropertiesType,resourceKeyName);
+ XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY2);
+
+ return getManageabilityReferencesResponseDocument;
+ }
+
+ public org.everest.GetCurrentTemperatureResponseDocument GetCurrentTemperature( org.everest.GetCurrentTemperatureDocument requestDoc )
+ {
+ GetCurrentTemperatureResponseDocument getCurrentTemperatureResponseDocument = GetCurrentTemperatureResponseDocument.Factory.newInstance();
+ GetCurrentTemperatureResponseDocument.GetCurrentTemperatureResponse getCurrentTemperatureResponse = getCurrentTemperatureResponseDocument.addNewGetCurrentTemperatureResponse();
+ Double aDouble = new Double(101);
+ getCurrentTemperatureResponse.setGetCurrentTemperatureResult(aDouble.doubleValue());
+ return getCurrentTemperatureResponseDocument;
}
Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationHome.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationHome.java?view=diff&r1=160191&r2=160192
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationHome.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationHome.java Tue Apr 5 09:13:21 2005
@@ -7,6 +7,7 @@
import org.apache.ws.resource.ResourceKey;
import org.apache.ws.resource.ResourceUnknownException;
import org.apache.ws.resource.JndiConstants;
+import org.apache.ws.resource.example.InteropConstants;
import org.apache.ws.resource.impl.AbstractResourceHome;
import java.io.Serializable;
@@ -53,14 +54,14 @@
/**
* Determine if the passed-in key is, in fact, something we expect.
*/
- if (id.equals("weather1") || id.equals("weather2"))
+ if (id.equals(InteropConstants.WEATHERSTATION_KEY1) || id.equals(InteropConstants.WEATHERSTATION_KEY2))
{
try
{
resource = createInstance(key);
FCCIDDocument fccidDocument = FCCIDDocument.Factory.newInstance();
//set the same value for both instances
- fccidDocument.setFCCID("weatherIsNice");
+ fccidDocument.setFCCID(InteropConstants.FCCID);
((WeatherstationResource)resource).setFCCID(fccidDocument);
}
catch (Exception e)
Modified: incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java
URL: http://svn.apache.org/viewcvs/incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java?view=diff&r1=160191&r2=160192
==============================================================================
--- incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java (original)
+++ incubator/muse/trunk/src/site/content/interop/src/java/org/everestWeather/wsdm/samples/x2005/x04/schema/WeatherstationResource.java Tue Apr 5 09:13:21 2005
@@ -16,6 +16,7 @@
import org.apache.ws.notification.topics.TopicSpace;
import org.apache.ws.notification.topics.impl.TopicSpaceImpl;
import org.apache.ws.resource.properties.ResourceProperty;
+import org.apache.ws.resource.example.InteropConstants;
import org.apache.ws.util.XmlBeanUtils;
import org.apache.xmlbeans.GDurationBuilder;
import org.apache.xmlbeans.XmlObject;
@@ -67,7 +68,6 @@
*/
public static final org.apache.ws.notification.base.v1_2.impl.WsnNamespaceVersionHolderImpl SPEC_NAMESPACE_SET = new org.apache.ws.notification.base.v1_2.impl.WsnNamespaceVersionHolderImpl();
- private String SERVICES_URL = "http://localhost:8080/muse/services";
/**
* Initializes this resource's state (properties, etc.).
*/
@@ -226,25 +226,25 @@
//relationshipType.setName( "" );//set name of relationship type OPTIONAL
//relationshipType.setAccessEndpointReference();//need EPR optional
- QName qName = QName.valueOf("{http://everest-weather.org/wsdm/samples/2005/04/schema}ResourceID");
+ QName qName = QName.valueOf("{"+WeatherstationPropertyQNames.FCCID.getNamespaceURI() + "}ResourceID");
//add a participant
RelationshipParticipantType relationshipParticipantType = relationshipType.addNewParticipant();
- relationshipParticipantType.setResourceId( "urn:weather1" );
+ relationshipParticipantType.setResourceId( "urn:" + InteropConstants.WEATHERSTATION_KEY1 );
relationshipParticipantType.setRole( "urn://parent" );//uri
EndpointReferenceType manageabilityEndpointReferenceType = relationshipParticipantType.addNewManageabilityEndpointReference();
- manageabilityEndpointReferenceType.addNewAddress().setStringValue(SERVICES_URL+"/weatherstation");
+ manageabilityEndpointReferenceType.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
ReferencePropertiesType referencePropertiesType = manageabilityEndpointReferenceType.addNewReferenceProperties();
XmlObject key1 = XmlBeanUtils.addChildElement(referencePropertiesType,qName);
- XmlBeanUtils.setValue(key1, "weather1");
+ XmlBeanUtils.setValue(key1, InteropConstants.WEATHERSTATION_KEY1);
RelationshipParticipantType relationshipParticipantType2 = relationshipType.addNewParticipant();
- relationshipParticipantType2.setResourceId( "urn:weather2" );//spec optional
+ relationshipParticipantType2.setResourceId( "urn:" + InteropConstants.WEATHERSTATION_KEY2 );//spec optional
relationshipParticipantType2.setRole( "urn://child1" );//uri
EndpointReferenceType manageabilityEndpointReferenceType2 = relationshipParticipantType.addNewManageabilityEndpointReference();
- manageabilityEndpointReferenceType2.addNewAddress().setStringValue(SERVICES_URL+"/weatherstation");
+ manageabilityEndpointReferenceType2.addNewAddress().setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.WEATHERSTATION_SERVICE_NAME);
ReferencePropertiesType referencePropertiesType2 = manageabilityEndpointReferenceType2.addNewReferenceProperties();
XmlObject key2 = XmlBeanUtils.addChildElement(referencePropertiesType2,qName);
- XmlBeanUtils.setValue(key2, "weather2");
+ XmlBeanUtils.setValue(key2, InteropConstants.WEATHERSTATION_KEY2);
//add a relationshiptype
RelationshipTypeType relationshipTypeType = relationshipType.addNewType();
@@ -274,7 +274,7 @@
EndpointReferenceDocument endpointReferenceDocument = EndpointReferenceDocument.Factory.newInstance();
EndpointReferenceType endpointReferenceType = endpointReferenceDocument.addNewEndpointReference();//temporary
AttributedURI attributedURI = endpointReferenceType.addNewAddress();
- attributedURI.setStringValue(SERVICES_URL+"/blackberry");
+ attributedURI.setStringValue(InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME);
//endpointReferenceDocument.setEndpointReference(null);//todo need the real epr for interop
resourceProperty.add( endpointReferenceDocument );
resourceProperty.addChangeListener( mowsIdentificationCapability );
@@ -282,7 +282,7 @@
resourceProperty = resourcePropertySet.get( WeatherstationPropertyQNames.ENDPOINTDESCRIPTIONS );
EndpointDescriptionsDocument endpointDescriptionsDocument = EndpointDescriptionsDocument.Factory.newInstance();
EndpointDescriptionsDocument.EndpointDescriptions endpointDescriptions = endpointDescriptionsDocument.addNewEndpointDescriptions();
- endpointDescriptions.addDescription( SERVICES_URL+ "/blackberry?wsdl" );
+ endpointDescriptions.addDescription( InteropConstants.SERVICES_URL + "/" + InteropConstants.BLACKBERRY_SERVICE_NAME+"?wsdl" );
resourceProperty.add( endpointDescriptionsDocument );
resourceProperty.addChangeListener( mowsIdentificationCapability );
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org