Well I figured out that I had it all wrong thanks to you guys, but it seems
that apart from the SubscriptionManager stuff that needs to be added to the
muse.xml, I also had to add the following statement into the service.xml
<serviceGroup>
<service name="WsResource">
...
<actionMapping>http://docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</actionMapping>
</operation>
</service>
....
</serviceGroup>
With this part I can now utilize the wsn-consumer example to test the
notifications sent from my WSDM service, I'm not sure if wsdl2java was supposed
to have entered this into my service.xml file or if this was intended to be
manually entered.
Sincerely
Lenni
British Telecommunications plc
Registered office: 81 Newgate Street London EC1A 7AJ
Registered in England no. 1800000
This electronic message contains information from British Telecommunications
plc which may be privileged or confidential. The information is intended to be
for the use of the individual(s) or entity named above. If you are not the
intended recipient be aware that any disclosure, copying, distribution or use
of the contents of this information is prohibited. If you have received this
electronic message in error, please notify us by telephone or email (to the
numbers or address above) immediately.
Activity and use of the British Telecommunications plc email system is
monitored to secure its effective operation and for other lawful business
purposes. Communications using this system will also be monitored and may be
recorded to secure effective operation and for other lawful business purposes.
-----Original Message-----
From: Daniel Jemiolo [mailto:[EMAIL PROTECTED]
Sent: 22 November 2006 22:14
To: [email protected]
Subject: Re: Notification producer problems.
Jose has it right - if you subscribe() to the producer resource, it will
create an instance of the SubscriptionManager resource and return the EPR
for that resource. The SubscriptionManager resources represent the
already-created subscriptions, you cannot subscribe() with them. Of
course, when you want to end the subscription, *then* you will send a
message to the SubscriptionManager resource (WS-RL Destroy). WS-N's
pub-sub model can be a bit confusing that way.
Dan
"José Antonio Sánchez" <[EMAIL PROTECTED]> wrote on 11/22/2006 12:32:27
PM:
> You cannot subscribe to the subscription manager because it's not a
> Notification Producer resource. You have to subscribe to your own
> custom service, so that message needs to be sent to your service's
> endpoint, not the subscription manager's endpoint.
>
> On 11/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> >
> > While making an attempt at making a custom WSDM service, I ran into a
> problem with the SubscriptionManager (after adding the needed lines to
the muse.xml):
> >
> > *** call ***
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soap:Envelope
xmlns:soap="http://www.w3.org/2003/05/soap-envelope">
> > <soap:Header>
> > <wsa:To
xmlns:wsa="http://www.w3.org/2005/08/addressing">http:
> //localhost:8080/mwsng/services/SubscriptionManager</wsa:To>
> > <wsa:Action
xmlns:wsa="http://www.w3.org/2005/08/addressing">http:
>
//docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
> > <wsa:MessageID
xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">uuid:d3d21998-6468-b4bb-7952-41a330fa34d4</wsa:MessageID>
> > <wsa:From xmlns:wsa="http://www.w3.org/2005/08/addressing">
> > <wsa:Address>http://www.w3.
> org/2005/08/addressing/role/anonymous</wsa:Address>
> > </wsa:From>
> > </soap:Header>
> > <soap:Body>
> > <wsnt:Subscribe
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2">
> > <wsnt:ConsumerReference>
> > <wsa:Address
xmlns:wsa="http://www.w3.org/2005/08/addressing
> ">http://localhost:8080/wsn-consumer/services/consumer</wsa:Address>
> > </wsnt:ConsumerReference>
> > </wsnt:Subscribe>
> > </soap:Body>
> > </soap:Envelope>
> >
> > *** response ***
> > <?xml version='1.0' encoding='UTF-8'?>
> > <soapenv:Envelope xmlns:wsa="http://www.w3.org/2005/08/addressing"
xmlns:soapenv="
> http://www.w3.org/2003/05/soap-envelope">
> > <soapenv:Header>
> > <wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>
> > <wsa:ReplyTo>
> > <wsa:Address>http://www.w3.org/2005/08/addressing/none</wsa:Address>
> > </wsa:ReplyTo>
> >
<wsa:MessageID>urn:uuid:BC2DF2D9F9D97EE7ED116421532103091</wsa:MessageID>
> > <wsa:Action>http://docs.oasis-open.
> org/wsn/bw-2/NotificationProducer/SubscribeRequest</wsa:Action>
> > <wsa:RelatesTo wsa:RelationshipType="http://www.w3.
>
org/2005/08/addressing/reply">uuid:d3d21998-6468-b4bb-7952-41a330fa34d4</wsa:RelatesTo>
> > </soapenv:Header>
> > <soapenv:Body>
> > <soap:Fault xmlns:tns="http://ws.apache.org/axis2"
xmlns:soap="
> http://www.w3.org/2003/05/soap-envelope">
> > <soap:Code>
> > <soap:Value>soap:Receiver</soap:Value>
> > </soap:Code>
> > <soap:Reason>
> > <soap:Text>[ID = 'ActionNotSupported'] The resource at
> 'SubscriptionManager' does not expose an operation with the WS-Action
'http:
> //docs.oasis-open.org/wsn/bw-2/NotificationProducer/SubscribeRequest'
through
> any of its capabilities.</soap:Text>
> > </soap:Reason>
> > </soap:Fault>
> > </soapenv:Body>
> > </soapenv:Envelope>
> >
> > *** ***
> >
> > I've made sure to add all the requested .wsdl and .xsd files from the
wsn-
> producer, I should note though that the client is created with the
-proxy
> option in wsdl2java, not sure if that has any issues with the Subscribe
function.
> >
> > -----Original Message-----
> > From: José Antonio Sánchez [mailto:[EMAIL PROTECTED]
> > Sent: 15 November 2006 16:04
> > To: [email protected]
> > Subject: Re: Notification producer problems.
> >
> > I was just sending my second message when saw your response.
> > Thanks, you're fast!
> >
> > On 11/15/06, Daniel Jemiolo <[EMAIL PROTECTED]> wrote:
> > > You forgot to add the namespace declaration for 'wsntw' in your
muse.xml
> > > file. You are using this prefix on this line:
> > >
> > > <wsdl-port-type>wsntw:SubscriptionManager</wsdl-port-type>
> > >
> > > so make sure that you have this in your muse.xml file:
> > >
> > > xmlns:wsntw="http://docs.oasis-open.org/wsn/bw-2"
> > >
> > > How did I know this? Well, for one, I've made the mistake many times
> > > myself. :) But also, whenever Muse logs a message or error
involving
> > > something that should be a qualified name (and in XML, almost
everything
> > > is a qualified name), it will use the full QName. so, when I saw
> > > 'SubscriptionManager' instead of
> > > '{http://docs.oasis-open.org/wsn/bw-2}SubscriptionManager', I
realized the
> > > error was a name resolution problem.
> > >
> > > We should add a note to the instructions to make sure this is done.
I'm
> > > sorry there isn't a better answer than that - the problem with using
> > > QNames in element text is that schema validators won't catch these
kinds
> > > of errors.
> > >
> > > Dan
> > >
> > >
> > > "José Antonio Sánchez" <[EMAIL PROTECTED]> wrote on 11/15/2006
10:49:04
> > > AM:
> > >
> > > > I'm developing a custom WSDM service and I'm using it as a
> > > > Notification Producer so, in order to use it and just like the
> > > > tutorial describes, I have added the following to the muse.xml
file:
> > > >
> > > > <resource-type>
> > > > <context-path>SubscriptionManager</context-path>
> > > > <wsdl>
> > > > <wsdl-file>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://schemas.xmlsoap.
> > > > org/ws/2004/09/mex/GetMetadata</capability-uri>
> > > > <java-capability-class>org.apache.muse.ws.metadata.impl.
> > > > SimpleMetadataExchange</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/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/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>
> > > >
> > > > Also, I have copied all of the WSRF, WSN, and WSDM xsd and wsdl
files
> > > > to the wsdl directory (just to be sure). The problem is that, when
I
> > > > try to invoke my service, I get an error 500 and the catalina.out
log
> > > > shows this:
> > > >
> > > > java.lang.RuntimeException: [ID = 'PortTypeNotFound'] The WSDL
file
> > > >
> > >
'/opt/apache-tomcat-5.5.15/webapps/TestService/WEB-INF/services/muse/wsdl/WS-
> > > > BaseNotification-1_3.wsdl'
> > > > does not have a portType named SubscriptionManager.
> > > > at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.
> > > > getWsdlOperations(SimpleResourceDescriptor.java:371)
> > > > at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.
> > > > createCapabilityDefinitions(SimpleResourceDescriptor.java:80)
> > > > at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.
> > > > load(SimpleResourceDescriptor.java:397)
> > > > at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.
> > > > createResourceDefinitions(SimpleDeploymentDescriptor.java:72)
> > > > at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.
> > > > load(SimpleDeploymentDescriptor.java:171)
> > > > at org.apache.muse.core.platform.AbstractIsolationLayer.
> > > > initialize(AbstractIsolationLayer.java:144)
> > > > at org.apache.muse.core.platform.axis2.AxisIsolationLayer.
> > > > setOperationContext(AxisIsolationLayer.java:138)
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
> > > > at
> > >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> > > > at sun.reflect.DelegatingMethodAccessorImpl.
> > > > invoke(DelegatingMethodAccessorImpl.java:25)
> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > > at org.apache.axis2.engine.DependencyManager.
> > > > configureBusinessLogicProvider(DependencyManager.java:70)
> > > > at org.apache.axis2.receivers.RawXMLINOutMessageReceiver.
> > > > invokeBusinessLogic(RawXMLINOutMessageReceiver.java:79)
> > > > at
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.
> > > > receive(AbstractInOutSyncMessageReceiver.java:39)
> > > > at
> > > org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:504)
> > > > at org.apache.axis2.transport.http.HTTPTransportUtils.
> > > > processHTTPPostRequest(HTTPTransportUtils.java:324)
> > > > at
> > >
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:234)
> > > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
> > > > at
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
> > > > at org.apache.catalina.core.ApplicationFilterChain.
> > > > internalDoFilter(ApplicationFilterChain.java:252)
> > > > at org.apache.catalina.core.ApplicationFilterChain.
> > > > doFilter(ApplicationFilterChain.java:173)
> > > > at org.apache.catalina.core.StandardWrapperValve.
> > > > invoke(StandardWrapperValve.java:213)
> > > > at org.apache.catalina.core.StandardContextValve.
> > > > invoke(StandardContextValve.java:178)
> > > > at
> > >
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> > > > at
> > >
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> > > > at org.apache.catalina.core.StandardEngineValve.
> > > > invoke(StandardEngineValve.java:107)
> > > > at
> > >
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> > > > at
> > >
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> > > > at org.apache.coyote.http11.
> > > > Http11BaseProtocol$Http11ConnectionHandler.
> > > > processConnection(Http11BaseProtocol.java:667)
> > > > at org.apache.tomcat.util.net.PoolTcpEndpoint.
> > > > processSocket(PoolTcpEndpoint.java:527)
> > > > at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.
> > > > runIt(LeaderFollowerWorkerThread.java:80)
> > > > at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.
> > > > run(ThreadPool.java:684)
> > > > at java.lang.Thread.run(Thread.java:595)
> > > >
> > > > Looking at the '/opt/apache-tomcat-5.5.15/webapps/TestService/WEB-
> > > > INF/services/muse/wsdl/WS-BaseNotification-1_3.wsdl'
> > > > file (attached) I see clearly a SubscriptionManager port type so I
> > > > don't know what's wrong.
> > > >
> > > >
> > > > --
> > > > Saludos.
> > > > José Antonio Sánchez
> > > > [attachment "WS-BaseNotification-1_3.wsdl" deleted by Daniel
> > > > Jemiolo/Durham/IBM]
> > > >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> >
> > --
> > Saludos.
> > José Antonio Sánchez
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> Saludos.
> José Antonio Sánchez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]