Author: scamp
Date: Tue Feb 1 11:15:59 2005
New Revision: 149434
URL: http://svn.apache.org/viewcvs?view=rev&rev=149434
Log:
Added subscription service
Added:
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/SubscriptionService.java
Modified:
incubator/hermes/trunk/src/site/content/tutorial/requests/Pause_Subscription.soap
incubator/hermes/trunk/src/site/content/tutorial/requests/Resume_Subscription.soap
incubator/hermes/trunk/src/webapp/WEB-INF/classes/jndi-config.xml
Added:
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/SubscriptionService.java
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/SubscriptionService.java?view=auto&rev=149434
==============================================================================
---
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/SubscriptionService.java
(added)
+++
incubator/hermes/trunk/src/java/org/apache/ws/notification/base/impl/SubscriptionService.java
Tue Feb 1 11:15:59 2005
@@ -0,0 +1,163 @@
+package org.apache.ws.notification.base.impl;
+
+import org.apache.ws.resource.handler.SoapMethodNameMap;
+import org.apache.ws.resource.handler.ServiceSoapMethodNameMap;
+import org.apache.ws.resource.handler.WsrfService;
+import org.apache.ws.resource.ResourceContext;
+import
org.apache.ws.notification.base.v1_2.porttype.SubscriptionManagerPortType;
+import
org.apache.ws.notification.base.v1_2.porttype.impl.SubscriptionManagerPortTypeImpl;
+import
org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.PauseSubscriptionResponseDocument;
+import
org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.PauseSubscriptionDocument;
+import
org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.ResumeSubscriptionResponseDocument;
+import
org.oasisOpen.docs.wsn.x2004.x06.wsnWSBaseNotification12Draft01.ResumeSubscriptionDocument;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * Implementation of the SubscriptionService
+ *
+ * @author Sal Campana
+ */
+public class SubscriptionService implements WsrfService ,
SubscriptionManagerPortType,
+
org.apache.ws.resource.lifetime.v1_2.porttype.ScheduledResourceTerminationPortType,
+
org.apache.ws.resource.properties.v1_2.porttype.GetResourcePropertyPortType,
+
org.apache.ws.resource.lifetime.v1_2.porttype.ImmediateResourceTerminationPortType
+{
+ public static final String TARGET_NSURI =
"http://ws.apache.org/notification/base/service/SubscriptionManager";
+ public static final String TARGET_NSPREFIX = "SubscriptionManager";
+ private ResourceContext m_resourceContext;
+ /**
+ * DOCUMENT_ME
+ */
+ private ServiceSoapMethodNameMap m_methodNameMap;
+
+ /**
+ * DOCUMENT_ME
+ */
+ private boolean m_isInitialized;
+
+ /**
+ * Creates a new [EMAIL PROTECTED] SubscriptionService } object.
+ *
+ * @param resourceContext DOCUMENT_ME
+ */
+ public SubscriptionService( ResourceContext resourceContext )
+ {
+ m_resourceContext = resourceContext;
+ init();
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestQname DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public String getMethodName( QName requestQname )
+ {
+ if ( !m_isInitialized )
+ {
+ init( );
+ }
+
+ return m_methodNameMap.getMethodName( requestQname );
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public ResourceContext getResourceContext( )
+ {
+ return m_resourceContext;
+ }
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public final SoapMethodNameMap getMethodNameMap( )
+ {
+ return m_methodNameMap;
+ }
+
+ /**
+ * DOCUMENT_ME
+ */
+ public void init( )
+ {
+ m_methodNameMap = new ServiceSoapMethodNameMap( getResourceContext(
) );
+ m_isInitialized = true;
+ }
+
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ protected final boolean isInitialized( )
+ {
+ return m_isInitialized;
+ }
+
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeResponseDocument
setTerminationTime(
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.SetTerminationTimeDocument
requestDoc )
+ {
+ return new
org.apache.ws.resource.lifetime.v1_2.porttype.impl.ScheduledResourceTerminationPortTypeImpl(
getResourceContext( ) ).setTerminationTime( requestDoc );
+ }
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyResponseDocument
getResourceProperty(
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceProperties12Draft01.GetResourcePropertyDocument
requestDoc )
+ {
+ return new
org.apache.ws.resource.properties.v1_2.porttype.impl.GetResourcePropertyProvider(
getResourceContext( ) ).getResourceProperty( requestDoc );
+ }
+
+
+ /**
+ * DOCUMENT_ME
+ *
+ * @param requestDoc DOCUMENT_ME
+ *
+ * @return DOCUMENT_ME
+ */
+ public
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyResponseDocument
destroy(
org.oasisOpen.docs.wsrf.x2004.x06.wsrfWSResourceLifetime12Draft01.DestroyDocument
requestDoc )
+ {
+ return new
org.apache.ws.resource.lifetime.v1_2.porttype.impl.ImmediateResourceTerminationPortTypeImpl(
getResourceContext( ) ).destroy( requestDoc );
+ }
+
+ /**
+ * @param requestDoc
+ * @return
+ */
+ public PauseSubscriptionResponseDocument
pauseSubscription(PauseSubscriptionDocument requestDoc)
+ {
+ return new
SubscriptionManagerPortTypeImpl(getResourceContext()).pauseSubscription(requestDoc);
+ }
+
+ /**
+ * @param requestDoc
+ * @return
+ */
+ public ResumeSubscriptionResponseDocument
resumeSubscription(ResumeSubscriptionDocument requestDoc)
+ {
+ return new
SubscriptionManagerPortTypeImpl(getResourceContext()).resumeSubscription(requestDoc);
+
+ }
+}
Modified:
incubator/hermes/trunk/src/site/content/tutorial/requests/Pause_Subscription.soap
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/site/content/tutorial/requests/Pause_Subscription.soap?view=diff&r1=149433&r2=149434
==============================================================================
---
incubator/hermes/trunk/src/site/content/tutorial/requests/Pause_Subscription.soap
(original)
+++
incubator/hermes/trunk/src/site/content/tutorial/requests/Pause_Subscription.soap
Tue Feb 1 11:15:59 2005
@@ -1,11 +1,11 @@
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
-
wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
- xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+
xmlns:sub="http://ws.apache.org/notification/base/service/SubscriptionManager">
<Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
- <wsa:To
mustUnderstand="1">http://localhost:8080/hermes/services/filesystem</wsa:To>
- <wsa:Action
mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
- <fs:ResourceID mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceID>
+ <wsa:To
mustUnderstand="1">http://localhost:8080/hermes/services/SubscriptionManager</wsa:To>
+ <wsa:Action
mustUnderstand="1">http://localhost:8080/hermes/services/SubscriptionManager/yourWsdlRequestName</wsa:Action>
+ <sub:ResourceID
mustUnderstand="1">4623a820-7483-11d9-9a53-fe396408008d</sub:ResourceID>
</Header>
<Body>
Modified:
incubator/hermes/trunk/src/site/content/tutorial/requests/Resume_Subscription.soap
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/site/content/tutorial/requests/Resume_Subscription.soap?view=diff&r1=149433&r2=149434
==============================================================================
---
incubator/hermes/trunk/src/site/content/tutorial/requests/Resume_Subscription.soap
(original)
+++
incubator/hermes/trunk/src/site/content/tutorial/requests/Resume_Subscription.soap
Tue Feb 1 11:15:59 2005
@@ -1,11 +1,11 @@
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/"
-
wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
- xmlns:fs="http://ws.apache.org/resource/example/filesystem">
+
xmlns:wsnt="http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
+
xmlns:sub="http://ws.apache.org/notification/base/service/SubscriptionManager">
<Header xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing">
- <wsa:To
mustUnderstand="1">http://localhost:8080/hermes/services/filesystem</wsa:To>
- <wsa:Action
mustUnderstand="1">http://ws.apache.org/resource/example/filesystem/FileSystemPortType/yourWsdlRequestName</wsa:Action>
- <fs:ResourceID mustUnderstand="1">/dev/vg00/lvol1</fs:ResourceID>
+ <wsa:To
mustUnderstand="1">http://localhost:8080/hermes/services/SubscriptionManager</wsa:To>
+ <wsa:Action
mustUnderstand="1">http://localhost:8080/hermes/services/SubscriptionManager/yourWsdlRequestName</wsa:Action>
+ <sub:ResourceID
mustUnderstand="1">4623a820-7483-11d9-9a53-fe396408008d</sub:ResourceID>
</Header>
<Body>
Modified: incubator/hermes/trunk/src/webapp/WEB-INF/classes/jndi-config.xml
URL:
http://svn.apache.org/viewcvs/incubator/hermes/trunk/src/webapp/WEB-INF/classes/jndi-config.xml?view=diff&r1=149433&r2=149434
==============================================================================
--- incubator/hermes/trunk/src/webapp/WEB-INF/classes/jndi-config.xml (original)
+++ incubator/hermes/trunk/src/webapp/WEB-INF/classes/jndi-config.xml Tue Feb
1 11:15:59 2005
@@ -51,7 +51,7 @@
<resourceParams>
<parameter>
<name>serviceClassName</name>
-
<value>org.apache.ws.notification.base.service.SubscriptionService</value>
+
<value>org.apache.ws.notification.impl.service.SubscriptionService</value>
</parameter>
<parameter>
<name>resourceClassName</name>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]