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 "Hawkins, Joel" <Jo...@compuware.com> on 2006/07/25 16:20:19 UTC

Possible Missing Operations on SubscriptionManager?

Help guys, I can't find my Unsubscribe with both hands...
 
I'm trying to get Advertising and Notification working with my OSGi
Bundle manager sample, and when I pull in the WS-BaseNotification-1_3
wsdl I get the following exception:
 
org.apache.muse.ws.addressing.soap.SoapFault: Not all operations were
implemented:
[http://docs.oasis-open.org/wsn/bw-2/Unsubscribe/UnsubscribeRequest,
http://docs.oasis-open.org/wsn/bw-2/Renew/RenewRequest]
      at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabilit
yDefinitions(SimpleResourceDescriptor.java:263)
      at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleReso
urceDescriptor.java:88)
      at
org.apache.muse.core.platform.osgi.descriptor.OSGiDeploymentDescriptor.c
reateResourceDefinitions(OSGiDeploymentDescriptor.java:157)
      at
org.apache.muse.core.platform.osgi.descriptor.OSGiDeploymentDescriptor.l
oad(OSGiDeploymentDescriptor.java:141)
      at
org.apache.muse.core.platform.osgi.OSGiResourceManager.addResourceDefini
tions(OSGiResourceManager.java:410)
 
When I grep the sources, I can't find any implementation for Unsubscribe
or Renew (I'd expect to find them on SimpleSubscriptionManager). Any
ideas? 
 
Here's the operation definitions from the WSDL.
 
   <wsdl:portType name="SubscriptionManager">
      <wsdl:operation name="Renew">
         <wsdl:input  name="RenewRequest"
wsa:Action="http://docs.oasis-open.org/wsn/bw-2/Renew/RenewRequest"
                      message="wsntw:RenewRequest" />
         <wsdl:output name="RenewResponse"
wsa:Action="http://docs.oasis-open.org/wsn/bw-2/Renew/RenewResponse"
                      message="wsntw:RenewResponse" />
         <wsdl:fault  name="ResourceUnknownFault" 
                      message="wsrf-rw:ResourceUnknownFault" />
         <wsdl:fault  name="UnacceptableTerminationTimeFault" 
                      message=
                      "wsntw:UnacceptableTerminationTimeFault" />     
      </wsdl:operation>
      <wsdl:operation name="Unsubscribe">
         <wsdl:input  name="UnsubscribeRequest"
wsa:Action="http://docs.oasis-open.org/wsn/bw-2/Unsubscribe/UnsubscribeR
equest"
                      message="wsntw:UnsubscribeRequest" />
         <wsdl:output name="UnsubscribeResponse"
wsa:Action="http://docs.oasis-open.org/wsn/bw-2/Unsubscribe/UnsubscribeR
esponse"
                      message="wsntw:UnsubscribeResponse" />
         <wsdl:fault  name="ResourceUnknownFault" 
                      message="wsrf-rw:ResourceUnknownFault" />
         <wsdl:fault  name="UnableToDestroySubscriptionFault" 
                      message=
                      "wsntw:UnableToDestroySubscriptionFault" />     
      </wsdl:operation>
</wsdl:portType> 
 
and, of course, my muse.xml snippet:
 
      <resource-type>
            <context-path>/subscription-manager</context-path>
            <wsdl>
 
<wsdl-file>OSGI-INF/wsdl/WS-BaseNotification-1_3.wsdl</wsdl-file>
 
<wsdl-port-type>wsntw:SubscriptionManager</wsdl-port-type>
            </wsdl>
 
<java-id-factory-class>org.apache.muse.core.routing.CounterResourceIdFac
tory</java-id-factory-class>
 
<java-resource-class>org.apache.muse.ws.resource.impl.SimpleWsResource</
java-resource-class>
            <capability>
 
<capability-uri>http://docs.oasis-open.org/wsrf/rlw-2/ImmediateResourceT
ermination</capability-uri>
 
<java-capability-class>org.apache.muse.ws.resource.lifetime.impl.SimpleI
mmediateTermination</java-capability-class>
            </capability>
            <capability>
 
<capability-uri>http://docs.oasis-open.org/wsrf/rlw-2/ScheduledResourceT
ermination</capability-uri>
 
<java-capability-class>org.apache.muse.ws.resource.lifetime.impl.SimpleS
cheduledTermination</java-capability-class>
            </capability>
            <capability>
 
<capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get</capability-ur
i>
 
<java-capability-class>org.apache.muse.ws.resource.properties.get.impl.S
impleGetCapability</java-capability-class>
            </capability>
            <capability>
 
<capability-uri>http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager<
/capability-uri>
 
<java-capability-class>org.apache.muse.ws.notification.impl.SimpleSubscr
iptionManager</java-capability-class>
                  <init-param>
                        <param-name>trace-notifications</param-name>
                        <param-value>true</param-value>
                  </init-param>
            </capability>
      </resource-type>
 
 
Thanks,
Joel
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. 

Re: Possible Missing Operations on SubscriptionManager?

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Hi Joel,

I didn't implement Unsubscribe and Renew because a) time is short, and b) 
they are redundant. I believe that the reason these two operations exist 
is to allow people to implement subscription resources without a 
dependency on WSRF. Subscriptions that are WSRF-based use Destroy for 
Unsubscribe and SetTerminationTime for Renew - the concepts are exactly 
the same, but in each case, the former is based on WSRL. With Muse, all 
resources implement the implied resource pattern, so most of the WS-* 
foundation that one would be looking to avoid when ditching WSRF is 
already present; that being the case, I would advise someone to just add 
in the WSRL capabilities if either of these operations are desired. You're 
already pulling in WSRF for the NotificationProducer impl, so you might as 
well take advantage of that and use WSRL in the subscription resource 
rather than adding duplicate code to the app.

Will using the WSRF-based lifetime methods work for your scenario?

Dan



"Hawkins, Joel" <Jo...@compuware.com> wrote on 07/25/2006 10:20:19 
AM:

> Help guys, I can?t find my Unsubscribe with both hands?
> 
> I?m trying to get Advertising and Notification working with my OSGi 
Bundle 
> manager sample, and when I pull in the WS-BaseNotification-1_3 wsdl I 
get the 
> following exception:
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Not all operations were 
> implemented: [http://docs.oasis-open.
> org/wsn/bw-2/Unsubscribe/UnsubscribeRequest, http://docs.oasis-open.
> org/wsn/bw-2/Renew/RenewRequest]
>       at org.apache.muse.core.descriptor.SimpleResourceDescriptor.
> createCapabilityDefinitions(SimpleResourceDescriptor.java:263)
>       at org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(
> SimpleResourceDescriptor.java:88)
>       at org.apache.muse.core.platform.osgi.descriptor.
> 
OSGiDeploymentDescriptor.createResourceDefinitions(OSGiDeploymentDescriptor.java:157)
>       at 
org.apache.muse.core.platform.osgi.descriptor.OSGiDeploymentDescriptor.load(
> OSGiDeploymentDescriptor.java:141)
>       at 
org.apache.muse.core.platform.osgi.OSGiResourceManager.addResourceDefinitions(
> OSGiResourceManager.java:410)
> 
> When I grep the sources, I can?t find any implementation for Unsubscribe 
or 
> Renew (I?d expect to find them on SimpleSubscriptionManager). Any ideas? 

> 
> Here?s the operation definitions from the WSDL.
> 
>    <wsdl:portType name="SubscriptionManager">
>       <wsdl:operation name="Renew">
>          <wsdl:input  name="RenewRequest" 
wsa:Action="http://docs.oasis-open.
> org/wsn/bw-2/Renew/RenewRequest"
>                       message="wsntw:RenewRequest" />
>          <wsdl:output name="RenewResponse" 
wsa:Action="http://docs.oasis-open.
> org/wsn/bw-2/Renew/RenewResponse"
>                       message="wsntw:RenewResponse" />
>          <wsdl:fault  name="ResourceUnknownFault" 
>                       message="wsrf-rw:ResourceUnknownFault" />
>          <wsdl:fault  name="UnacceptableTerminationTimeFault" 
>                       message=
>                       "wsntw:UnacceptableTerminationTimeFault" /> 
>       </wsdl:operation>
>       <wsdl:operation name="Unsubscribe">
>          <wsdl:input  name="UnsubscribeRequest" 
wsa:Action="http://docs.oasis-
> open.org/wsn/bw-2/Unsubscribe/UnsubscribeRequest"
>                       message="wsntw:UnsubscribeRequest" />
>          <wsdl:output name="UnsubscribeResponse" 
wsa:Action="http://docs.
> oasis-open.org/wsn/bw-2/Unsubscribe/UnsubscribeResponse"
>                       message="wsntw:UnsubscribeResponse" />
>          <wsdl:fault  name="ResourceUnknownFault" 
>                       message="wsrf-rw:ResourceUnknownFault" />
>          <wsdl:fault  name="UnableToDestroySubscriptionFault" 
>                       message=
>                       "wsntw:UnableToDestroySubscriptionFault" /> 
>       </wsdl:operation>
> </wsdl:portType> 
> 
> and, of course, my muse.xml snippet:
> 
>       <resource-type>
>             <context-path>/subscription-manager</context-path>
>             <wsdl>
> <wsdl-file>OSGI-INF/wsdl/WS-BaseNotification-1_3.wsdl</wsdl-file>
> <wsdl-port-type>wsntw:SubscriptionManager</wsdl-port-type>
>             </wsdl>
> 
<java-id-factory-class>org.apache.muse.core.routing.CounterResourceIdFactory
> </java-id-factory-class>
> <java-resource-class>org.apache.muse.ws.resource.impl.SimpleWsResource</
> java-resource-class>
>             <capability>
>                   <capability-uri>http://docs.oasis-open.
> org/wsrf/rlw-2/ImmediateResourceTermination</capability-uri>
> <java-capability-class>org.apache.muse.ws.resource.lifetime.
> impl.SimpleImmediateTermination</java-capability-class>
>             </capability>
>             <capability>
>                   <capability-uri>http://docs.oasis-open.
> org/wsrf/rlw-2/ScheduledResourceTermination</capability-uri>
> <java-capability-class>org.apache.muse.ws.resource.lifetime.
> impl.SimpleScheduledTermination</java-capability-class>
>             </capability>
>             <capability>
> <capability-uri>http://docs.oasis-open.org/wsrf/rpw-2/Get</
> capability-uri>
>                   <java-capability-class>org.apache.muse.ws.resource.
> properties.get.impl.SimpleGetCapability</java-capability-class>
>             </capability>
>             <capability>
>                   <capability-uri>http://docs.oasis-open.
> org/wsn/bw-2/SubscriptionManager</capability-uri>
> <java-capability-class>org.apache.muse.ws.notification.impl.
> SimpleSubscriptionManager</java-capability-class>
>                   <init-param>
>                         <param-name>trace-notifications</param-name>
>                         <param-value>true</param-value>
>                   </init-param>
>             </capability>
>       </resource-type>
> 
> 
> Thanks,
> Joel
> =00The contents of this e-mail are intended for the named addressee 
only. It 
> contains information that may be confidential. Unless you are the named 
> addressee or an authorized designee, you may not copy or use it, or 
disclose 
> it to anyone else. If you received it in error please notify us 
immediately 
> and then destroy it. 

---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org