You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-user@ws.apache.org by Rosberg Mattias <Ma...@tetrapak.com> on 2007/02/05 08:40:11 UTC

wsn-producer/consumer example

I have tried to get the wsn-producer/consumer sample to work without success. I have done the following:

1. Downloaded 2.1.0 distribution and ran update_install.

2. Added row <resource-type use-router-persistence="true"> in wsn-consumer muse.xml

3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old (2.1.0) jars in modules folders with snapshot 2.2.0 jars.

4. Rebuild wars for wsn-consumer and wsn-producer.

5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 

I still get the following error:

INFO: [ID = 'LastPublishFailed'] The last notification published via wsnt:Notify
 failed to reach its destination. The consumer may be unavailable. The original
error was: null
2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1 run
INFO: Waiting 10 seconds before sending message...

Any ideas?

/Mattias


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Thanks if you ever get that example to work please post the solution. 

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Monday, February 05, 2007 7:59 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

If you follow the instructions for "Eclipse Development" described here


http://ws.apache.org/muse/source-code.html

you get a separate project in Eclipse for every muse jar-file. You can
then export each project as a jar-file and replace the ones found in
your MUSE_HOME/modules subdirectories. This way you get the latest
bugfixes and updates.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Mon 2/5/2007 1:45 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
You seemed to get farther than I did with the example.  I been able to
find on the internet that you need to add (#2) below, but your #3.
Created new snapshot from SVN.  Could you explain? 

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Monday, February 05, 2007 2:40 AM
To: muse-user@ws.apache.org
Subject: wsn-producer/consumer example

I have tried to get the wsn-producer/consumer sample to work without
success. I have done the following:

1. Downloaded 2.1.0 distribution and ran update_install.

2. Added row <resource-type use-router-persistence="true"> in
wsn-consumer muse.xml

3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
(2.1.0) jars in modules folders with snapshot 2.2.0 jars.

4. Rebuild wars for wsn-consumer and wsn-producer.

5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 

I still get the following error:

INFO: [ID = 'LastPublishFailed'] The last notification published via
wsnt:Notify
 failed to reach its destination. The consumer may be unavailable. The
original
error was: null
2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
run
INFO: Waiting 10 seconds before sending message...

Any ideas?

/Mattias


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




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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
The client trace you're seeing is for the notifications that are being 
sent from producer to consumer. The setTrace() method in your test client 
just shuts off tracing for that client.

The tracing of notifications is handled by a separate config flag in 
muse.xml (since you can't modify the client code in the implementation). 
Open muse.xml and look for the subscription resource type - the 
SubscriptionManager capability should have an <init-param/> named 
'trace-notifications'. Make it 'false'. More details here:

http://ws.apache.org/muse/docs/2.1.0/manual/capabilities/wsn-sub.html



"Callner, David A." <dc...@mitre.org> wrote on 03/07/2007 11:19:39 AM:

> How do you turn off the [CLIENT TRACE] messages.  In the TestClient
> I've setTrace to false for both the producer and client.  I'm still
> getting a [CLIENT TRACE] in my catalina.out file.  Any ideas? 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Thursday, February 22, 2007 10:28 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I got it working.  I didn't do any extra steps the downloaded
> producer/consumer under samples has the class files under
> WEB-INF/classes.  Also I had to go back to java version 1.5.03-b07 in
> order for it to work.  Our environment has 15+ different versions of
> java so everybody is happy and it just made me really unhappy.  I've
> never run into this problem before, normally I get errors Major/Minor,
> errors, never these ClassNotFound exceptions that don't really tell
> what the problem is because the class files are there.  Thanks for all
> your help and I'm sure I'll be asking again soon. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Thursday, February 22, 2007 10:24 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> So... the samples do work, but you are having problems with your own 
> project. You generated code from wsdl2java (using the -axis2 option), 
> filled in the Java source files, ran 'ant', and deployed the WAR? It 
> sounds like you added another step (copying .class files from another 
> project into WEB-INF/classes?). Is that right? We test Muse on JDK
> 1.4.2 
> and 1.5 (Sun and IBM), but no one has tried 1.6.
> 
> The samples use the Mini SOAP engine, and they're just packaged up
> using 
> Ant (because the source code is already completed). If you run
> wsdl2java 
> with the -axis2 or -mini flags and run 'ant' on the build.xml file, it 
> will compile your code into a .jar file and add it to WEB-INF/lib; 
> re-running Ant re-compiles and re-copies the .jar. We can certainly put
> a 
> warning in the troubleshooting section about not adding additional 
> code/libraries via WEB-INF/classes for Axis2.
> 
> Dan
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/22/2007 09:42:03
> AM:
> 
> > Ok that email was complete garbage.  I have no idea how I got it
> work.
> > I must have compiled it with a different version of java, because I
> > cannot recompile and generate a war file that will work.  I've kept
> > around my one that works.  Does MUSE only work with a certain version
> > of java and javac?  I've tried 1.6, 1.5, etc.  I have no idea what
> > version I used to create the war file that works. 
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > Sent: Thursday, February 22, 2007 8:42 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Dan I had worked my own producer/consumer which is based on the wsn
> > producer/consumer and I seem to have it working.  The difference is
> > that I generated the code from the wsdl and when I deployed the war
> > file it has a different structure than the wsn producer/consumer that
> > you can download.  There is no WEB-INF/classes that actually has the
> > classes, the classes are jar'd up and put in the WEB-INF/lib
> directory.
> > I was reading online as well and it says that the classloader will
> not
> > find classes in the WEB-INF/classes area.  This seemed to fix my
> > problem.  I'm using Axis2.  So question, how is anyone able to get
> that
> > example to work?  I think somebody should add that to the website so
> > others don't have to go through the same hell I've been through. 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 6:33 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > JIRA is our bug tracker:
> > 
> >         http://ws.apache.org/muse/issue-tracking.html
> > 
> > A few other people have replied who did get the samples working 
> > successfully - right now I'm inclined to believe it's just a problem
> > with 
> > a small configuration change or something. Here's what I did to
> re-test
> > 
> > the samples:
> > 
> > 0. Download a clean muse-2.1.0-bin distribution
> > 
> > 1. /bin/update-install.bat
> > 
> > 2. cd /samples/j2ee/wsn-producer
> > 
> > 3. ant
> > 
> > 4. copy wsn-producer.war to TOMCAT_HOME/webapps
> > 
> > 5. cd ../wsn-consumer
> > 
> > 6. Added use-router-persistence attribute to this project's muse.xml
> > file 
> > (this bug is fixed in the 2.2 build):
> > 
> >         <resource-type use-router-persistence="true">
> > 
> > 7. ant
> > 
> > 8. copy wsn-consumer.war to TOMCAT_HOME/webapps
> > 
> > 9. start Tomcat
> > 
> > 10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient
> > 
> > 11. confirm output in server console
> > 
> > 
> > How are your steps different? Please include as much detail as
> > possible, 
> > especially with any modifications you might have made for your
> project.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
> > PM:
> > 
> > > What is JIRA?  Do you have any idea what this might be?  Has
> anybody
> > > been able to get the wsn-producer/wsn-consumer working? 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 21, 2007 3:51 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > well, the first thing it tells me is that the wsn-producer sample,
> > not 
> > > wsn-consumer, is throwing the exception - that's where the class is
> > > from 
> > > in that scenario. I'll have to try out a few configurations to see
> if
> > I
> > > 
> > > can reproduce it. Attach your WAR file to JIRA if you can...
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
> 03:31:50
> > > PM:
> > > 
> > > > Yes.  I'm not sure what's going on,but this is the exception
> that's
> > > > thrown in the catalina.out file.  Any ideas?  Thanks for your
> help.
> > 
> > > > 
> > > > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
> > class
> > > > specified was not found:
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > > > Make sure the correct .class or .jar file is in the classpath.
> > > >    at
> > > > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > > > entationClass(SimpleCapabilityDescriptor.java:49)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > > > apabilityDescriptor.java:90)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > > > tyDefinitions(SimpleResourceDescriptor.java:95)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > > > ourceDescriptor.java:397)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > > > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > > > eploymentDescriptor.java:171)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:144)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:799)
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 21, 2007 2:33 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > just to clarify - you say you're deploying the wsn-consumer
> sample
> > > > as-is 
> > > > (run 'ant' and copy over WAR) and it's not receiving the
> > > notifications?
> > > > 
> > > > are you deploying it in the same container as the producer? if
> not,
> > > did
> > > > 
> > > > you make sure to change the port number used in the consumer's
> URI
> > > (in
> > > > the 
> > > > test client)?
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
> > 12:16:58
> > > > PM:
> > > > 
> > > > >  The example I thought worked didn't.  When I view the
> > catalina.out
> > > > > file
> > > > > the wsn-consumer does not receive publish updates, it seems to
> > > > > subscribe correctly.  A JavaClassNotFound exception is thrown
> > when
> > > > > trying to access ConsumerCapabilityImpl.class.  Everything
> seems
> > to
> > > > be
> > > > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > from within the NotificationMessageListener API, you'll get a 
> > > > > NotificationMessage object(s) representing the message. The 
> > > > > NotificationMessage will have getter methods for things like
> the
> > > > > producer 
> > > > > EPR, topic, etc. It also has the XML payload, which is custom
> to
> > > your
> > > > 
> > > > > scenario. If you are using WSDM's WEF for formatting your
> events,
> > > you
> > > > > can 
> > > > > convert the payload XML into a ManagementEvent object like so:
> > > > > 
> > > > > public void process(NotificationMessage msg)
> > > > > {
> > > > >     WefFactory factory = new SimpleWefFactory();
> > > > > 
> > > > >     Iterator i = msg.getMessageContent().iterator();
> > > > > 
> > > > >     while (i.hasNext())
> > > > >     {
> > > > >         Element eventXML = (Element)i.next();
> > > > >         ManagementEvent event = factory.createEvent(eventXML);
> > > > >         // use getters to process event data
> > > > >     }
> > > > > }
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > > 12:59:44
> > > > > PM:
> > > > > 
> > > > > > No I do not want to write any HTTP server myself.  I want to
> > take
> > > > the
> > > > > > received SOAP messages from the consumer web service convert
> > > those
> > > > > into
> > > > > > Java Objects and forward them to my non webapp.  I can just
> > > create
> > > > a
> > > > > > socket and send it that way I was just hoping that maybe I
> > could
> > > > just
> > > > > > use the MUSE API to do this since I can set up services from
> a
> > > non
> > > > > > webapp. 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I don't see how you would receive the messages on a non-web
> > > app...
> > > > > > unless 
> > > > > > you're writing your own little server and parsing the HTTP
> > > > yourself.
> > > > > If
> > > > > > 
> > > > > > that's the case, I'd advise you to rethink it - you can
> either
> > > use
> > > > > OSGi
> > > > > > 
> > > > > > for your app (the -osgi flag in wsdl2java) or use embedded
> > Tomcat
> > > > to
> > > > > > host 
> > > > > > the app (~5MB). Writing a decent HTTP server for one known
> > client
> > > > is
> > > > > > easy 
> > > > > > - writing a robust HTTP server is quite hard.
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > > > 12:42:53
> > > > > > PM:
> > > > > > 
> > > > > > > See below <DAC>
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > The WsnTestClient should not be necessary in your real
> world
> > > > > scenario
> > > > > > -
> > > > > > > 
> > > > > > > it's just a driver to get the sample going. In your
> > situation,
> > > > you
> > > > > > can 
> > > > > > > just have the consumer resource subscribe to the producer
> > > itself
> > > > -
> > > > > > the 
> > > > > > > code to do that would be very similar to what's in
> > > WsnTestClient
> > > > > (the
> > > > > > > use 
> > > > > > > of NotificationProducerClient), but you would package it in
> > > your
> > > > > > > consumer 
> > > > > > > resource instead of a command line app. You could perform
> the
> > > > > > > subscription 
> > > > > > > work in the initialize() method of one of your capabilities
> > on
> > > > the 
> > > > > > > consumer side.
> > > > > > > 
> > > > > > > Alternatively, in a more complex scenario, you might have
> an 
> > > > > > > "orchestrator" service that is subscribing all of the
> > consumers
> > > > to
> > > > > > the 
> > > > > > > events they need to handle. This scenario would be a lot
> like
> > > the
> > > > > > > sample 
> > > > > > > in that a third service would call subscribe() and tell the
> > > > > producer
> > > > > > > which 
> > > > > > > consumer resource to send the messages to. This is just
> like
> > > the 
> > > > > > > WsnTestClient app, except it would probably be a web
> service
> > as
> > > > > well.
> > > > > > > 
> > > > > > > If you want to forward messages received by one consumer to
> > > > another
> > > > > 
> > > > > > > consumer(s), like a broker would, you just have to use the 
> > > > > > > NotificationMessageListener API - you can implement a
> > listener
> > > > that
> > > > > 
> > > > > > > listens for all notifications and then uses
> > > > > > NotificationConsumerClient
> > > > > > > to 
> > > > > > > forward the messages to other resources.
> > > > > > > 
> > > > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > > > WEB)consumer's. 
> > > > > > >   I want to have a consumer web service that just forwards
> > > > messages
> > > > > > > from the webapp 
> > > > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > > > NotificationMessageListener and
> > > > > > > NotificationConsumerClient or do I need to use another
> means
> > to
> > > > > > forward
> > > > > > > messages from a webapp to a
> > > > > > > Non webapp.  I ask because I'm able to connect two
> > webservices
> > > > > > together
> > > > > > > from a non webapp.  Thanks again for
> > > > > > > all you help. 
> > > > > > > 
> > > > > > > Dan
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > "Callner, David A." <dc...@mitre.org> wrote on
> 02/13/2007
> > > > > 09:36:37
> > > > > > > AM:
> > > > > > > 
> > > > > > > > Ok thanks.  Let's say for instance that I have two
> > different
> > > > > types
> > > > > > of
> > > > > > > > clients.  One type of clients that are within the same
> > > firewall
> > > > > as
> > > > > > my
> > > > > > > > web server and are on the same network.  The other is a
> > > client
> > > > > that
> > > > > > > is
> > > > > > > > outside the firewall and not on the same network.  I can
> > see
> > > > that
> > > > > > the
> > > > > > > > later would need a consumer web service running and the
> > > > incoming
> > > > > > > > requests would have to be forwarded to the user of the
> > > consumer
> > > > > web
> > > > > > > > service. 
> > > > > > > > 
> > > > > > > > First question, when I use the API's to create the
> > > subscription
> > > > > > > between
> > > > > > > > the publisher and consumer are there methods I can call
> > that
> > > > > would
> > > > > > > > subscribe from the consumer to the (WsnTestClient) a
> > > forwarded
> > > > > > > message
> > > > > > > > or is this something I have to do manually i.e create a
> > > socket
> > > > > from
> > > > > > > the
> > > > > > > > consumer to the WsnTestClient or is this already built
> into
> > > > > > > MUSE/AXIS?
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Second question, when I am within the same network is
> there
> > a
> > > > way
> > > > > > for
> > > > > > > > me to set up a publisher/consumer without creating a
> > consumer
> > > > web
> > > > > > > > service or is this not what is intended with MUSE and I
> > would
> > > > > still
> > > > > > > > need a consumer web server and some mechanism to forward
> > > > messages
> > > > > > > from
> > > > > > > > the consumer web service to the (WsnTestClient).
> > > > > > > > 
> > > > > > > > Thanks again for all your answers and help!!
> > > > > > > > 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > Each resource must be a web service resource with a URI
> > > address
> > > > > > that
> > > > > > > > identifies its location.  So your consumer cannot be a
> java
> > > > > program
> > > > > > > > sitting outside of a webserver environment.  What you can
> > do
> > > is
> > > > > > have
> > > > > > > a
> > > > > > > > consumer resource which routes calls to your java
> program.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > Makes sense.  I would like to set up a publisher /
> consumer
> > > > > service
> > > > > > > > were
> > > > > > > > the publish is a web service and the consumer is java
> > program
> > > > (no
> > > > > > > > web server running).  Is this possible? 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > I'm not really sure, if I understand your initial
> question,
> > > so
> > > > > I'll
> > > > > > > try
> > > > > > > > to explain it based on the assumption, that it's unclear
> > why
> > > > you
> > > > > > need
> > > > > > > > to
> > > > > > > > deploy 2 servlets to make the sample work.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > For the producer/consumer example, they're mimicking a
> > > service
> > > > > > > > (producer) on a separate machine, which will inform the
> > > client
> > > > > > > machine
> > > > > > > > (consumer) about changes in its state via a WSDM SOAP
> > > message. 
> > > > > > > > The WsnTestClient-file is just setting up the
> subscription
> > > > > between
> > > > > > > the
> > > > > > > > producer/consumer via the SubscriptionManager.
> > > > > > > > The actual consumer is the
> > > > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > > > 
> > > > > > > > As for the error you're getting, I'm not sure if you
> > deployed
> > > > > both
> > > > > > > the
> > > > > > > > producer/consumer wars given the earlier assumption I
> made.
> > > But
> > > > > it
> > > > > > > > seems
> > > > > > > > that your WsnTestClient is trying to subscribe to your
> > > producer
> > > > > > > service
> > > > > > > > and getting denied as the service is not available at the
> > > > > specified
> > > > > > > > location (according to the WsnTestClient.java property
> and
> > > the
> > > > > > > involved
> > > > > > > > WSDL-files).
> > > > > > > > 
> > > > > > > > I don't have a clue yet about the error from you Tomcat
> log
> > > > > files.
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Not really sure if this made any sense.
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > > Sent: 07 February 2007 13:43
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > I'm using the official release and have performed step 2
> > and
> > > > here
> > > > > > are
> > > > > > > > the errors I'm getting.  Also could someone explain to me
> > why
> > > I
> > > > > > need
> > > > > > > to
> > > > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).
> The
> > > > > > > > WsnTestClient should be the "Consumer". 
> > > > > > > > 
> > > > > > > > In my tomcat5 log file: 
> > > > > > > > 
> > > > > > > >  2007-02-07 08:34:31
> > StandardWrapperValve[ApacheMuseServlet]:
> > > > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> > > exception
> > > > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> > > method
> > > > > > > >
> > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > > > not
> > > > > > > > found
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > > > .java:46)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > > > ava:32)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > > > tIsolationLayer.java:183)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > > > iServlet.java:36)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > > > 50)
> > > > > > > >    at
> > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > > > >    at
> > > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > > > ationFilterChain.java:237)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > > > terChain.java:157)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > > > ve.java:214)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > > ontext.java:104)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > > 520)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > > > ntextValve.java:198)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > > > ve.java:152)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > > ontext.java:104)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > > 520)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > > > a:137)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > > ontext.java:104)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > > > a:118)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > > ontext.java:102)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > > 520)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > > > .java:109)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > > ontext.java:104)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > > 520)
> > > > > > > >    at
> > > > > > > >
> > > > > >
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > > > 99)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > > > Connection(Http11Protocol.java:705)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > > > 77)
> > > > > > > >    at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > > > l.java:683)
> > > > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Output from WsnTestClient:
> > > > > > > > 
> > > > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > > > 
> > > > > > > > <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://128.29.35.11:80
> > > > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > > > f-066b-ff60b581802c</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:A
> > > > > > > > ddress>
> > > > > > > >         </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://128.29.35.11:80
> > > > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > > > >             </wsnt:ConsumerReference>
> > > > > > > >         </wsnt:Subscribe>
> > > > > > > >     </soap:Body>
> > > > > > > > </soap:Envelope>
> > > > > > > > 
> > > > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
> > returned
> > > > > HTTP
> > > > > > > > response code: 500 for URL:
> > > > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > > > >         at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > > nt.java:279)
> > > > > > > >         at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > > nt.java:235)
> > > > > > > >         at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > > > ribe(NotificationProducerClient.java:96)
> > > > > > > >         at
> > > org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > > > Source)
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > Thank you for your support. I downloaded the nightly
> build
> > > and
> > > > > ran
> > > > > > > > update_install.bat. The wsn-producer/consumer example
> > worked
> > > at
> > > > > > once.
> > > > > > > > 
> > > > > > > > /Mattias
> > > > > > > > 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > Good catch on the port number - make sure the port you're
> > > using
> > > > > for
> > > > > > > > Tomcat uses the one that's specified in the
> > > WsnTestClient.java
> > > > > > > client.
> > > > > > > > The port is part of the wsa:Address in the producer and
> > > > consumer
> > > > > > > EPRs,
> > > > > > > > so if it's wrong, you need to change it (you can do this
> on
> > > the
> > > > > > > command
> > > > > > > > line or by
> > > > > > > > 
> > > > > > > > modifying the test client code).
> > > > > > > > 
> > > > > > > > I'd also advise against building the source and trying to
> > add
> > > > the
> > > > > > > > latest
> > > > > > > > bits incrementally - if you want to do a full build,
> follow
> > > the
> > > > > > > > instructions on:
> > > > > > > > 
> > > > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > > > 
> > > > > > > > If you want the latest nightly build, you can get it
> here:
> > > > > > > > 
> > > > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > > > 
> > > > > > > > Of course, except for the "step 2" that was added,
> neither
> > of
> > > > > those
> > > > > > > > samples has changed in quite a while. You should be able
> to
> > > get
> > > > > > them
> > > > > > > > working by taking the official release and performing
> step
> > 2
> > > -
> > > > > let
> > > > > > me
> > > > > > > > know if the port number issue was indeed the problem.
> > > > > > > > 
> > > > > > > > Dan
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > > > 
> > > > > > > > > I'm not sure why you would want to make the whole thing
> > > that 
> > > > > > > > > complicated.
> > > > > > > > > I seem to have no problem getting the producer/consumer
> > > > example
> > > > > > to
> > > > > > > > work
> > > > > > > > > with these simple steps.
> > > > > > > > > 
> > > > > > > > > 1) Download the nightly build (with the latest bug
> fixes)
> > > > from 
> > > > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > > > 
> > > > > > > > > 2) Run update-install
> > > > > > > > > 
> > > > > > > > > 3) Double-check the WsResourcePort in the
> WsResource.wsdl
> > > > > > > > (wsn-producer)
> > > > > > > > > and the WsnTestClient portType properties
> (producer_port
> > &
> > > > > > > > > consumer_port) are pointing to the right serviceport
> > > > (according
> > > > > > to
> > > > > > > > your
> > > > > > > > > Tomcat specs).
> > > > > > > > > 
> > > > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > > > 
> > > > > > > > > 5) Deploy and enjoy
> > > > > > > > > 
> > > > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > > > WsnTestClient.java
> > > > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> > > portTypes
> > > > > > match
> > > > > > > > your
> > > > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > > > consumer
> > > > > > > that's
> > > > > > > > 
> > > > > > > > > not listening on the given port. I could be wrong.
> > > > > > > > > 
> > > > > > > > > I know the portTypes have been a cause of some of my
> > > problems
> > > > > in
> > > > > > > the 
> > > > > > > > > past.
> > > > > > > > > 
> > > > > > > > > /Lenni
> > > > > > > > > 
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Rosberg Mattias
> > [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > > Sent: 05 February 2007 12:59
> > > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > > 
> > > > > > > > > If you follow the instructions for "Eclipse
> Development"
> > > > > > described
> > > > > > > > here 
> > > > > > > > > 
> > > > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > > > 
> > > > > > > > > you get a separate project in Eclipse for every muse
> > > > jar-file.
> > > > > > You
> > > > > > > > can
> > > > > > > > > then export each project as a jar-file and replace the
> > ones
> > > > > found
> > > > > > > in 
> > > > > > > > > your MUSE_HOME/modules subdirectories. This way you get
> > the
> > > > > > latest 
> > > > > > > > > bugfixes and updates.
> > > > > > > > > 
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > > 
> > > > > > > > > You seemed to get farther than I did with the example.
> I
> > > > been
> > > > > > able
> > > > > > > > to
> > > > > > > > > find on the internet that you need to add (#2) below,
> but
> > > > your
> > > > > > #3.
> > > > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > > > 
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: Rosberg Mattias
> > [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > > Subject: wsn-producer/consumer example
> > > > > > > > > 
> > > > > > > > > I have tried to get the wsn-producer/consumer sample to
> > > work
> > > > > > > without 
> > > > > > > > > success. I have done the following:
> > > > > > > > > 
> > > > > > > > > 1. Downloaded 2.1.0 distribution and ran
> update_install.
> > > > > > > > > 
> > > > > > > > > 2. Added row <resource-type
> > use-router-persistence="true">
> > > in
> > > > 
> > > > > > > > > wsn-consumer muse.xml
> > > > > > > > > 
> > > > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > > > Replaced
> > > > > > old
> > > > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0
> jars.
> > > > > > > > > 
> > > > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > > > 
> > > > > > > > > 5. Deploy wars on Tomcat without any error messages.
> Run
> > > > > > > > WsnTestClient 
> > > > > > > > > 
> > > > > > > > > I still get the following error:
> > > > > > > > > 
> > > > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > > > published
> > > > > > > via 
> > > > > > > > > wsnt:Notify  failed to reach its destination. The
> > consumer
> > > > may
> > > > > be
> > > > > > 
> > > > > > > > > unavailable.
> > > > > > > > The
> > > > > > > > > original
> > > > > > > > > error was: null
> > > > > > > > > 2007-feb-05 08:17:37
> > > > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > > > run
> > > > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > > > 
> > > > > > > > > Any ideas?
> > > > > > > > > 
> > > > > > > > > /Mattias
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > muse-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > muse-user-help@ws.apache.org
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > >
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > > > To unsubscribe, e-mail:
> > muse-user-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail:
> > > muse-user-help@ws.apache.org
> > > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
How do you turn off the [CLIENT TRACE] messages.  In the TestClient
I've setTrace to false for both the producer and client.  I'm still
getting a [CLIENT TRACE] in my catalina.out file.  Any ideas? 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Thursday, February 22, 2007 10:28 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I got it working.  I didn't do any extra steps the downloaded
producer/consumer under samples has the class files under
WEB-INF/classes.  Also I had to go back to java version 1.5.03-b07 in
order for it to work.  Our environment has 15+ different versions of
java so everybody is happy and it just made me really unhappy.  I've
never run into this problem before, normally I get errors Major/Minor,
errors, never these ClassNotFound exceptions that don't really tell
what the problem is because the class files are there.  Thanks for all
your help and I'm sure I'll be asking again soon. 

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Thursday, February 22, 2007 10:24 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

So... the samples do work, but you are having problems with your own 
project. You generated code from wsdl2java (using the -axis2 option), 
filled in the Java source files, ran 'ant', and deployed the WAR? It 
sounds like you added another step (copying .class files from another 
project into WEB-INF/classes?). Is that right? We test Muse on JDK
1.4.2 
and 1.5 (Sun and IBM), but no one has tried 1.6.

The samples use the Mini SOAP engine, and they're just packaged up
using 
Ant (because the source code is already completed). If you run
wsdl2java 
with the -axis2 or -mini flags and run 'ant' on the build.xml file, it 
will compile your code into a .jar file and add it to WEB-INF/lib; 
re-running Ant re-compiles and re-copies the .jar. We can certainly put
a 
warning in the troubleshooting section about not adding additional 
code/libraries via WEB-INF/classes for Axis2.

Dan


"Callner, David A." <dc...@mitre.org> wrote on 02/22/2007 09:42:03
AM:

> Ok that email was complete garbage.  I have no idea how I got it
work.
> I must have compiled it with a different version of java, because I
> cannot recompile and generate a war file that will work.  I've kept
> around my one that works.  Does MUSE only work with a certain version
> of java and javac?  I've tried 1.6, 1.5, etc.  I have no idea what
> version I used to create the war file that works. 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Thursday, February 22, 2007 8:42 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Dan I had worked my own producer/consumer which is based on the wsn
> producer/consumer and I seem to have it working.  The difference is
> that I generated the code from the wsdl and when I deployed the war
> file it has a different structure than the wsn producer/consumer that
> you can download.  There is no WEB-INF/classes that actually has the
> classes, the classes are jar'd up and put in the WEB-INF/lib
directory.
> I was reading online as well and it says that the classloader will
not
> find classes in the WEB-INF/classes area.  This seemed to fix my
> problem.  I'm using Axis2.  So question, how is anyone able to get
that
> example to work?  I think somebody should add that to the website so
> others don't have to go through the same hell I've been through. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 6:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> JIRA is our bug tracker:
> 
>         http://ws.apache.org/muse/issue-tracking.html
> 
> A few other people have replied who did get the samples working 
> successfully - right now I'm inclined to believe it's just a problem
> with 
> a small configuration change or something. Here's what I did to
re-test
> 
> the samples:
> 
> 0. Download a clean muse-2.1.0-bin distribution
> 
> 1. /bin/update-install.bat
> 
> 2. cd /samples/j2ee/wsn-producer
> 
> 3. ant
> 
> 4. copy wsn-producer.war to TOMCAT_HOME/webapps
> 
> 5. cd ../wsn-consumer
> 
> 6. Added use-router-persistence attribute to this project's muse.xml
> file 
> (this bug is fixed in the 2.2 build):
> 
>         <resource-type use-router-persistence="true">
> 
> 7. ant
> 
> 8. copy wsn-consumer.war to TOMCAT_HOME/webapps
> 
> 9. start Tomcat
> 
> 10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient
> 
> 11. confirm output in server console
> 
> 
> How are your steps different? Please include as much detail as
> possible, 
> especially with any modifications you might have made for your
project.
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
> PM:
> 
> > What is JIRA?  Do you have any idea what this might be?  Has
anybody
> > been able to get the wsn-producer/wsn-consumer working? 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 3:51 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > well, the first thing it tells me is that the wsn-producer sample,
> not 
> > wsn-consumer, is throwing the exception - that's where the class is
> > from 
> > in that scenario. I'll have to try out a few configurations to see
if
> I
> > 
> > can reproduce it. Attach your WAR file to JIRA if you can...
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
03:31:50
> > PM:
> > 
> > > Yes.  I'm not sure what's going on,but this is the exception
that's
> > > thrown in the catalina.out file.  Any ideas?  Thanks for your
help.
> 
> > > 
> > > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
> class
> > > specified was not found:
> > org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > > Make sure the correct .class or .jar file is in the classpath.
> > >    at
> > > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > > entationClass(SimpleCapabilityDescriptor.java:49)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > > apabilityDescriptor.java:90)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > > tyDefinitions(SimpleResourceDescriptor.java:95)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > > ourceDescriptor.java:397)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > > eploymentDescriptor.java:171)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > tIsolationLayer.java:144)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > iServlet.java:36)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > 50)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > ationFilterChain.java:237)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > terChain.java:157)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > ve.java:214)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > ntextValve.java:198)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > ve.java:152)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > a:137)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > a:118)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:102)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > .java:109)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >    at
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > 99)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > Connection(Http11Protocol.java:705)
> > >    at
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > 77)
> > >    at
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > l.java:683)
> > >    at java.lang.Thread.run(Thread.java:799)
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 21, 2007 2:33 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > just to clarify - you say you're deploying the wsn-consumer
sample
> > > as-is 
> > > (run 'ant' and copy over WAR) and it's not receiving the
> > notifications?
> > > 
> > > are you deploying it in the same container as the producer? if
not,
> > did
> > > 
> > > you make sure to change the port number used in the consumer's
URI
> > (in
> > > the 
> > > test client)?
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
> 12:16:58
> > > PM:
> > > 
> > > >  The example I thought worked didn't.  When I view the
> catalina.out
> > > > file
> > > > the wsn-consumer does not receive publish updates, it seems to
> > > > subscribe correctly.  A JavaClassNotFound exception is thrown
> when
> > > > trying to access ConsumerCapabilityImpl.class.  Everything
seems
> to
> > > be
> > > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > from within the NotificationMessageListener API, you'll get a 
> > > > NotificationMessage object(s) representing the message. The 
> > > > NotificationMessage will have getter methods for things like
the
> > > > producer 
> > > > EPR, topic, etc. It also has the XML payload, which is custom
to
> > your
> > > 
> > > > scenario. If you are using WSDM's WEF for formatting your
events,
> > you
> > > > can 
> > > > convert the payload XML into a ManagementEvent object like so:
> > > > 
> > > > public void process(NotificationMessage msg)
> > > > {
> > > >     WefFactory factory = new SimpleWefFactory();
> > > > 
> > > >     Iterator i = msg.getMessageContent().iterator();
> > > > 
> > > >     while (i.hasNext())
> > > >     {
> > > >         Element eventXML = (Element)i.next();
> > > >         ManagementEvent event = factory.createEvent(eventXML);
> > > >         // use getters to process event data
> > > >     }
> > > > }
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:59:44
> > > > PM:
> > > > 
> > > > > No I do not want to write any HTTP server myself.  I want to
> take
> > > the
> > > > > received SOAP messages from the consumer web service convert
> > those
> > > > into
> > > > > Java Objects and forward them to my non webapp.  I can just
> > create
> > > a
> > > > > socket and send it that way I was just hoping that maybe I
> could
> > > just
> > > > > use the MUSE API to do this since I can set up services from
a
> > non
> > > > > webapp. 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I don't see how you would receive the messages on a non-web
> > app...
> > > > > unless 
> > > > > you're writing your own little server and parsing the HTTP
> > > yourself.
> > > > If
> > > > > 
> > > > > that's the case, I'd advise you to rethink it - you can
either
> > use
> > > > OSGi
> > > > > 
> > > > > for your app (the -osgi flag in wsdl2java) or use embedded
> Tomcat
> > > to
> > > > > host 
> > > > > the app (~5MB). Writing a decent HTTP server for one known
> client
> > > is
> > > > > easy 
> > > > > - writing a robust HTTP server is quite hard.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > > 12:42:53
> > > > > PM:
> > > > > 
> > > > > > See below <DAC>
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > The WsnTestClient should not be necessary in your real
world
> > > > scenario
> > > > > -
> > > > > > 
> > > > > > it's just a driver to get the sample going. In your
> situation,
> > > you
> > > > > can 
> > > > > > just have the consumer resource subscribe to the producer
> > itself
> > > -
> > > > > the 
> > > > > > code to do that would be very similar to what's in
> > WsnTestClient
> > > > (the
> > > > > > use 
> > > > > > of NotificationProducerClient), but you would package it in
> > your
> > > > > > consumer 
> > > > > > resource instead of a command line app. You could perform
the
> > > > > > subscription 
> > > > > > work in the initialize() method of one of your capabilities
> on
> > > the 
> > > > > > consumer side.
> > > > > > 
> > > > > > Alternatively, in a more complex scenario, you might have
an 
> > > > > > "orchestrator" service that is subscribing all of the
> consumers
> > > to
> > > > > the 
> > > > > > events they need to handle. This scenario would be a lot
like
> > the
> > > > > > sample 
> > > > > > in that a third service would call subscribe() and tell the
> > > > producer
> > > > > > which 
> > > > > > consumer resource to send the messages to. This is just
like
> > the 
> > > > > > WsnTestClient app, except it would probably be a web
service
> as
> > > > well.
> > > > > > 
> > > > > > If you want to forward messages received by one consumer to
> > > another
> > > > 
> > > > > > consumer(s), like a broker would, you just have to use the 
> > > > > > NotificationMessageListener API - you can implement a
> listener
> > > that
> > > > 
> > > > > > listens for all notifications and then uses
> > > > > NotificationConsumerClient
> > > > > > to 
> > > > > > forward the messages to other resources.
> > > > > > 
> > > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > > WEB)consumer's. 
> > > > > >   I want to have a consumer web service that just forwards
> > > messages
> > > > > > from the webapp 
> > > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > > NotificationMessageListener and
> > > > > > NotificationConsumerClient or do I need to use another
means
> to
> > > > > forward
> > > > > > messages from a webapp to a
> > > > > > Non webapp.  I ask because I'm able to connect two
> webservices
> > > > > together
> > > > > > from a non webapp.  Thanks again for
> > > > > > all you help. 
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > "Callner, David A." <dc...@mitre.org> wrote on
02/13/2007
> > > > 09:36:37
> > > > > > AM:
> > > > > > 
> > > > > > > Ok thanks.  Let's say for instance that I have two
> different
> > > > types
> > > > > of
> > > > > > > clients.  One type of clients that are within the same
> > firewall
> > > > as
> > > > > my
> > > > > > > web server and are on the same network.  The other is a
> > client
> > > > that
> > > > > > is
> > > > > > > outside the firewall and not on the same network.  I can
> see
> > > that
> > > > > the
> > > > > > > later would need a consumer web service running and the
> > > incoming
> > > > > > > requests would have to be forwarded to the user of the
> > consumer
> > > > web
> > > > > > > service. 
> > > > > > > 
> > > > > > > First question, when I use the API's to create the
> > subscription
> > > > > > between
> > > > > > > the publisher and consumer are there methods I can call
> that
> > > > would
> > > > > > > subscribe from the consumer to the (WsnTestClient) a
> > forwarded
> > > > > > message
> > > > > > > or is this something I have to do manually i.e create a
> > socket
> > > > from
> > > > > > the
> > > > > > > consumer to the WsnTestClient or is this already built
into
> > > > > > MUSE/AXIS?
> > > > > > > 
> > > > > > > 
> > > > > > > Second question, when I am within the same network is
there
> a
> > > way
> > > > > for
> > > > > > > me to set up a publisher/consumer without creating a
> consumer
> > > web
> > > > > > > service or is this not what is intended with MUSE and I
> would
> > > > still
> > > > > > > need a consumer web server and some mechanism to forward
> > > messages
> > > > > > from
> > > > > > > the consumer web service to the (WsnTestClient).
> > > > > > > 
> > > > > > > Thanks again for all your answers and help!!
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Each resource must be a web service resource with a URI
> > address
> > > > > that
> > > > > > > identifies its location.  So your consumer cannot be a
java
> > > > program
> > > > > > > sitting outside of a webserver environment.  What you can
> do
> > is
> > > > > have
> > > > > > a
> > > > > > > consumer resource which routes calls to your java
program.
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Makes sense.  I would like to set up a publisher /
consumer
> > > > service
> > > > > > > were
> > > > > > > the publish is a web service and the consumer is java
> program
> > > (no
> > > > > > > web server running).  Is this possible? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm not really sure, if I understand your initial
question,
> > so
> > > > I'll
> > > > > > try
> > > > > > > to explain it based on the assumption, that it's unclear
> why
> > > you
> > > > > need
> > > > > > > to
> > > > > > > deploy 2 servlets to make the sample work.
> > > > > > > 
> > > > > > > 
> > > > > > > For the producer/consumer example, they're mimicking a
> > service
> > > > > > > (producer) on a separate machine, which will inform the
> > client
> > > > > > machine
> > > > > > > (consumer) about changes in its state via a WSDM SOAP
> > message. 
> > > > > > > The WsnTestClient-file is just setting up the
subscription
> > > > between
> > > > > > the
> > > > > > > producer/consumer via the SubscriptionManager.
> > > > > > > The actual consumer is the
> > > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > > 
> > > > > > > As for the error you're getting, I'm not sure if you
> deployed
> > > > both
> > > > > > the
> > > > > > > producer/consumer wars given the earlier assumption I
made.
> > But
> > > > it
> > > > > > > seems
> > > > > > > that your WsnTestClient is trying to subscribe to your
> > producer
> > > > > > service
> > > > > > > and getting denied as the service is not available at the
> > > > specified
> > > > > > > location (according to the WsnTestClient.java property
and
> > the
> > > > > > involved
> > > > > > > WSDL-files).
> > > > > > > 
> > > > > > > I don't have a clue yet about the error from you Tomcat
log
> > > > files.
> > > > > > > 
> > > > > > > 
> > > > > > > Not really sure if this made any sense.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: 07 February 2007 13:43
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm using the official release and have performed step 2
> and
> > > here
> > > > > are
> > > > > > > the errors I'm getting.  Also could someone explain to me
> why
> > I
> > > > > need
> > > > > > to
> > > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).
The
> > > > > > > WsnTestClient should be the "Consumer". 
> > > > > > > 
> > > > > > > In my tomcat5 log file: 
> > > > > > > 
> > > > > > >  2007-02-07 08:34:31
> StandardWrapperValve[ApacheMuseServlet]:
> > > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> > exception
> > > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> > method
> > > > > > >
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > > not
> > > > > > > found
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > > .java:46)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > > ava:32)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > > tIsolationLayer.java:183)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > > iServlet.java:36)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > > 50)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > > ationFilterChain.java:237)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > > terChain.java:157)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > > ve.java:214)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > > ntextValve.java:198)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > > ve.java:152)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > > a:137)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > > a:118)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:102)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > > .java:109)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > > 99)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > > Connection(Http11Protocol.java:705)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > > 77)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > > l.java:683)
> > > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > > 
> > > > > > > 
> > > > > > > Output from WsnTestClient:
> > > > > > > 
> > > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > > 
> > > > > > > <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://128.29.35.11:80
> > > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > > f-066b-ff60b581802c</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:A
> > > > > > > ddress>
> > > > > > >         </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://128.29.35.11:80
> > > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > > >             </wsnt:ConsumerReference>
> > > > > > >         </wsnt:Subscribe>
> > > > > > >     </soap:Body>
> > > > > > > </soap:Envelope>
> > > > > > > 
> > > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
> returned
> > > > HTTP
> > > > > > > response code: 500 for URL:
> > > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:279)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:235)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > > ribe(NotificationProducerClient.java:96)
> > > > > > >         at
> > org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > > Source)
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Thank you for your support. I downloaded the nightly
build
> > and
> > > > ran
> > > > > > > update_install.bat. The wsn-producer/consumer example
> worked
> > at
> > > > > once.
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Good catch on the port number - make sure the port you're
> > using
> > > > for
> > > > > > > Tomcat uses the one that's specified in the
> > WsnTestClient.java
> > > > > > client.
> > > > > > > The port is part of the wsa:Address in the producer and
> > > consumer
> > > > > > EPRs,
> > > > > > > so if it's wrong, you need to change it (you can do this
on
> > the
> > > > > > command
> > > > > > > line or by
> > > > > > > 
> > > > > > > modifying the test client code).
> > > > > > > 
> > > > > > > I'd also advise against building the source and trying to
> add
> > > the
> > > > > > > latest
> > > > > > > bits incrementally - if you want to do a full build,
follow
> > the
> > > > > > > instructions on:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > If you want the latest nightly build, you can get it
here:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > > 
> > > > > > > Of course, except for the "step 2" that was added,
neither
> of
> > > > those
> > > > > > > samples has changed in quite a while. You should be able
to
> > get
> > > > > them
> > > > > > > working by taking the official release and performing
step
> 2
> > -
> > > > let
> > > > > me
> > > > > > > know if the port number issue was indeed the problem.
> > > > > > > 
> > > > > > > Dan
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > > 
> > > > > > > > I'm not sure why you would want to make the whole thing
> > that 
> > > > > > > > complicated.
> > > > > > > > I seem to have no problem getting the producer/consumer
> > > example
> > > > > to
> > > > > > > work
> > > > > > > > with these simple steps.
> > > > > > > > 
> > > > > > > > 1) Download the nightly build (with the latest bug
fixes)
> > > from 
> > > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > > 
> > > > > > > > 2) Run update-install
> > > > > > > > 
> > > > > > > > 3) Double-check the WsResourcePort in the
WsResource.wsdl
> > > > > > > (wsn-producer)
> > > > > > > > and the WsnTestClient portType properties
(producer_port
> &
> > > > > > > > consumer_port) are pointing to the right serviceport
> > > (according
> > > > > to
> > > > > > > your
> > > > > > > > Tomcat specs).
> > > > > > > > 
> > > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > > 
> > > > > > > > 5) Deploy and enjoy
> > > > > > > > 
> > > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > > WsnTestClient.java
> > > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> > portTypes
> > > > > match
> > > > > > > your
> > > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > > consumer
> > > > > > that's
> > > > > > > 
> > > > > > > > not listening on the given port. I could be wrong.
> > > > > > > > 
> > > > > > > > I know the portTypes have been a cause of some of my
> > problems
> > > > in
> > > > > > the 
> > > > > > > > past.
> > > > > > > > 
> > > > > > > > /Lenni
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: 05 February 2007 12:59
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > If you follow the instructions for "Eclipse
Development"
> > > > > described
> > > > > > > here 
> > > > > > > > 
> > > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > > 
> > > > > > > > you get a separate project in Eclipse for every muse
> > > jar-file.
> > > > > You
> > > > > > > can
> > > > > > > > then export each project as a jar-file and replace the
> ones
> > > > found
> > > > > > in 
> > > > > > > > your MUSE_HOME/modules subdirectories. This way you get
> the
> > > > > latest 
> > > > > > > > bugfixes and updates.
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > You seemed to get farther than I did with the example.
I
> > > been
> > > > > able
> > > > > > > to
> > > > > > > > find on the internet that you need to add (#2) below,
but
> > > your
> > > > > #3.
> > > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > I have tried to get the wsn-producer/consumer sample to
> > work
> > > > > > without 
> > > > > > > > success. I have done the following:
> > > > > > > > 
> > > > > > > > 1. Downloaded 2.1.0 distribution and ran
update_install.
> > > > > > > > 
> > > > > > > > 2. Added row <resource-type
> use-router-persistence="true">
> > in
> > > 
> > > > > > > > wsn-consumer muse.xml
> > > > > > > > 
> > > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > > Replaced
> > > > > old
> > > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0
jars.
> > > > > > > > 
> > > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > > 
> > > > > > > > 5. Deploy wars on Tomcat without any error messages.
Run
> > > > > > > WsnTestClient 
> > > > > > > > 
> > > > > > > > I still get the following error:
> > > > > > > > 
> > > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > > published
> > > > > > via 
> > > > > > > > wsnt:Notify  failed to reach its destination. The
> consumer
> > > may
> > > > be
> > > > > 
> > > > > > > > unavailable.
> > > > > > > The
> > > > > > > > original
> > > > > > > > error was: null
> > > > > > > > 2007-feb-05 08:17:37
> > > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > > run
> > > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > > 
> > > > > > > > Any ideas?
> > > > > > > > 
> > > > > > > > /Mattias
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
I got it working.  I didn't do any extra steps the downloaded
producer/consumer under samples has the class files under
WEB-INF/classes.  Also I had to go back to java version 1.5.03-b07 in
order for it to work.  Our environment has 15+ different versions of
java so everybody is happy and it just made me really unhappy.  I've
never run into this problem before, normally I get errors Major/Minor,
errors, never these ClassNotFound exceptions that don't really tell
what the problem is because the class files are there.  Thanks for all
your help and I'm sure I'll be asking again soon. 

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Thursday, February 22, 2007 10:24 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

So... the samples do work, but you are having problems with your own 
project. You generated code from wsdl2java (using the -axis2 option), 
filled in the Java source files, ran 'ant', and deployed the WAR? It 
sounds like you added another step (copying .class files from another 
project into WEB-INF/classes?). Is that right? We test Muse on JDK
1.4.2 
and 1.5 (Sun and IBM), but no one has tried 1.6.

The samples use the Mini SOAP engine, and they're just packaged up
using 
Ant (because the source code is already completed). If you run
wsdl2java 
with the -axis2 or -mini flags and run 'ant' on the build.xml file, it 
will compile your code into a .jar file and add it to WEB-INF/lib; 
re-running Ant re-compiles and re-copies the .jar. We can certainly put
a 
warning in the troubleshooting section about not adding additional 
code/libraries via WEB-INF/classes for Axis2.

Dan


"Callner, David A." <dc...@mitre.org> wrote on 02/22/2007 09:42:03
AM:

> Ok that email was complete garbage.  I have no idea how I got it
work.
> I must have compiled it with a different version of java, because I
> cannot recompile and generate a war file that will work.  I've kept
> around my one that works.  Does MUSE only work with a certain version
> of java and javac?  I've tried 1.6, 1.5, etc.  I have no idea what
> version I used to create the war file that works. 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Thursday, February 22, 2007 8:42 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Dan I had worked my own producer/consumer which is based on the wsn
> producer/consumer and I seem to have it working.  The difference is
> that I generated the code from the wsdl and when I deployed the war
> file it has a different structure than the wsn producer/consumer that
> you can download.  There is no WEB-INF/classes that actually has the
> classes, the classes are jar'd up and put in the WEB-INF/lib
directory.
> I was reading online as well and it says that the classloader will
not
> find classes in the WEB-INF/classes area.  This seemed to fix my
> problem.  I'm using Axis2.  So question, how is anyone able to get
that
> example to work?  I think somebody should add that to the website so
> others don't have to go through the same hell I've been through. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 6:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> JIRA is our bug tracker:
> 
>         http://ws.apache.org/muse/issue-tracking.html
> 
> A few other people have replied who did get the samples working 
> successfully - right now I'm inclined to believe it's just a problem
> with 
> a small configuration change or something. Here's what I did to
re-test
> 
> the samples:
> 
> 0. Download a clean muse-2.1.0-bin distribution
> 
> 1. /bin/update-install.bat
> 
> 2. cd /samples/j2ee/wsn-producer
> 
> 3. ant
> 
> 4. copy wsn-producer.war to TOMCAT_HOME/webapps
> 
> 5. cd ../wsn-consumer
> 
> 6. Added use-router-persistence attribute to this project's muse.xml
> file 
> (this bug is fixed in the 2.2 build):
> 
>         <resource-type use-router-persistence="true">
> 
> 7. ant
> 
> 8. copy wsn-consumer.war to TOMCAT_HOME/webapps
> 
> 9. start Tomcat
> 
> 10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient
> 
> 11. confirm output in server console
> 
> 
> How are your steps different? Please include as much detail as
> possible, 
> especially with any modifications you might have made for your
project.
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
> PM:
> 
> > What is JIRA?  Do you have any idea what this might be?  Has
anybody
> > been able to get the wsn-producer/wsn-consumer working? 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 3:51 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > well, the first thing it tells me is that the wsn-producer sample,
> not 
> > wsn-consumer, is throwing the exception - that's where the class is
> > from 
> > in that scenario. I'll have to try out a few configurations to see
if
> I
> > 
> > can reproduce it. Attach your WAR file to JIRA if you can...
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
03:31:50
> > PM:
> > 
> > > Yes.  I'm not sure what's going on,but this is the exception
that's
> > > thrown in the catalina.out file.  Any ideas?  Thanks for your
help.
> 
> > > 
> > > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
> class
> > > specified was not found:
> > org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > > Make sure the correct .class or .jar file is in the classpath.
> > >    at
> > > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > > entationClass(SimpleCapabilityDescriptor.java:49)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > > apabilityDescriptor.java:90)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > > tyDefinitions(SimpleResourceDescriptor.java:95)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > > ourceDescriptor.java:397)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> > >    at
> > >
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > > eploymentDescriptor.java:171)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > tIsolationLayer.java:144)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > iServlet.java:36)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > 50)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > ationFilterChain.java:237)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > terChain.java:157)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > ve.java:214)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > ntextValve.java:198)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > ve.java:152)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > a:137)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > a:118)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:102)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > .java:109)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >    at
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > 99)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > Connection(Http11Protocol.java:705)
> > >    at
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > 77)
> > >    at
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > l.java:683)
> > >    at java.lang.Thread.run(Thread.java:799)
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 21, 2007 2:33 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > just to clarify - you say you're deploying the wsn-consumer
sample
> > > as-is 
> > > (run 'ant' and copy over WAR) and it's not receiving the
> > notifications?
> > > 
> > > are you deploying it in the same container as the producer? if
not,
> > did
> > > 
> > > you make sure to change the port number used in the consumer's
URI
> > (in
> > > the 
> > > test client)?
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
> 12:16:58
> > > PM:
> > > 
> > > >  The example I thought worked didn't.  When I view the
> catalina.out
> > > > file
> > > > the wsn-consumer does not receive publish updates, it seems to
> > > > subscribe correctly.  A JavaClassNotFound exception is thrown
> when
> > > > trying to access ConsumerCapabilityImpl.class.  Everything
seems
> to
> > > be
> > > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > from within the NotificationMessageListener API, you'll get a 
> > > > NotificationMessage object(s) representing the message. The 
> > > > NotificationMessage will have getter methods for things like
the
> > > > producer 
> > > > EPR, topic, etc. It also has the XML payload, which is custom
to
> > your
> > > 
> > > > scenario. If you are using WSDM's WEF for formatting your
events,
> > you
> > > > can 
> > > > convert the payload XML into a ManagementEvent object like so:
> > > > 
> > > > public void process(NotificationMessage msg)
> > > > {
> > > >     WefFactory factory = new SimpleWefFactory();
> > > > 
> > > >     Iterator i = msg.getMessageContent().iterator();
> > > > 
> > > >     while (i.hasNext())
> > > >     {
> > > >         Element eventXML = (Element)i.next();
> > > >         ManagementEvent event = factory.createEvent(eventXML);
> > > >         // use getters to process event data
> > > >     }
> > > > }
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:59:44
> > > > PM:
> > > > 
> > > > > No I do not want to write any HTTP server myself.  I want to
> take
> > > the
> > > > > received SOAP messages from the consumer web service convert
> > those
> > > > into
> > > > > Java Objects and forward them to my non webapp.  I can just
> > create
> > > a
> > > > > socket and send it that way I was just hoping that maybe I
> could
> > > just
> > > > > use the MUSE API to do this since I can set up services from
a
> > non
> > > > > webapp. 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I don't see how you would receive the messages on a non-web
> > app...
> > > > > unless 
> > > > > you're writing your own little server and parsing the HTTP
> > > yourself.
> > > > If
> > > > > 
> > > > > that's the case, I'd advise you to rethink it - you can
either
> > use
> > > > OSGi
> > > > > 
> > > > > for your app (the -osgi flag in wsdl2java) or use embedded
> Tomcat
> > > to
> > > > > host 
> > > > > the app (~5MB). Writing a decent HTTP server for one known
> client
> > > is
> > > > > easy 
> > > > > - writing a robust HTTP server is quite hard.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > > 12:42:53
> > > > > PM:
> > > > > 
> > > > > > See below <DAC>
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > The WsnTestClient should not be necessary in your real
world
> > > > scenario
> > > > > -
> > > > > > 
> > > > > > it's just a driver to get the sample going. In your
> situation,
> > > you
> > > > > can 
> > > > > > just have the consumer resource subscribe to the producer
> > itself
> > > -
> > > > > the 
> > > > > > code to do that would be very similar to what's in
> > WsnTestClient
> > > > (the
> > > > > > use 
> > > > > > of NotificationProducerClient), but you would package it in
> > your
> > > > > > consumer 
> > > > > > resource instead of a command line app. You could perform
the
> > > > > > subscription 
> > > > > > work in the initialize() method of one of your capabilities
> on
> > > the 
> > > > > > consumer side.
> > > > > > 
> > > > > > Alternatively, in a more complex scenario, you might have
an 
> > > > > > "orchestrator" service that is subscribing all of the
> consumers
> > > to
> > > > > the 
> > > > > > events they need to handle. This scenario would be a lot
like
> > the
> > > > > > sample 
> > > > > > in that a third service would call subscribe() and tell the
> > > > producer
> > > > > > which 
> > > > > > consumer resource to send the messages to. This is just
like
> > the 
> > > > > > WsnTestClient app, except it would probably be a web
service
> as
> > > > well.
> > > > > > 
> > > > > > If you want to forward messages received by one consumer to
> > > another
> > > > 
> > > > > > consumer(s), like a broker would, you just have to use the 
> > > > > > NotificationMessageListener API - you can implement a
> listener
> > > that
> > > > 
> > > > > > listens for all notifications and then uses
> > > > > NotificationConsumerClient
> > > > > > to 
> > > > > > forward the messages to other resources.
> > > > > > 
> > > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > > WEB)consumer's. 
> > > > > >   I want to have a consumer web service that just forwards
> > > messages
> > > > > > from the webapp 
> > > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > > NotificationMessageListener and
> > > > > > NotificationConsumerClient or do I need to use another
means
> to
> > > > > forward
> > > > > > messages from a webapp to a
> > > > > > Non webapp.  I ask because I'm able to connect two
> webservices
> > > > > together
> > > > > > from a non webapp.  Thanks again for
> > > > > > all you help. 
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > "Callner, David A." <dc...@mitre.org> wrote on
02/13/2007
> > > > 09:36:37
> > > > > > AM:
> > > > > > 
> > > > > > > Ok thanks.  Let's say for instance that I have two
> different
> > > > types
> > > > > of
> > > > > > > clients.  One type of clients that are within the same
> > firewall
> > > > as
> > > > > my
> > > > > > > web server and are on the same network.  The other is a
> > client
> > > > that
> > > > > > is
> > > > > > > outside the firewall and not on the same network.  I can
> see
> > > that
> > > > > the
> > > > > > > later would need a consumer web service running and the
> > > incoming
> > > > > > > requests would have to be forwarded to the user of the
> > consumer
> > > > web
> > > > > > > service. 
> > > > > > > 
> > > > > > > First question, when I use the API's to create the
> > subscription
> > > > > > between
> > > > > > > the publisher and consumer are there methods I can call
> that
> > > > would
> > > > > > > subscribe from the consumer to the (WsnTestClient) a
> > forwarded
> > > > > > message
> > > > > > > or is this something I have to do manually i.e create a
> > socket
> > > > from
> > > > > > the
> > > > > > > consumer to the WsnTestClient or is this already built
into
> > > > > > MUSE/AXIS?
> > > > > > > 
> > > > > > > 
> > > > > > > Second question, when I am within the same network is
there
> a
> > > way
> > > > > for
> > > > > > > me to set up a publisher/consumer without creating a
> consumer
> > > web
> > > > > > > service or is this not what is intended with MUSE and I
> would
> > > > still
> > > > > > > need a consumer web server and some mechanism to forward
> > > messages
> > > > > > from
> > > > > > > the consumer web service to the (WsnTestClient).
> > > > > > > 
> > > > > > > Thanks again for all your answers and help!!
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Each resource must be a web service resource with a URI
> > address
> > > > > that
> > > > > > > identifies its location.  So your consumer cannot be a
java
> > > > program
> > > > > > > sitting outside of a webserver environment.  What you can
> do
> > is
> > > > > have
> > > > > > a
> > > > > > > consumer resource which routes calls to your java
program.
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Makes sense.  I would like to set up a publisher /
consumer
> > > > service
> > > > > > > were
> > > > > > > the publish is a web service and the consumer is java
> program
> > > (no
> > > > > > > web server running).  Is this possible? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm not really sure, if I understand your initial
question,
> > so
> > > > I'll
> > > > > > try
> > > > > > > to explain it based on the assumption, that it's unclear
> why
> > > you
> > > > > need
> > > > > > > to
> > > > > > > deploy 2 servlets to make the sample work.
> > > > > > > 
> > > > > > > 
> > > > > > > For the producer/consumer example, they're mimicking a
> > service
> > > > > > > (producer) on a separate machine, which will inform the
> > client
> > > > > > machine
> > > > > > > (consumer) about changes in its state via a WSDM SOAP
> > message. 
> > > > > > > The WsnTestClient-file is just setting up the
subscription
> > > > between
> > > > > > the
> > > > > > > producer/consumer via the SubscriptionManager.
> > > > > > > The actual consumer is the
> > > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > > 
> > > > > > > As for the error you're getting, I'm not sure if you
> deployed
> > > > both
> > > > > > the
> > > > > > > producer/consumer wars given the earlier assumption I
made.
> > But
> > > > it
> > > > > > > seems
> > > > > > > that your WsnTestClient is trying to subscribe to your
> > producer
> > > > > > service
> > > > > > > and getting denied as the service is not available at the
> > > > specified
> > > > > > > location (according to the WsnTestClient.java property
and
> > the
> > > > > > involved
> > > > > > > WSDL-files).
> > > > > > > 
> > > > > > > I don't have a clue yet about the error from you Tomcat
log
> > > > files.
> > > > > > > 
> > > > > > > 
> > > > > > > Not really sure if this made any sense.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: 07 February 2007 13:43
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm using the official release and have performed step 2
> and
> > > here
> > > > > are
> > > > > > > the errors I'm getting.  Also could someone explain to me
> why
> > I
> > > > > need
> > > > > > to
> > > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).
The
> > > > > > > WsnTestClient should be the "Consumer". 
> > > > > > > 
> > > > > > > In my tomcat5 log file: 
> > > > > > > 
> > > > > > >  2007-02-07 08:34:31
> StandardWrapperValve[ApacheMuseServlet]:
> > > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> > exception
> > > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> > method
> > > > > > >
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > > not
> > > > > > > found
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > > .java:46)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > > ava:32)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > > tIsolationLayer.java:183)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > > iServlet.java:36)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > > 50)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > > ationFilterChain.java:237)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > > terChain.java:157)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > > ve.java:214)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > > ntextValve.java:198)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > > ve.java:152)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > > a:137)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > > a:118)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:102)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > > .java:109)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > > 99)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > > Connection(Http11Protocol.java:705)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > > 77)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > > l.java:683)
> > > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > > 
> > > > > > > 
> > > > > > > Output from WsnTestClient:
> > > > > > > 
> > > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > > 
> > > > > > > <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://128.29.35.11:80
> > > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > > f-066b-ff60b581802c</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:A
> > > > > > > ddress>
> > > > > > >         </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://128.29.35.11:80
> > > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > > >             </wsnt:ConsumerReference>
> > > > > > >         </wsnt:Subscribe>
> > > > > > >     </soap:Body>
> > > > > > > </soap:Envelope>
> > > > > > > 
> > > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
> returned
> > > > HTTP
> > > > > > > response code: 500 for URL:
> > > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:279)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:235)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > > ribe(NotificationProducerClient.java:96)
> > > > > > >         at
> > org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > > Source)
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Thank you for your support. I downloaded the nightly
build
> > and
> > > > ran
> > > > > > > update_install.bat. The wsn-producer/consumer example
> worked
> > at
> > > > > once.
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Good catch on the port number - make sure the port you're
> > using
> > > > for
> > > > > > > Tomcat uses the one that's specified in the
> > WsnTestClient.java
> > > > > > client.
> > > > > > > The port is part of the wsa:Address in the producer and
> > > consumer
> > > > > > EPRs,
> > > > > > > so if it's wrong, you need to change it (you can do this
on
> > the
> > > > > > command
> > > > > > > line or by
> > > > > > > 
> > > > > > > modifying the test client code).
> > > > > > > 
> > > > > > > I'd also advise against building the source and trying to
> add
> > > the
> > > > > > > latest
> > > > > > > bits incrementally - if you want to do a full build,
follow
> > the
> > > > > > > instructions on:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > If you want the latest nightly build, you can get it
here:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > > 
> > > > > > > Of course, except for the "step 2" that was added,
neither
> of
> > > > those
> > > > > > > samples has changed in quite a while. You should be able
to
> > get
> > > > > them
> > > > > > > working by taking the official release and performing
step
> 2
> > -
> > > > let
> > > > > me
> > > > > > > know if the port number issue was indeed the problem.
> > > > > > > 
> > > > > > > Dan
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > > 
> > > > > > > > I'm not sure why you would want to make the whole thing
> > that 
> > > > > > > > complicated.
> > > > > > > > I seem to have no problem getting the producer/consumer
> > > example
> > > > > to
> > > > > > > work
> > > > > > > > with these simple steps.
> > > > > > > > 
> > > > > > > > 1) Download the nightly build (with the latest bug
fixes)
> > > from 
> > > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > > 
> > > > > > > > 2) Run update-install
> > > > > > > > 
> > > > > > > > 3) Double-check the WsResourcePort in the
WsResource.wsdl
> > > > > > > (wsn-producer)
> > > > > > > > and the WsnTestClient portType properties
(producer_port
> &
> > > > > > > > consumer_port) are pointing to the right serviceport
> > > (according
> > > > > to
> > > > > > > your
> > > > > > > > Tomcat specs).
> > > > > > > > 
> > > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > > 
> > > > > > > > 5) Deploy and enjoy
> > > > > > > > 
> > > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > > WsnTestClient.java
> > > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> > portTypes
> > > > > match
> > > > > > > your
> > > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > > consumer
> > > > > > that's
> > > > > > > 
> > > > > > > > not listening on the given port. I could be wrong.
> > > > > > > > 
> > > > > > > > I know the portTypes have been a cause of some of my
> > problems
> > > > in
> > > > > > the 
> > > > > > > > past.
> > > > > > > > 
> > > > > > > > /Lenni
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: 05 February 2007 12:59
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > If you follow the instructions for "Eclipse
Development"
> > > > > described
> > > > > > > here 
> > > > > > > > 
> > > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > > 
> > > > > > > > you get a separate project in Eclipse for every muse
> > > jar-file.
> > > > > You
> > > > > > > can
> > > > > > > > then export each project as a jar-file and replace the
> ones
> > > > found
> > > > > > in 
> > > > > > > > your MUSE_HOME/modules subdirectories. This way you get
> the
> > > > > latest 
> > > > > > > > bugfixes and updates.
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > You seemed to get farther than I did with the example.
I
> > > been
> > > > > able
> > > > > > > to
> > > > > > > > find on the internet that you need to add (#2) below,
but
> > > your
> > > > > #3.
> > > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > I have tried to get the wsn-producer/consumer sample to
> > work
> > > > > > without 
> > > > > > > > success. I have done the following:
> > > > > > > > 
> > > > > > > > 1. Downloaded 2.1.0 distribution and ran
update_install.
> > > > > > > > 
> > > > > > > > 2. Added row <resource-type
> use-router-persistence="true">
> > in
> > > 
> > > > > > > > wsn-consumer muse.xml
> > > > > > > > 
> > > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > > Replaced
> > > > > old
> > > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0
jars.
> > > > > > > > 
> > > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > > 
> > > > > > > > 5. Deploy wars on Tomcat without any error messages.
Run
> > > > > > > WsnTestClient 
> > > > > > > > 
> > > > > > > > I still get the following error:
> > > > > > > > 
> > > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > > published
> > > > > > via 
> > > > > > > > wsnt:Notify  failed to reach its destination. The
> consumer
> > > may
> > > > be
> > > > > 
> > > > > > > > unavailable.
> > > > > > > The
> > > > > > > > original
> > > > > > > > error was: null
> > > > > > > > 2007-feb-05 08:17:37
> > > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > > run
> > > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > > 
> > > > > > > > Any ideas?
> > > > > > > > 
> > > > > > > > /Mattias
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
So... the samples do work, but you are having problems with your own 
project. You generated code from wsdl2java (using the -axis2 option), 
filled in the Java source files, ran 'ant', and deployed the WAR? It 
sounds like you added another step (copying .class files from another 
project into WEB-INF/classes?). Is that right? We test Muse on JDK 1.4.2 
and 1.5 (Sun and IBM), but no one has tried 1.6.

The samples use the Mini SOAP engine, and they're just packaged up using 
Ant (because the source code is already completed). If you run wsdl2java 
with the -axis2 or -mini flags and run 'ant' on the build.xml file, it 
will compile your code into a .jar file and add it to WEB-INF/lib; 
re-running Ant re-compiles and re-copies the .jar. We can certainly put a 
warning in the troubleshooting section about not adding additional 
code/libraries via WEB-INF/classes for Axis2.

Dan


"Callner, David A." <dc...@mitre.org> wrote on 02/22/2007 09:42:03 AM:

> Ok that email was complete garbage.  I have no idea how I got it work.
> I must have compiled it with a different version of java, because I
> cannot recompile and generate a war file that will work.  I've kept
> around my one that works.  Does MUSE only work with a certain version
> of java and javac?  I've tried 1.6, 1.5, etc.  I have no idea what
> version I used to create the war file that works. 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Thursday, February 22, 2007 8:42 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Dan I had worked my own producer/consumer which is based on the wsn
> producer/consumer and I seem to have it working.  The difference is
> that I generated the code from the wsdl and when I deployed the war
> file it has a different structure than the wsn producer/consumer that
> you can download.  There is no WEB-INF/classes that actually has the
> classes, the classes are jar'd up and put in the WEB-INF/lib directory.
> I was reading online as well and it says that the classloader will not
> find classes in the WEB-INF/classes area.  This seemed to fix my
> problem.  I'm using Axis2.  So question, how is anyone able to get that
> example to work?  I think somebody should add that to the website so
> others don't have to go through the same hell I've been through. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 6:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> JIRA is our bug tracker:
> 
>         http://ws.apache.org/muse/issue-tracking.html
> 
> A few other people have replied who did get the samples working 
> successfully - right now I'm inclined to believe it's just a problem
> with 
> a small configuration change or something. Here's what I did to re-test
> 
> the samples:
> 
> 0. Download a clean muse-2.1.0-bin distribution
> 
> 1. /bin/update-install.bat
> 
> 2. cd /samples/j2ee/wsn-producer
> 
> 3. ant
> 
> 4. copy wsn-producer.war to TOMCAT_HOME/webapps
> 
> 5. cd ../wsn-consumer
> 
> 6. Added use-router-persistence attribute to this project's muse.xml
> file 
> (this bug is fixed in the 2.2 build):
> 
>         <resource-type use-router-persistence="true">
> 
> 7. ant
> 
> 8. copy wsn-consumer.war to TOMCAT_HOME/webapps
> 
> 9. start Tomcat
> 
> 10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient
> 
> 11. confirm output in server console
> 
> 
> How are your steps different? Please include as much detail as
> possible, 
> especially with any modifications you might have made for your project.
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
> PM:
> 
> > What is JIRA?  Do you have any idea what this might be?  Has anybody
> > been able to get the wsn-producer/wsn-consumer working? 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 3:51 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > well, the first thing it tells me is that the wsn-producer sample,
> not 
> > wsn-consumer, is throwing the exception - that's where the class is
> > from 
> > in that scenario. I'll have to try out a few configurations to see if
> I
> > 
> > can reproduce it. Attach your WAR file to JIRA if you can...
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
> > PM:
> > 
> > > Yes.  I'm not sure what's going on,but this is the exception that's
> > > thrown in the catalina.out file.  Any ideas?  Thanks for your help.
> 
> > > 
> > > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
> class
> > > specified was not found:
> > org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > > Make sure the correct .class or .jar file is in the classpath.
> > >    at
> > > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > > entationClass(SimpleCapabilityDescriptor.java:49)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > > apabilityDescriptor.java:90)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > > tyDefinitions(SimpleResourceDescriptor.java:95)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > > ourceDescriptor.java:397)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> > >    at
> > >
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > > eploymentDescriptor.java:171)
> > >    at
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > tIsolationLayer.java:144)
> > >    at
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > iServlet.java:36)
> > >    at
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > 50)
> > >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > >    at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > ationFilterChain.java:237)
> > >    at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > terChain.java:157)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > ve.java:214)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > ntextValve.java:198)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > ve.java:152)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > a:137)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > a:118)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:102)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > .java:109)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >    at
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >    at
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > 99)
> > >    at
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > Connection(Http11Protocol.java:705)
> > >    at
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > 77)
> > >    at
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > l.java:683)
> > >    at java.lang.Thread.run(Thread.java:799)
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 21, 2007 2:33 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > just to clarify - you say you're deploying the wsn-consumer sample
> > > as-is 
> > > (run 'ant' and copy over WAR) and it's not receiving the
> > notifications?
> > > 
> > > are you deploying it in the same container as the producer? if not,
> > did
> > > 
> > > you make sure to change the port number used in the consumer's URI
> > (in
> > > the 
> > > test client)?
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
> 12:16:58
> > > PM:
> > > 
> > > >  The example I thought worked didn't.  When I view the
> catalina.out
> > > > file
> > > > the wsn-consumer does not receive publish updates, it seems to
> > > > subscribe correctly.  A JavaClassNotFound exception is thrown
> when
> > > > trying to access ConsumerCapabilityImpl.class.  Everything seems
> to
> > > be
> > > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > from within the NotificationMessageListener API, you'll get a 
> > > > NotificationMessage object(s) representing the message. The 
> > > > NotificationMessage will have getter methods for things like the
> > > > producer 
> > > > EPR, topic, etc. It also has the XML payload, which is custom to
> > your
> > > 
> > > > scenario. If you are using WSDM's WEF for formatting your events,
> > you
> > > > can 
> > > > convert the payload XML into a ManagementEvent object like so:
> > > > 
> > > > public void process(NotificationMessage msg)
> > > > {
> > > >     WefFactory factory = new SimpleWefFactory();
> > > > 
> > > >     Iterator i = msg.getMessageContent().iterator();
> > > > 
> > > >     while (i.hasNext())
> > > >     {
> > > >         Element eventXML = (Element)i.next();
> > > >         ManagementEvent event = factory.createEvent(eventXML);
> > > >         // use getters to process event data
> > > >     }
> > > > }
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:59:44
> > > > PM:
> > > > 
> > > > > No I do not want to write any HTTP server myself.  I want to
> take
> > > the
> > > > > received SOAP messages from the consumer web service convert
> > those
> > > > into
> > > > > Java Objects and forward them to my non webapp.  I can just
> > create
> > > a
> > > > > socket and send it that way I was just hoping that maybe I
> could
> > > just
> > > > > use the MUSE API to do this since I can set up services from a
> > non
> > > > > webapp. 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I don't see how you would receive the messages on a non-web
> > app...
> > > > > unless 
> > > > > you're writing your own little server and parsing the HTTP
> > > yourself.
> > > > If
> > > > > 
> > > > > that's the case, I'd advise you to rethink it - you can either
> > use
> > > > OSGi
> > > > > 
> > > > > for your app (the -osgi flag in wsdl2java) or use embedded
> Tomcat
> > > to
> > > > > host 
> > > > > the app (~5MB). Writing a decent HTTP server for one known
> client
> > > is
> > > > > easy 
> > > > > - writing a robust HTTP server is quite hard.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > > 12:42:53
> > > > > PM:
> > > > > 
> > > > > > See below <DAC>
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > The WsnTestClient should not be necessary in your real world
> > > > scenario
> > > > > -
> > > > > > 
> > > > > > it's just a driver to get the sample going. In your
> situation,
> > > you
> > > > > can 
> > > > > > just have the consumer resource subscribe to the producer
> > itself
> > > -
> > > > > the 
> > > > > > code to do that would be very similar to what's in
> > WsnTestClient
> > > > (the
> > > > > > use 
> > > > > > of NotificationProducerClient), but you would package it in
> > your
> > > > > > consumer 
> > > > > > resource instead of a command line app. You could perform the
> > > > > > subscription 
> > > > > > work in the initialize() method of one of your capabilities
> on
> > > the 
> > > > > > consumer side.
> > > > > > 
> > > > > > Alternatively, in a more complex scenario, you might have an 
> > > > > > "orchestrator" service that is subscribing all of the
> consumers
> > > to
> > > > > the 
> > > > > > events they need to handle. This scenario would be a lot like
> > the
> > > > > > sample 
> > > > > > in that a third service would call subscribe() and tell the
> > > > producer
> > > > > > which 
> > > > > > consumer resource to send the messages to. This is just like
> > the 
> > > > > > WsnTestClient app, except it would probably be a web service
> as
> > > > well.
> > > > > > 
> > > > > > If you want to forward messages received by one consumer to
> > > another
> > > > 
> > > > > > consumer(s), like a broker would, you just have to use the 
> > > > > > NotificationMessageListener API - you can implement a
> listener
> > > that
> > > > 
> > > > > > listens for all notifications and then uses
> > > > > NotificationConsumerClient
> > > > > > to 
> > > > > > forward the messages to other resources.
> > > > > > 
> > > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > > WEB)consumer's. 
> > > > > >   I want to have a consumer web service that just forwards
> > > messages
> > > > > > from the webapp 
> > > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > > NotificationMessageListener and
> > > > > > NotificationConsumerClient or do I need to use another means
> to
> > > > > forward
> > > > > > messages from a webapp to a
> > > > > > Non webapp.  I ask because I'm able to connect two
> webservices
> > > > > together
> > > > > > from a non webapp.  Thanks again for
> > > > > > all you help. 
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > > > 09:36:37
> > > > > > AM:
> > > > > > 
> > > > > > > Ok thanks.  Let's say for instance that I have two
> different
> > > > types
> > > > > of
> > > > > > > clients.  One type of clients that are within the same
> > firewall
> > > > as
> > > > > my
> > > > > > > web server and are on the same network.  The other is a
> > client
> > > > that
> > > > > > is
> > > > > > > outside the firewall and not on the same network.  I can
> see
> > > that
> > > > > the
> > > > > > > later would need a consumer web service running and the
> > > incoming
> > > > > > > requests would have to be forwarded to the user of the
> > consumer
> > > > web
> > > > > > > service. 
> > > > > > > 
> > > > > > > First question, when I use the API's to create the
> > subscription
> > > > > > between
> > > > > > > the publisher and consumer are there methods I can call
> that
> > > > would
> > > > > > > subscribe from the consumer to the (WsnTestClient) a
> > forwarded
> > > > > > message
> > > > > > > or is this something I have to do manually i.e create a
> > socket
> > > > from
> > > > > > the
> > > > > > > consumer to the WsnTestClient or is this already built into
> > > > > > MUSE/AXIS?
> > > > > > > 
> > > > > > > 
> > > > > > > Second question, when I am within the same network is there
> a
> > > way
> > > > > for
> > > > > > > me to set up a publisher/consumer without creating a
> consumer
> > > web
> > > > > > > service or is this not what is intended with MUSE and I
> would
> > > > still
> > > > > > > need a consumer web server and some mechanism to forward
> > > messages
> > > > > > from
> > > > > > > the consumer web service to the (WsnTestClient).
> > > > > > > 
> > > > > > > Thanks again for all your answers and help!!
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Each resource must be a web service resource with a URI
> > address
> > > > > that
> > > > > > > identifies its location.  So your consumer cannot be a java
> > > > program
> > > > > > > sitting outside of a webserver environment.  What you can
> do
> > is
> > > > > have
> > > > > > a
> > > > > > > consumer resource which routes calls to your java program.
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Makes sense.  I would like to set up a publisher / consumer
> > > > service
> > > > > > > were
> > > > > > > the publish is a web service and the consumer is java
> program
> > > (no
> > > > > > > web server running).  Is this possible? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm not really sure, if I understand your initial question,
> > so
> > > > I'll
> > > > > > try
> > > > > > > to explain it based on the assumption, that it's unclear
> why
> > > you
> > > > > need
> > > > > > > to
> > > > > > > deploy 2 servlets to make the sample work.
> > > > > > > 
> > > > > > > 
> > > > > > > For the producer/consumer example, they're mimicking a
> > service
> > > > > > > (producer) on a separate machine, which will inform the
> > client
> > > > > > machine
> > > > > > > (consumer) about changes in its state via a WSDM SOAP
> > message. 
> > > > > > > The WsnTestClient-file is just setting up the subscription
> > > > between
> > > > > > the
> > > > > > > producer/consumer via the SubscriptionManager.
> > > > > > > The actual consumer is the
> > > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > > 
> > > > > > > As for the error you're getting, I'm not sure if you
> deployed
> > > > both
> > > > > > the
> > > > > > > producer/consumer wars given the earlier assumption I made.
> > But
> > > > it
> > > > > > > seems
> > > > > > > that your WsnTestClient is trying to subscribe to your
> > producer
> > > > > > service
> > > > > > > and getting denied as the service is not available at the
> > > > specified
> > > > > > > location (according to the WsnTestClient.java property and
> > the
> > > > > > involved
> > > > > > > WSDL-files).
> > > > > > > 
> > > > > > > I don't have a clue yet about the error from you Tomcat log
> > > > files.
> > > > > > > 
> > > > > > > 
> > > > > > > Not really sure if this made any sense.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: 07 February 2007 13:43
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I'm using the official release and have performed step 2
> and
> > > here
> > > > > are
> > > > > > > the errors I'm getting.  Also could someone explain to me
> why
> > I
> > > > > need
> > > > > > to
> > > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > > > WsnTestClient should be the "Consumer". 
> > > > > > > 
> > > > > > > In my tomcat5 log file: 
> > > > > > > 
> > > > > > >  2007-02-07 08:34:31
> StandardWrapperValve[ApacheMuseServlet]:
> > > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> > exception
> > > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> > method
> > > > > > >
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > > not
> > > > > > > found
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > > .java:46)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > > ava:32)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > > tIsolationLayer.java:183)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > > iServlet.java:36)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > > 50)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > > >    at
> > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > > ationFilterChain.java:237)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > > terChain.java:157)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > > ve.java:214)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > > ntextValve.java:198)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > > ve.java:152)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > > a:137)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > > a:118)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:102)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > > .java:109)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > > ontext.java:104)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > > 520)
> > > > > > >    at
> > > > > > >
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > > 99)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > > Connection(Http11Protocol.java:705)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > > 77)
> > > > > > >    at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > > l.java:683)
> > > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > > 
> > > > > > > 
> > > > > > > Output from WsnTestClient:
> > > > > > > 
> > > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > > 
> > > > > > > <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://128.29.35.11:80
> > > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > > f-066b-ff60b581802c</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:A
> > > > > > > ddress>
> > > > > > >         </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://128.29.35.11:80
> > > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > > >             </wsnt:ConsumerReference>
> > > > > > >         </wsnt:Subscribe>
> > > > > > >     </soap:Body>
> > > > > > > </soap:Envelope>
> > > > > > > 
> > > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
> returned
> > > > HTTP
> > > > > > > response code: 500 for URL:
> > > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:279)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > > nt.java:235)
> > > > > > >         at
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > > ribe(NotificationProducerClient.java:96)
> > > > > > >         at
> > org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > > Source)
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Thank you for your support. I downloaded the nightly build
> > and
> > > > ran
> > > > > > > update_install.bat. The wsn-producer/consumer example
> worked
> > at
> > > > > once.
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > Good catch on the port number - make sure the port you're
> > using
> > > > for
> > > > > > > Tomcat uses the one that's specified in the
> > WsnTestClient.java
> > > > > > client.
> > > > > > > The port is part of the wsa:Address in the producer and
> > > consumer
> > > > > > EPRs,
> > > > > > > so if it's wrong, you need to change it (you can do this on
> > the
> > > > > > command
> > > > > > > line or by
> > > > > > > 
> > > > > > > modifying the test client code).
> > > > > > > 
> > > > > > > I'd also advise against building the source and trying to
> add
> > > the
> > > > > > > latest
> > > > > > > bits incrementally - if you want to do a full build, follow
> > the
> > > > > > > instructions on:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > If you want the latest nightly build, you can get it here:
> > > > > > > 
> > > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > > 
> > > > > > > Of course, except for the "step 2" that was added, neither
> of
> > > > those
> > > > > > > samples has changed in quite a while. You should be able to
> > get
> > > > > them
> > > > > > > working by taking the official release and performing step
> 2
> > -
> > > > let
> > > > > me
> > > > > > > know if the port number issue was indeed the problem.
> > > > > > > 
> > > > > > > Dan
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > > 
> > > > > > > > I'm not sure why you would want to make the whole thing
> > that 
> > > > > > > > complicated.
> > > > > > > > I seem to have no problem getting the producer/consumer
> > > example
> > > > > to
> > > > > > > work
> > > > > > > > with these simple steps.
> > > > > > > > 
> > > > > > > > 1) Download the nightly build (with the latest bug fixes)
> > > from 
> > > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > > 
> > > > > > > > 2) Run update-install
> > > > > > > > 
> > > > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > > > (wsn-producer)
> > > > > > > > and the WsnTestClient portType properties (producer_port
> &
> > > > > > > > consumer_port) are pointing to the right serviceport
> > > (according
> > > > > to
> > > > > > > your
> > > > > > > > Tomcat specs).
> > > > > > > > 
> > > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > > 
> > > > > > > > 5) Deploy and enjoy
> > > > > > > > 
> > > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > > WsnTestClient.java
> > > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> > portTypes
> > > > > match
> > > > > > > your
> > > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > > consumer
> > > > > > that's
> > > > > > > 
> > > > > > > > not listening on the given port. I could be wrong.
> > > > > > > > 
> > > > > > > > I know the portTypes have been a cause of some of my
> > problems
> > > > in
> > > > > > the 
> > > > > > > > past.
> > > > > > > > 
> > > > > > > > /Lenni
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: 05 February 2007 12:59
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > If you follow the instructions for "Eclipse Development"
> > > > > described
> > > > > > > here 
> > > > > > > > 
> > > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > > 
> > > > > > > > you get a separate project in Eclipse for every muse
> > > jar-file.
> > > > > You
> > > > > > > can
> > > > > > > > then export each project as a jar-file and replace the
> ones
> > > > found
> > > > > > in 
> > > > > > > > your MUSE_HOME/modules subdirectories. This way you get
> the
> > > > > latest 
> > > > > > > > bugfixes and updates.
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > You seemed to get farther than I did with the example.  I
> > > been
> > > > > able
> > > > > > > to
> > > > > > > > find on the internet that you need to add (#2) below, but
> > > your
> > > > > #3.
> > > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > > 
> > > > > > > > -----Original Message-----
> > > > > > > > From: Rosberg Mattias
> [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > > To: muse-user@ws.apache.org
> > > > > > > > Subject: wsn-producer/consumer example
> > > > > > > > 
> > > > > > > > I have tried to get the wsn-producer/consumer sample to
> > work
> > > > > > without 
> > > > > > > > success. I have done the following:
> > > > > > > > 
> > > > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > > > 
> > > > > > > > 2. Added row <resource-type
> use-router-persistence="true">
> > in
> > > 
> > > > > > > > wsn-consumer muse.xml
> > > > > > > > 
> > > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > > Replaced
> > > > > old
> > > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > > > 
> > > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > > 
> > > > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > > > WsnTestClient 
> > > > > > > > 
> > > > > > > > I still get the following error:
> > > > > > > > 
> > > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > > published
> > > > > > via 
> > > > > > > > wsnt:Notify  failed to reach its destination. The
> consumer
> > > may
> > > > be
> > > > > 
> > > > > > > > unavailable.
> > > > > > > The
> > > > > > > > original
> > > > > > > > error was: null
> > > > > > > > 2007-feb-05 08:17:37
> > > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > > run
> > > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > > 
> > > > > > > > Any ideas?
> > > > > > > > 
> > > > > > > > /Mattias
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > >
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail:
> muse-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail:
> > muse-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Ok that email was complete garbage.  I have no idea how I got it work.
I must have compiled it with a different version of java, because I
cannot recompile and generate a war file that will work.  I've kept
around my one that works.  Does MUSE only work with a certain version
of java and javac?  I've tried 1.6, 1.5, etc.  I have no idea what
version I used to create the war file that works.   

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Thursday, February 22, 2007 8:42 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Dan I had worked my own producer/consumer which is based on the wsn
producer/consumer and I seem to have it working.  The difference is
that I generated the code from the wsdl and when I deployed the war
file it has a different structure than the wsn producer/consumer that
you can download.  There is no WEB-INF/classes that actually has the
classes, the classes are jar'd up and put in the WEB-INF/lib directory.
I was reading online as well and it says that the classloader will not
find classes in the WEB-INF/classes area.  This seemed to fix my
problem.  I'm using Axis2.  So question, how is anyone able to get that
example to work?  I think somebody should add that to the website so
others don't have to go through the same hell I've been through.   

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 6:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

JIRA is our bug tracker:

        http://ws.apache.org/muse/issue-tracking.html

A few other people have replied who did get the samples working 
successfully - right now I'm inclined to believe it's just a problem
with 
a small configuration change or something. Here's what I did to re-test

the samples:

0. Download a clean muse-2.1.0-bin distribution

1. /bin/update-install.bat

2. cd /samples/j2ee/wsn-producer

3. ant

4. copy wsn-producer.war to TOMCAT_HOME/webapps

5. cd ../wsn-consumer

6. Added use-router-persistence attribute to this project's muse.xml
file 
(this bug is fixed in the 2.2 build):

        <resource-type use-router-persistence="true">

7. ant

8. copy wsn-consumer.war to TOMCAT_HOME/webapps

9. start Tomcat

10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient

11. confirm output in server console


How are your steps different? Please include as much detail as
possible, 
especially with any modifications you might have made for your project.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
PM:

> What is JIRA?  Do you have any idea what this might be?  Has anybody
> been able to get the wsn-producer/wsn-consumer working? 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 3:51 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> well, the first thing it tells me is that the wsn-producer sample,
not 
> wsn-consumer, is throwing the exception - that's where the class is
> from 
> in that scenario. I'll have to try out a few configurations to see if
I
> 
> can reproduce it. Attach your WAR file to JIRA if you can...
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
> PM:
> 
> > Yes.  I'm not sure what's going on,but this is the exception that's
> > thrown in the catalina.out file.  Any ideas?  Thanks for your help.

> > 
> > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
class
> > specified was not found:
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > Make sure the correct .class or .jar file is in the classpath.
> >    at
> > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > entationClass(SimpleCapabilityDescriptor.java:49)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > apabilityDescriptor.java:90)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > tyDefinitions(SimpleResourceDescriptor.java:95)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > ourceDescriptor.java:397)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > eploymentDescriptor.java:171)
> >    at
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:144)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:799)
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 2:33 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > just to clarify - you say you're deploying the wsn-consumer sample
> > as-is 
> > (run 'ant' and copy over WAR) and it's not receiving the
> notifications?
> > 
> > are you deploying it in the same container as the producer? if not,
> did
> > 
> > you make sure to change the port number used in the consumer's URI
> (in
> > the 
> > test client)?
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
12:16:58
> > PM:
> > 
> > >  The example I thought worked didn't.  When I view the
catalina.out
> > > file
> > > the wsn-consumer does not receive publish updates, it seems to
> > > subscribe correctly.  A JavaClassNotFound exception is thrown
when
> > > trying to access ConsumerCapabilityImpl.class.  Everything seems
to
> > be
> > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > from within the NotificationMessageListener API, you'll get a 
> > > NotificationMessage object(s) representing the message. The 
> > > NotificationMessage will have getter methods for things like the
> > > producer 
> > > EPR, topic, etc. It also has the XML payload, which is custom to
> your
> > 
> > > scenario. If you are using WSDM's WEF for formatting your events,
> you
> > > can 
> > > convert the payload XML into a ManagementEvent object like so:
> > > 
> > > public void process(NotificationMessage msg)
> > > {
> > >     WefFactory factory = new SimpleWefFactory();
> > > 
> > >     Iterator i = msg.getMessageContent().iterator();
> > > 
> > >     while (i.hasNext())
> > >     {
> > >         Element eventXML = (Element)i.next();
> > >         ManagementEvent event = factory.createEvent(eventXML);
> > >         // use getters to process event data
> > >     }
> > > }
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:59:44
> > > PM:
> > > 
> > > > No I do not want to write any HTTP server myself.  I want to
take
> > the
> > > > received SOAP messages from the consumer web service convert
> those
> > > into
> > > > Java Objects and forward them to my non webapp.  I can just
> create
> > a
> > > > socket and send it that way I was just hoping that maybe I
could
> > just
> > > > use the MUSE API to do this since I can set up services from a
> non
> > > > webapp. 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I don't see how you would receive the messages on a non-web
> app...
> > > > unless 
> > > > you're writing your own little server and parsing the HTTP
> > yourself.
> > > If
> > > > 
> > > > that's the case, I'd advise you to rethink it - you can either
> use
> > > OSGi
> > > > 
> > > > for your app (the -osgi flag in wsdl2java) or use embedded
Tomcat
> > to
> > > > host 
> > > > the app (~5MB). Writing a decent HTTP server for one known
client
> > is
> > > > easy 
> > > > - writing a robust HTTP server is quite hard.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:42:53
> > > > PM:
> > > > 
> > > > > See below <DAC>
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > The WsnTestClient should not be necessary in your real world
> > > scenario
> > > > -
> > > > > 
> > > > > it's just a driver to get the sample going. In your
situation,
> > you
> > > > can 
> > > > > just have the consumer resource subscribe to the producer
> itself
> > -
> > > > the 
> > > > > code to do that would be very similar to what's in
> WsnTestClient
> > > (the
> > > > > use 
> > > > > of NotificationProducerClient), but you would package it in
> your
> > > > > consumer 
> > > > > resource instead of a command line app. You could perform the
> > > > > subscription 
> > > > > work in the initialize() method of one of your capabilities
on
> > the 
> > > > > consumer side.
> > > > > 
> > > > > Alternatively, in a more complex scenario, you might have an 
> > > > > "orchestrator" service that is subscribing all of the
consumers
> > to
> > > > the 
> > > > > events they need to handle. This scenario would be a lot like
> the
> > > > > sample 
> > > > > in that a third service would call subscribe() and tell the
> > > producer
> > > > > which 
> > > > > consumer resource to send the messages to. This is just like
> the 
> > > > > WsnTestClient app, except it would probably be a web service
as
> > > well.
> > > > > 
> > > > > If you want to forward messages received by one consumer to
> > another
> > > 
> > > > > consumer(s), like a broker would, you just have to use the 
> > > > > NotificationMessageListener API - you can implement a
listener
> > that
> > > 
> > > > > listens for all notifications and then uses
> > > > NotificationConsumerClient
> > > > > to 
> > > > > forward the messages to other resources.
> > > > > 
> > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > WEB)consumer's. 
> > > > >   I want to have a consumer web service that just forwards
> > messages
> > > > > from the webapp 
> > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > NotificationMessageListener and
> > > > > NotificationConsumerClient or do I need to use another means
to
> > > > forward
> > > > > messages from a webapp to a
> > > > > Non webapp.  I ask because I'm able to connect two
webservices
> > > > together
> > > > > from a non webapp.  Thanks again for
> > > > > all you help. 
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > > 09:36:37
> > > > > AM:
> > > > > 
> > > > > > Ok thanks.  Let's say for instance that I have two
different
> > > types
> > > > of
> > > > > > clients.  One type of clients that are within the same
> firewall
> > > as
> > > > my
> > > > > > web server and are on the same network.  The other is a
> client
> > > that
> > > > > is
> > > > > > outside the firewall and not on the same network.  I can
see
> > that
> > > > the
> > > > > > later would need a consumer web service running and the
> > incoming
> > > > > > requests would have to be forwarded to the user of the
> consumer
> > > web
> > > > > > service. 
> > > > > > 
> > > > > > First question, when I use the API's to create the
> subscription
> > > > > between
> > > > > > the publisher and consumer are there methods I can call
that
> > > would
> > > > > > subscribe from the consumer to the (WsnTestClient) a
> forwarded
> > > > > message
> > > > > > or is this something I have to do manually i.e create a
> socket
> > > from
> > > > > the
> > > > > > consumer to the WsnTestClient or is this already built into
> > > > > MUSE/AXIS?
> > > > > > 
> > > > > > 
> > > > > > Second question, when I am within the same network is there
a
> > way
> > > > for
> > > > > > me to set up a publisher/consumer without creating a
consumer
> > web
> > > > > > service or is this not what is intended with MUSE and I
would
> > > still
> > > > > > need a consumer web server and some mechanism to forward
> > messages
> > > > > from
> > > > > > the consumer web service to the (WsnTestClient).
> > > > > > 
> > > > > > Thanks again for all your answers and help!!
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Each resource must be a web service resource with a URI
> address
> > > > that
> > > > > > identifies its location.  So your consumer cannot be a java
> > > program
> > > > > > sitting outside of a webserver environment.  What you can
do
> is
> > > > have
> > > > > a
> > > > > > consumer resource which routes calls to your java program.
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Makes sense.  I would like to set up a publisher / consumer
> > > service
> > > > > > were
> > > > > > the publish is a web service and the consumer is java
program
> > (no
> > > > > > web server running).  Is this possible? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm not really sure, if I understand your initial question,
> so
> > > I'll
> > > > > try
> > > > > > to explain it based on the assumption, that it's unclear
why
> > you
> > > > need
> > > > > > to
> > > > > > deploy 2 servlets to make the sample work.
> > > > > > 
> > > > > > 
> > > > > > For the producer/consumer example, they're mimicking a
> service
> > > > > > (producer) on a separate machine, which will inform the
> client
> > > > > machine
> > > > > > (consumer) about changes in its state via a WSDM SOAP
> message. 
> > > > > > The WsnTestClient-file is just setting up the subscription
> > > between
> > > > > the
> > > > > > producer/consumer via the SubscriptionManager.
> > > > > > The actual consumer is the
> > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > 
> > > > > > As for the error you're getting, I'm not sure if you
deployed
> > > both
> > > > > the
> > > > > > producer/consumer wars given the earlier assumption I made.
> But
> > > it
> > > > > > seems
> > > > > > that your WsnTestClient is trying to subscribe to your
> producer
> > > > > service
> > > > > > and getting denied as the service is not available at the
> > > specified
> > > > > > location (according to the WsnTestClient.java property and
> the
> > > > > involved
> > > > > > WSDL-files).
> > > > > > 
> > > > > > I don't have a clue yet about the error from you Tomcat log
> > > files.
> > > > > > 
> > > > > > 
> > > > > > Not really sure if this made any sense.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: 07 February 2007 13:43
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm using the official release and have performed step 2
and
> > here
> > > > are
> > > > > > the errors I'm getting.  Also could someone explain to me
why
> I
> > > > need
> > > > > to
> > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > > WsnTestClient should be the "Consumer". 
> > > > > > 
> > > > > > In my tomcat5 log file: 
> > > > > > 
> > > > > >  2007-02-07 08:34:31
StandardWrapperValve[ApacheMuseServlet]:
> > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> exception
> > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> method
> > > > > >
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > not
> > > > > > found
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > .java:46)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > ava:32)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > tIsolationLayer.java:183)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > iServlet.java:36)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > 50)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > ationFilterChain.java:237)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > terChain.java:157)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > ve.java:214)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > ntextValve.java:198)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > ve.java:152)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > a:137)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > a:118)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:102)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > .java:109)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > 99)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > Connection(Http11Protocol.java:705)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > 77)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > l.java:683)
> > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > 
> > > > > > 
> > > > > > Output from WsnTestClient:
> > > > > > 
> > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > 
> > > > > > <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://128.29.35.11:80
> > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > f-066b-ff60b581802c</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:A
> > > > > > ddress>
> > > > > >         </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://128.29.35.11:80
> > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > >             </wsnt:ConsumerReference>
> > > > > >         </wsnt:Subscribe>
> > > > > >     </soap:Body>
> > > > > > </soap:Envelope>
> > > > > > 
> > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
returned
> > > HTTP
> > > > > > response code: 500 for URL:
> > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:279)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:235)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > ribe(NotificationProducerClient.java:96)
> > > > > >         at
> org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > Source)
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Thank you for your support. I downloaded the nightly build
> and
> > > ran
> > > > > > update_install.bat. The wsn-producer/consumer example
worked
> at
> > > > once.
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Good catch on the port number - make sure the port you're
> using
> > > for
> > > > > > Tomcat uses the one that's specified in the
> WsnTestClient.java
> > > > > client.
> > > > > > The port is part of the wsa:Address in the producer and
> > consumer
> > > > > EPRs,
> > > > > > so if it's wrong, you need to change it (you can do this on
> the
> > > > > command
> > > > > > line or by
> > > > > > 
> > > > > > modifying the test client code).
> > > > > > 
> > > > > > I'd also advise against building the source and trying to
add
> > the
> > > > > > latest
> > > > > > bits incrementally - if you want to do a full build, follow
> the
> > > > > > instructions on:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > If you want the latest nightly build, you can get it here:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > 
> > > > > > Of course, except for the "step 2" that was added, neither
of
> > > those
> > > > > > samples has changed in quite a while. You should be able to
> get
> > > > them
> > > > > > working by taking the official release and performing step
2
> -
> > > let
> > > > me
> > > > > > know if the port number issue was indeed the problem.
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > 
> > > > > > > I'm not sure why you would want to make the whole thing
> that 
> > > > > > > complicated.
> > > > > > > I seem to have no problem getting the producer/consumer
> > example
> > > > to
> > > > > > work
> > > > > > > with these simple steps.
> > > > > > > 
> > > > > > > 1) Download the nightly build (with the latest bug fixes)
> > from 
> > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > 
> > > > > > > 2) Run update-install
> > > > > > > 
> > > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > > (wsn-producer)
> > > > > > > and the WsnTestClient portType properties (producer_port
&
> > > > > > > consumer_port) are pointing to the right serviceport
> > (according
> > > > to
> > > > > > your
> > > > > > > Tomcat specs).
> > > > > > > 
> > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > 
> > > > > > > 5) Deploy and enjoy
> > > > > > > 
> > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > WsnTestClient.java
> > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> portTypes
> > > > match
> > > > > > your
> > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > consumer
> > > > > that's
> > > > > > 
> > > > > > > not listening on the given port. I could be wrong.
> > > > > > > 
> > > > > > > I know the portTypes have been a cause of some of my
> problems
> > > in
> > > > > the 
> > > > > > > past.
> > > > > > > 
> > > > > > > /Lenni
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: 05 February 2007 12:59
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > If you follow the instructions for "Eclipse Development"
> > > > described
> > > > > > here 
> > > > > > > 
> > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > you get a separate project in Eclipse for every muse
> > jar-file.
> > > > You
> > > > > > can
> > > > > > > then export each project as a jar-file and replace the
ones
> > > found
> > > > > in 
> > > > > > > your MUSE_HOME/modules subdirectories. This way you get
the
> > > > latest 
> > > > > > > bugfixes and updates.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > You seemed to get farther than I did with the example.  I
> > been
> > > > able
> > > > > > to
> > > > > > > find on the internet that you need to add (#2) below, but
> > your
> > > > #3.
> > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I have tried to get the wsn-producer/consumer sample to
> work
> > > > > without 
> > > > > > > success. I have done the following:
> > > > > > > 
> > > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > > 
> > > > > > > 2. Added row <resource-type
use-router-persistence="true">
> in
> > 
> > > > > > > wsn-consumer muse.xml
> > > > > > > 
> > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > Replaced
> > > > old
> > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > > 
> > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > 
> > > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > > WsnTestClient 
> > > > > > > 
> > > > > > > I still get the following error:
> > > > > > > 
> > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > published
> > > > > via 
> > > > > > > wsnt:Notify  failed to reach its destination. The
consumer
> > may
> > > be
> > > > 
> > > > > > > unavailable.
> > > > > > The
> > > > > > > original
> > > > > > > error was: null
> > > > > > > 2007-feb-05 08:17:37
> > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > run
> > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > 
> > > > > > > Any ideas?
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Dan I had worked my own producer/consumer which is based on the wsn
producer/consumer and I seem to have it working.  The difference is
that I generated the code from the wsdl and when I deployed the war
file it has a different structure than the wsn producer/consumer that
you can download.  There is no WEB-INF/classes that actually has the
classes, the classes are jar'd up and put in the WEB-INF/lib directory.
I was reading online as well and it says that the classloader will not
find classes in the WEB-INF/classes area.  This seemed to fix my
problem.  I'm using Axis2.  So question, how is anyone able to get that
example to work?  I think somebody should add that to the website so
others don't have to go through the same hell I've been through.   

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 6:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

JIRA is our bug tracker:

        http://ws.apache.org/muse/issue-tracking.html

A few other people have replied who did get the samples working 
successfully - right now I'm inclined to believe it's just a problem
with 
a small configuration change or something. Here's what I did to re-test

the samples:

0. Download a clean muse-2.1.0-bin distribution

1. /bin/update-install.bat

2. cd /samples/j2ee/wsn-producer

3. ant

4. copy wsn-producer.war to TOMCAT_HOME/webapps

5. cd ../wsn-consumer

6. Added use-router-persistence attribute to this project's muse.xml
file 
(this bug is fixed in the 2.2 build):

        <resource-type use-router-persistence="true">

7. ant

8. copy wsn-consumer.war to TOMCAT_HOME/webapps

9. start Tomcat

10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient

11. confirm output in server console


How are your steps different? Please include as much detail as
possible, 
especially with any modifications you might have made for your project.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14
PM:

> What is JIRA?  Do you have any idea what this might be?  Has anybody
> been able to get the wsn-producer/wsn-consumer working? 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 3:51 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> well, the first thing it tells me is that the wsn-producer sample,
not 
> wsn-consumer, is throwing the exception - that's where the class is
> from 
> in that scenario. I'll have to try out a few configurations to see if
I
> 
> can reproduce it. Attach your WAR file to JIRA if you can...
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
> PM:
> 
> > Yes.  I'm not sure what's going on,but this is the exception that's
> > thrown in the catalina.out file.  Any ideas?  Thanks for your help.

> > 
> > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java
class
> > specified was not found:
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > Make sure the correct .class or .jar file is in the classpath.
> >    at
> > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > entationClass(SimpleCapabilityDescriptor.java:49)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > apabilityDescriptor.java:90)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > tyDefinitions(SimpleResourceDescriptor.java:95)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > ourceDescriptor.java:397)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> >    at
> >
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > eploymentDescriptor.java:171)
> >    at
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:144)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:799)
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 2:33 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > just to clarify - you say you're deploying the wsn-consumer sample
> > as-is 
> > (run 'ant' and copy over WAR) and it's not receiving the
> notifications?
> > 
> > are you deploying it in the same container as the producer? if not,
> did
> > 
> > you make sure to change the port number used in the consumer's URI
> (in
> > the 
> > test client)?
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007
12:16:58
> > PM:
> > 
> > >  The example I thought worked didn't.  When I view the
catalina.out
> > > file
> > > the wsn-consumer does not receive publish updates, it seems to
> > > subscribe correctly.  A JavaClassNotFound exception is thrown
when
> > > trying to access ConsumerCapabilityImpl.class.  Everything seems
to
> > be
> > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > from within the NotificationMessageListener API, you'll get a 
> > > NotificationMessage object(s) representing the message. The 
> > > NotificationMessage will have getter methods for things like the
> > > producer 
> > > EPR, topic, etc. It also has the XML payload, which is custom to
> your
> > 
> > > scenario. If you are using WSDM's WEF for formatting your events,
> you
> > > can 
> > > convert the payload XML into a ManagementEvent object like so:
> > > 
> > > public void process(NotificationMessage msg)
> > > {
> > >     WefFactory factory = new SimpleWefFactory();
> > > 
> > >     Iterator i = msg.getMessageContent().iterator();
> > > 
> > >     while (i.hasNext())
> > >     {
> > >         Element eventXML = (Element)i.next();
> > >         ManagementEvent event = factory.createEvent(eventXML);
> > >         // use getters to process event data
> > >     }
> > > }
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:59:44
> > > PM:
> > > 
> > > > No I do not want to write any HTTP server myself.  I want to
take
> > the
> > > > received SOAP messages from the consumer web service convert
> those
> > > into
> > > > Java Objects and forward them to my non webapp.  I can just
> create
> > a
> > > > socket and send it that way I was just hoping that maybe I
could
> > just
> > > > use the MUSE API to do this since I can set up services from a
> non
> > > > webapp. 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I don't see how you would receive the messages on a non-web
> app...
> > > > unless 
> > > > you're writing your own little server and parsing the HTTP
> > yourself.
> > > If
> > > > 
> > > > that's the case, I'd advise you to rethink it - you can either
> use
> > > OSGi
> > > > 
> > > > for your app (the -osgi flag in wsdl2java) or use embedded
Tomcat
> > to
> > > > host 
> > > > the app (~5MB). Writing a decent HTTP server for one known
client
> > is
> > > > easy 
> > > > - writing a robust HTTP server is quite hard.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:42:53
> > > > PM:
> > > > 
> > > > > See below <DAC>
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > The WsnTestClient should not be necessary in your real world
> > > scenario
> > > > -
> > > > > 
> > > > > it's just a driver to get the sample going. In your
situation,
> > you
> > > > can 
> > > > > just have the consumer resource subscribe to the producer
> itself
> > -
> > > > the 
> > > > > code to do that would be very similar to what's in
> WsnTestClient
> > > (the
> > > > > use 
> > > > > of NotificationProducerClient), but you would package it in
> your
> > > > > consumer 
> > > > > resource instead of a command line app. You could perform the
> > > > > subscription 
> > > > > work in the initialize() method of one of your capabilities
on
> > the 
> > > > > consumer side.
> > > > > 
> > > > > Alternatively, in a more complex scenario, you might have an 
> > > > > "orchestrator" service that is subscribing all of the
consumers
> > to
> > > > the 
> > > > > events they need to handle. This scenario would be a lot like
> the
> > > > > sample 
> > > > > in that a third service would call subscribe() and tell the
> > > producer
> > > > > which 
> > > > > consumer resource to send the messages to. This is just like
> the 
> > > > > WsnTestClient app, except it would probably be a web service
as
> > > well.
> > > > > 
> > > > > If you want to forward messages received by one consumer to
> > another
> > > 
> > > > > consumer(s), like a broker would, you just have to use the 
> > > > > NotificationMessageListener API - you can implement a
listener
> > that
> > > 
> > > > > listens for all notifications and then uses
> > > > NotificationConsumerClient
> > > > > to 
> > > > > forward the messages to other resources.
> > > > > 
> > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > WEB)consumer's. 
> > > > >   I want to have a consumer web service that just forwards
> > messages
> > > > > from the webapp 
> > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > NotificationMessageListener and
> > > > > NotificationConsumerClient or do I need to use another means
to
> > > > forward
> > > > > messages from a webapp to a
> > > > > Non webapp.  I ask because I'm able to connect two
webservices
> > > > together
> > > > > from a non webapp.  Thanks again for
> > > > > all you help. 
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > > 09:36:37
> > > > > AM:
> > > > > 
> > > > > > Ok thanks.  Let's say for instance that I have two
different
> > > types
> > > > of
> > > > > > clients.  One type of clients that are within the same
> firewall
> > > as
> > > > my
> > > > > > web server and are on the same network.  The other is a
> client
> > > that
> > > > > is
> > > > > > outside the firewall and not on the same network.  I can
see
> > that
> > > > the
> > > > > > later would need a consumer web service running and the
> > incoming
> > > > > > requests would have to be forwarded to the user of the
> consumer
> > > web
> > > > > > service. 
> > > > > > 
> > > > > > First question, when I use the API's to create the
> subscription
> > > > > between
> > > > > > the publisher and consumer are there methods I can call
that
> > > would
> > > > > > subscribe from the consumer to the (WsnTestClient) a
> forwarded
> > > > > message
> > > > > > or is this something I have to do manually i.e create a
> socket
> > > from
> > > > > the
> > > > > > consumer to the WsnTestClient or is this already built into
> > > > > MUSE/AXIS?
> > > > > > 
> > > > > > 
> > > > > > Second question, when I am within the same network is there
a
> > way
> > > > for
> > > > > > me to set up a publisher/consumer without creating a
consumer
> > web
> > > > > > service or is this not what is intended with MUSE and I
would
> > > still
> > > > > > need a consumer web server and some mechanism to forward
> > messages
> > > > > from
> > > > > > the consumer web service to the (WsnTestClient).
> > > > > > 
> > > > > > Thanks again for all your answers and help!!
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Each resource must be a web service resource with a URI
> address
> > > > that
> > > > > > identifies its location.  So your consumer cannot be a java
> > > program
> > > > > > sitting outside of a webserver environment.  What you can
do
> is
> > > > have
> > > > > a
> > > > > > consumer resource which routes calls to your java program.
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Makes sense.  I would like to set up a publisher / consumer
> > > service
> > > > > > were
> > > > > > the publish is a web service and the consumer is java
program
> > (no
> > > > > > web server running).  Is this possible? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm not really sure, if I understand your initial question,
> so
> > > I'll
> > > > > try
> > > > > > to explain it based on the assumption, that it's unclear
why
> > you
> > > > need
> > > > > > to
> > > > > > deploy 2 servlets to make the sample work.
> > > > > > 
> > > > > > 
> > > > > > For the producer/consumer example, they're mimicking a
> service
> > > > > > (producer) on a separate machine, which will inform the
> client
> > > > > machine
> > > > > > (consumer) about changes in its state via a WSDM SOAP
> message. 
> > > > > > The WsnTestClient-file is just setting up the subscription
> > > between
> > > > > the
> > > > > > producer/consumer via the SubscriptionManager.
> > > > > > The actual consumer is the
> > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > 
> > > > > > As for the error you're getting, I'm not sure if you
deployed
> > > both
> > > > > the
> > > > > > producer/consumer wars given the earlier assumption I made.
> But
> > > it
> > > > > > seems
> > > > > > that your WsnTestClient is trying to subscribe to your
> producer
> > > > > service
> > > > > > and getting denied as the service is not available at the
> > > specified
> > > > > > location (according to the WsnTestClient.java property and
> the
> > > > > involved
> > > > > > WSDL-files).
> > > > > > 
> > > > > > I don't have a clue yet about the error from you Tomcat log
> > > files.
> > > > > > 
> > > > > > 
> > > > > > Not really sure if this made any sense.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: 07 February 2007 13:43
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm using the official release and have performed step 2
and
> > here
> > > > are
> > > > > > the errors I'm getting.  Also could someone explain to me
why
> I
> > > > need
> > > > > to
> > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > > WsnTestClient should be the "Consumer". 
> > > > > > 
> > > > > > In my tomcat5 log file: 
> > > > > > 
> > > > > >  2007-02-07 08:34:31
StandardWrapperValve[ApacheMuseServlet]:
> > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> exception
> > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> method
> > > > > >
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > not
> > > > > > found
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > .java:46)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > ava:32)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > tIsolationLayer.java:183)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > iServlet.java:36)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > 50)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > ationFilterChain.java:237)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > terChain.java:157)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > ve.java:214)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > ntextValve.java:198)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > ve.java:152)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > a:137)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > a:118)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:102)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > .java:109)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > 99)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > Connection(Http11Protocol.java:705)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > 77)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > l.java:683)
> > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > 
> > > > > > 
> > > > > > Output from WsnTestClient:
> > > > > > 
> > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > 
> > > > > > <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://128.29.35.11:80
> > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > f-066b-ff60b581802c</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:A
> > > > > > ddress>
> > > > > >         </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://128.29.35.11:80
> > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > >             </wsnt:ConsumerReference>
> > > > > >         </wsnt:Subscribe>
> > > > > >     </soap:Body>
> > > > > > </soap:Envelope>
> > > > > > 
> > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server
returned
> > > HTTP
> > > > > > response code: 500 for URL:
> > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:279)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:235)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > ribe(NotificationProducerClient.java:96)
> > > > > >         at
> org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > Source)
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Thank you for your support. I downloaded the nightly build
> and
> > > ran
> > > > > > update_install.bat. The wsn-producer/consumer example
worked
> at
> > > > once.
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Good catch on the port number - make sure the port you're
> using
> > > for
> > > > > > Tomcat uses the one that's specified in the
> WsnTestClient.java
> > > > > client.
> > > > > > The port is part of the wsa:Address in the producer and
> > consumer
> > > > > EPRs,
> > > > > > so if it's wrong, you need to change it (you can do this on
> the
> > > > > command
> > > > > > line or by
> > > > > > 
> > > > > > modifying the test client code).
> > > > > > 
> > > > > > I'd also advise against building the source and trying to
add
> > the
> > > > > > latest
> > > > > > bits incrementally - if you want to do a full build, follow
> the
> > > > > > instructions on:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > If you want the latest nightly build, you can get it here:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > 
> > > > > > Of course, except for the "step 2" that was added, neither
of
> > > those
> > > > > > samples has changed in quite a while. You should be able to
> get
> > > > them
> > > > > > working by taking the official release and performing step
2
> -
> > > let
> > > > me
> > > > > > know if the port number issue was indeed the problem.
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > 
> > > > > > > I'm not sure why you would want to make the whole thing
> that 
> > > > > > > complicated.
> > > > > > > I seem to have no problem getting the producer/consumer
> > example
> > > > to
> > > > > > work
> > > > > > > with these simple steps.
> > > > > > > 
> > > > > > > 1) Download the nightly build (with the latest bug fixes)
> > from 
> > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > 
> > > > > > > 2) Run update-install
> > > > > > > 
> > > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > > (wsn-producer)
> > > > > > > and the WsnTestClient portType properties (producer_port
&
> > > > > > > consumer_port) are pointing to the right serviceport
> > (according
> > > > to
> > > > > > your
> > > > > > > Tomcat specs).
> > > > > > > 
> > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > 
> > > > > > > 5) Deploy and enjoy
> > > > > > > 
> > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > WsnTestClient.java
> > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> portTypes
> > > > match
> > > > > > your
> > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > consumer
> > > > > that's
> > > > > > 
> > > > > > > not listening on the given port. I could be wrong.
> > > > > > > 
> > > > > > > I know the portTypes have been a cause of some of my
> problems
> > > in
> > > > > the 
> > > > > > > past.
> > > > > > > 
> > > > > > > /Lenni
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: 05 February 2007 12:59
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > If you follow the instructions for "Eclipse Development"
> > > > described
> > > > > > here 
> > > > > > > 
> > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > you get a separate project in Eclipse for every muse
> > jar-file.
> > > > You
> > > > > > can
> > > > > > > then export each project as a jar-file and replace the
ones
> > > found
> > > > > in 
> > > > > > > your MUSE_HOME/modules subdirectories. This way you get
the
> > > > latest 
> > > > > > > bugfixes and updates.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > You seemed to get farther than I did with the example.  I
> > been
> > > > able
> > > > > > to
> > > > > > > find on the internet that you need to add (#2) below, but
> > your
> > > > #3.
> > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias
[mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I have tried to get the wsn-producer/consumer sample to
> work
> > > > > without 
> > > > > > > success. I have done the following:
> > > > > > > 
> > > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > > 
> > > > > > > 2. Added row <resource-type
use-router-persistence="true">
> in
> > 
> > > > > > > wsn-consumer muse.xml
> > > > > > > 
> > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > Replaced
> > > > old
> > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > > 
> > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > 
> > > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > > WsnTestClient 
> > > > > > > 
> > > > > > > I still get the following error:
> > > > > > > 
> > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > published
> > > > > via 
> > > > > > > wsnt:Notify  failed to reach its destination. The
consumer
> > may
> > > be
> > > > 
> > > > > > > unavailable.
> > > > > > The
> > > > > > > original
> > > > > > > error was: null
> > > > > > > 2007-feb-05 08:17:37
> > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > run
> > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > 
> > > > > > > Any ideas?
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail:
muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by Rosberg Mattias <Ma...@tetrapak.com>.
Are you running 2.1.0 or 2.2.0 from the nightly builds? I only managed to get the wsn-producer/consumer sample to work with 2.2.0. Performed these steps:

1. Download the 2.2.0 snapshot from nightly builds.

2. Running update_install.bat.

3. building the samples using ant.

4. Deploy war-files on Tomcat 5.5.20.


-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Wed 2/21/2007 11:45 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
What is JIRA?  Do you have any idea what this might be?  Has anybody
been able to get the wsn-producer/wsn-consumer working? 

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 3:51 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

well, the first thing it tells me is that the wsn-producer sample, not 
wsn-consumer, is throwing the exception - that's where the class is
from 
in that scenario. I'll have to try out a few configurations to see if I

can reproduce it. Attach your WAR file to JIRA if you can...

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
PM:

> Yes.  I'm not sure what's going on,but this is the exception that's
> thrown in the catalina.out file.  Any ideas?  Thanks for your help. 
> 
> java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
> specified was not found:
org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> Make sure the correct .class or .jar file is in the classpath.
>    at
> org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
>    at
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> entationClass(SimpleCapabilityDescriptor.java:49)
>    at
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> apabilityDescriptor.java:90)
>    at
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> tyDefinitions(SimpleResourceDescriptor.java:95)
>    at
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> ourceDescriptor.java:397)
>    at
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> ceDefinitions(SimpleDeploymentDescriptor.java:72)
>    at
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> eploymentDescriptor.java:171)
>    at
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:144)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:799)
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 2:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> just to clarify - you say you're deploying the wsn-consumer sample
> as-is 
> (run 'ant' and copy over WAR) and it's not receiving the
notifications?
> 
> are you deploying it in the same container as the producer? if not,
did
> 
> you make sure to change the port number used in the consumer's URI
(in
> the 
> test client)?
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
> PM:
> 
> >  The example I thought worked didn't.  When I view the catalina.out
> > file
> > the wsn-consumer does not receive publish updates, it seems to
> > subscribe correctly.  A JavaClassNotFound exception is thrown when
> > trying to access ConsumerCapabilityImpl.class.  Everything seems to
> be
> > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 1:08 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > from within the NotificationMessageListener API, you'll get a 
> > NotificationMessage object(s) representing the message. The 
> > NotificationMessage will have getter methods for things like the
> > producer 
> > EPR, topic, etc. It also has the XML payload, which is custom to
your
> 
> > scenario. If you are using WSDM's WEF for formatting your events,
you
> > can 
> > convert the payload XML into a ManagementEvent object like so:
> > 
> > public void process(NotificationMessage msg)
> > {
> >     WefFactory factory = new SimpleWefFactory();
> > 
> >     Iterator i = msg.getMessageContent().iterator();
> > 
> >     while (i.hasNext())
> >     {
> >         Element eventXML = (Element)i.next();
> >         ManagementEvent event = factory.createEvent(eventXML);
> >         // use getters to process event data
> >     }
> > }
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:59:44
> > PM:
> > 
> > > No I do not want to write any HTTP server myself.  I want to take
> the
> > > received SOAP messages from the consumer web service convert
those
> > into
> > > Java Objects and forward them to my non webapp.  I can just
create
> a
> > > socket and send it that way I was just hoping that maybe I could
> just
> > > use the MUSE API to do this since I can set up services from a
non
> > > webapp. 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I don't see how you would receive the messages on a non-web
app...
> > > unless 
> > > you're writing your own little server and parsing the HTTP
> yourself.
> > If
> > > 
> > > that's the case, I'd advise you to rethink it - you can either
use
> > OSGi
> > > 
> > > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
> to
> > > host 
> > > the app (~5MB). Writing a decent HTTP server for one known client
> is
> > > easy 
> > > - writing a robust HTTP server is quite hard.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:42:53
> > > PM:
> > > 
> > > > See below <DAC>
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > The WsnTestClient should not be necessary in your real world
> > scenario
> > > -
> > > > 
> > > > it's just a driver to get the sample going. In your situation,
> you
> > > can 
> > > > just have the consumer resource subscribe to the producer
itself
> -
> > > the 
> > > > code to do that would be very similar to what's in
WsnTestClient
> > (the
> > > > use 
> > > > of NotificationProducerClient), but you would package it in
your
> > > > consumer 
> > > > resource instead of a command line app. You could perform the
> > > > subscription 
> > > > work in the initialize() method of one of your capabilities on
> the 
> > > > consumer side.
> > > > 
> > > > Alternatively, in a more complex scenario, you might have an 
> > > > "orchestrator" service that is subscribing all of the consumers
> to
> > > the 
> > > > events they need to handle. This scenario would be a lot like
the
> > > > sample 
> > > > in that a third service would call subscribe() and tell the
> > producer
> > > > which 
> > > > consumer resource to send the messages to. This is just like
the 
> > > > WsnTestClient app, except it would probably be a web service as
> > well.
> > > > 
> > > > If you want to forward messages received by one consumer to
> another
> > 
> > > > consumer(s), like a broker would, you just have to use the 
> > > > NotificationMessageListener API - you can implement a listener
> that
> > 
> > > > listens for all notifications and then uses
> > > NotificationConsumerClient
> > > > to 
> > > > forward the messages to other resources.
> > > > 
> > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > WEB)consumer's. 
> > > >   I want to have a consumer web service that just forwards
> messages
> > > > from the webapp 
> > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > NotificationMessageListener and
> > > > NotificationConsumerClient or do I need to use another means to
> > > forward
> > > > messages from a webapp to a
> > > > Non webapp.  I ask because I'm able to connect two webservices
> > > together
> > > > from a non webapp.  Thanks again for
> > > > all you help. 
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > 09:36:37
> > > > AM:
> > > > 
> > > > > Ok thanks.  Let's say for instance that I have two different
> > types
> > > of
> > > > > clients.  One type of clients that are within the same
firewall
> > as
> > > my
> > > > > web server and are on the same network.  The other is a
client
> > that
> > > > is
> > > > > outside the firewall and not on the same network.  I can see
> that
> > > the
> > > > > later would need a consumer web service running and the
> incoming
> > > > > requests would have to be forwarded to the user of the
consumer
> > web
> > > > > service. 
> > > > > 
> > > > > First question, when I use the API's to create the
subscription
> > > > between
> > > > > the publisher and consumer are there methods I can call that
> > would
> > > > > subscribe from the consumer to the (WsnTestClient) a
forwarded
> > > > message
> > > > > or is this something I have to do manually i.e create a
socket
> > from
> > > > the
> > > > > consumer to the WsnTestClient or is this already built into
> > > > MUSE/AXIS?
> > > > > 
> > > > > 
> > > > > Second question, when I am within the same network is there a
> way
> > > for
> > > > > me to set up a publisher/consumer without creating a consumer
> web
> > > > > service or is this not what is intended with MUSE and I would
> > still
> > > > > need a consumer web server and some mechanism to forward
> messages
> > > > from
> > > > > the consumer web service to the (WsnTestClient).
> > > > > 
> > > > > Thanks again for all your answers and help!!
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Each resource must be a web service resource with a URI
address
> > > that
> > > > > identifies its location.  So your consumer cannot be a java
> > program
> > > > > sitting outside of a webserver environment.  What you can do
is
> > > have
> > > > a
> > > > > consumer resource which routes calls to your java program.
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Makes sense.  I would like to set up a publisher / consumer
> > service
> > > > > were
> > > > > the publish is a web service and the consumer is java program
> (no
> > > > > web server running).  Is this possible? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm not really sure, if I understand your initial question,
so
> > I'll
> > > > try
> > > > > to explain it based on the assumption, that it's unclear why
> you
> > > need
> > > > > to
> > > > > deploy 2 servlets to make the sample work.
> > > > > 
> > > > > 
> > > > > For the producer/consumer example, they're mimicking a
service
> > > > > (producer) on a separate machine, which will inform the
client
> > > > machine
> > > > > (consumer) about changes in its state via a WSDM SOAP
message. 
> > > > > The WsnTestClient-file is just setting up the subscription
> > between
> > > > the
> > > > > producer/consumer via the SubscriptionManager.
> > > > > The actual consumer is the
> > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > 
> > > > > As for the error you're getting, I'm not sure if you deployed
> > both
> > > > the
> > > > > producer/consumer wars given the earlier assumption I made.
But
> > it
> > > > > seems
> > > > > that your WsnTestClient is trying to subscribe to your
producer
> > > > service
> > > > > and getting denied as the service is not available at the
> > specified
> > > > > location (according to the WsnTestClient.java property and
the
> > > > involved
> > > > > WSDL-files).
> > > > > 
> > > > > I don't have a clue yet about the error from you Tomcat log
> > files.
> > > > > 
> > > > > 
> > > > > Not really sure if this made any sense.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: 07 February 2007 13:43
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm using the official release and have performed step 2 and
> here
> > > are
> > > > > the errors I'm getting.  Also could someone explain to me why
I
> > > need
> > > > to
> > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > WsnTestClient should be the "Consumer". 
> > > > > 
> > > > > In my tomcat5 log file: 
> > > > > 
> > > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > > Servlet.service() for servlet ApacheMuseServlet threw
exception
> > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
method
> > > > >
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > not
> > > > > found
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > .java:46)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > ava:32)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > tIsolationLayer.java:183)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > iServlet.java:36)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > 50)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > ationFilterChain.java:237)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > terChain.java:157)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > ve.java:214)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > ntextValve.java:198)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > ve.java:152)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > a:137)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > a:118)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:102)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > .java:109)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > 99)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > Connection(Http11Protocol.java:705)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > 77)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > l.java:683)
> > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > 
> > > > > 
> > > > > Output from WsnTestClient:
> > > > > 
> > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > 
> > > > > <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://128.29.35.11:80
> > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > f-066b-ff60b581802c</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:A
> > > > > ddress>
> > > > >         </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://128.29.35.11:80
> > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > >             </wsnt:ConsumerReference>
> > > > >         </wsnt:Subscribe>
> > > > >     </soap:Body>
> > > > > </soap:Envelope>
> > > > > 
> > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> > HTTP
> > > > > response code: 500 for URL:
> > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:279)
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:235)
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > ribe(NotificationProducerClient.java:96)
> > > > >         at
org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > Source)
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Thank you for your support. I downloaded the nightly build
and
> > ran
> > > > > update_install.bat. The wsn-producer/consumer example worked
at
> > > once.
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Good catch on the port number - make sure the port you're
using
> > for
> > > > > Tomcat uses the one that's specified in the
WsnTestClient.java
> > > > client.
> > > > > The port is part of the wsa:Address in the producer and
> consumer
> > > > EPRs,
> > > > > so if it's wrong, you need to change it (you can do this on
the
> > > > command
> > > > > line or by
> > > > > 
> > > > > modifying the test client code).
> > > > > 
> > > > > I'd also advise against building the source and trying to add
> the
> > > > > latest
> > > > > bits incrementally - if you want to do a full build, follow
the
> > > > > instructions on:
> > > > > 
> > > > >         http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > If you want the latest nightly build, you can get it here:
> > > > > 
> > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > 
> > > > > Of course, except for the "step 2" that was added, neither of
> > those
> > > > > samples has changed in quite a while. You should be able to
get
> > > them
> > > > > working by taking the official release and performing step 2
-
> > let
> > > me
> > > > > know if the port number issue was indeed the problem.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > 
> > > > > > I'm not sure why you would want to make the whole thing
that 
> > > > > > complicated.
> > > > > > I seem to have no problem getting the producer/consumer
> example
> > > to
> > > > > work
> > > > > > with these simple steps.
> > > > > > 
> > > > > > 1) Download the nightly build (with the latest bug fixes)
> from 
> > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > 
> > > > > > 2) Run update-install
> > > > > > 
> > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > (wsn-producer)
> > > > > > and the WsnTestClient portType properties (producer_port &
> > > > > > consumer_port) are pointing to the right serviceport
> (according
> > > to
> > > > > your
> > > > > > Tomcat specs).
> > > > > > 
> > > > > > 4) Use the ant build file to build both project-wars
> > > > > > 
> > > > > > 5) Deploy and enjoy
> > > > > > 
> > > > > > But that said did you have a look in the wsn-consumer
> > > > > WsnTestClient.java
> > > > > > and the wsn-producer WsREsource.wsdl to see if the
portTypes
> > > match
> > > > > your
> > > > > > Tomcat setup? To me it sounds like it's looking for a
> consumer
> > > > that's
> > > > > 
> > > > > > not listening on the given port. I could be wrong.
> > > > > > 
> > > > > > I know the portTypes have been a cause of some of my
problems
> > in
> > > > the 
> > > > > > past.
> > > > > > 
> > > > > > /Lenni
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: 05 February 2007 12:59
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > If you follow the instructions for "Eclipse Development"
> > > described
> > > > > here 
> > > > > > 
> > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > you get a separate project in Eclipse for every muse
> jar-file.
> > > You
> > > > > can
> > > > > > then export each project as a jar-file and replace the ones
> > found
> > > > in 
> > > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > > latest 
> > > > > > bugfixes and updates.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > You seemed to get farther than I did with the example.  I
> been
> > > able
> > > > > to
> > > > > > find on the internet that you need to add (#2) below, but
> your
> > > #3.
> > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: wsn-producer/consumer example
> > > > > > 
> > > > > > I have tried to get the wsn-producer/consumer sample to
work
> > > > without 
> > > > > > success. I have done the following:
> > > > > > 
> > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > 
> > > > > > 2. Added row <resource-type use-router-persistence="true">
in
> 
> > > > > > wsn-consumer muse.xml
> > > > > > 
> > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> Replaced
> > > old
> > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > 
> > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > 
> > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > WsnTestClient 
> > > > > > 
> > > > > > I still get the following error:
> > > > > > 
> > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > published
> > > > via 
> > > > > > wsnt:Notify  failed to reach its destination. The consumer
> may
> > be
> > > 
> > > > > > unavailable.
> > > > > The
> > > > > > original
> > > > > > error was: null
> > > > > > 2007-feb-05 08:17:37
> > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > run
> > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > 
> > > > > > Any ideas?
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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





RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
JIRA is our bug tracker:

        http://ws.apache.org/muse/issue-tracking.html

A few other people have replied who did get the samples working 
successfully - right now I'm inclined to believe it's just a problem with 
a small configuration change or something. Here's what I did to re-test 
the samples:

0. Download a clean muse-2.1.0-bin distribution

1. /bin/update-install.bat

2. cd /samples/j2ee/wsn-producer

3. ant

4. copy wsn-producer.war to TOMCAT_HOME/webapps

5. cd ../wsn-consumer

6. Added use-router-persistence attribute to this project's muse.xml file 
(this bug is fixed in the 2.2 build):

        <resource-type use-router-persistence="true">

7. ant

8. copy wsn-consumer.war to TOMCAT_HOME/webapps

9. start Tomcat

10. ant run -Dmain=org.apache.muse.test.wsn.WsnTestClient

11. confirm output in server console


How are your steps different? Please include as much detail as possible, 
especially with any modifications you might have made for your project.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 05:45:14 PM:

> What is JIRA?  Do you have any idea what this might be?  Has anybody
> been able to get the wsn-producer/wsn-consumer working? 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 3:51 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> well, the first thing it tells me is that the wsn-producer sample, not 
> wsn-consumer, is throwing the exception - that's where the class is
> from 
> in that scenario. I'll have to try out a few configurations to see if I
> 
> can reproduce it. Attach your WAR file to JIRA if you can...
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
> PM:
> 
> > Yes.  I'm not sure what's going on,but this is the exception that's
> > thrown in the catalina.out file.  Any ideas?  Thanks for your help. 
> > 
> > java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
> > specified was not found:
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> > Make sure the correct .class or .jar file is in the classpath.
> >    at
> > org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> > entationClass(SimpleCapabilityDescriptor.java:49)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> > apabilityDescriptor.java:90)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> > tyDefinitions(SimpleResourceDescriptor.java:95)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> > ourceDescriptor.java:397)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> > ceDefinitions(SimpleDeploymentDescriptor.java:72)
> >    at
> >
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> > eploymentDescriptor.java:171)
> >    at
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:144)
> >    at
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:799)
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 21, 2007 2:33 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > just to clarify - you say you're deploying the wsn-consumer sample
> > as-is 
> > (run 'ant' and copy over WAR) and it's not receiving the
> notifications?
> > 
> > are you deploying it in the same container as the producer? if not,
> did
> > 
> > you make sure to change the port number used in the consumer's URI
> (in
> > the 
> > test client)?
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
> > PM:
> > 
> > >  The example I thought worked didn't.  When I view the catalina.out
> > > file
> > > the wsn-consumer does not receive publish updates, it seems to
> > > subscribe correctly.  A JavaClassNotFound exception is thrown when
> > > trying to access ConsumerCapabilityImpl.class.  Everything seems to
> > be
> > > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 1:08 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > from within the NotificationMessageListener API, you'll get a 
> > > NotificationMessage object(s) representing the message. The 
> > > NotificationMessage will have getter methods for things like the
> > > producer 
> > > EPR, topic, etc. It also has the XML payload, which is custom to
> your
> > 
> > > scenario. If you are using WSDM's WEF for formatting your events,
> you
> > > can 
> > > convert the payload XML into a ManagementEvent object like so:
> > > 
> > > public void process(NotificationMessage msg)
> > > {
> > >     WefFactory factory = new SimpleWefFactory();
> > > 
> > >     Iterator i = msg.getMessageContent().iterator();
> > > 
> > >     while (i.hasNext())
> > >     {
> > >         Element eventXML = (Element)i.next();
> > >         ManagementEvent event = factory.createEvent(eventXML);
> > >         // use getters to process event data
> > >     }
> > > }
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:59:44
> > > PM:
> > > 
> > > > No I do not want to write any HTTP server myself.  I want to take
> > the
> > > > received SOAP messages from the consumer web service convert
> those
> > > into
> > > > Java Objects and forward them to my non webapp.  I can just
> create
> > a
> > > > socket and send it that way I was just hoping that maybe I could
> > just
> > > > use the MUSE API to do this since I can set up services from a
> non
> > > > webapp. 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I don't see how you would receive the messages on a non-web
> app...
> > > > unless 
> > > > you're writing your own little server and parsing the HTTP
> > yourself.
> > > If
> > > > 
> > > > that's the case, I'd advise you to rethink it - you can either
> use
> > > OSGi
> > > > 
> > > > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
> > to
> > > > host 
> > > > the app (~5MB). Writing a decent HTTP server for one known client
> > is
> > > > easy 
> > > > - writing a robust HTTP server is quite hard.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> > 12:42:53
> > > > PM:
> > > > 
> > > > > See below <DAC>
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > The WsnTestClient should not be necessary in your real world
> > > scenario
> > > > -
> > > > > 
> > > > > it's just a driver to get the sample going. In your situation,
> > you
> > > > can 
> > > > > just have the consumer resource subscribe to the producer
> itself
> > -
> > > > the 
> > > > > code to do that would be very similar to what's in
> WsnTestClient
> > > (the
> > > > > use 
> > > > > of NotificationProducerClient), but you would package it in
> your
> > > > > consumer 
> > > > > resource instead of a command line app. You could perform the
> > > > > subscription 
> > > > > work in the initialize() method of one of your capabilities on
> > the 
> > > > > consumer side.
> > > > > 
> > > > > Alternatively, in a more complex scenario, you might have an 
> > > > > "orchestrator" service that is subscribing all of the consumers
> > to
> > > > the 
> > > > > events they need to handle. This scenario would be a lot like
> the
> > > > > sample 
> > > > > in that a third service would call subscribe() and tell the
> > > producer
> > > > > which 
> > > > > consumer resource to send the messages to. This is just like
> the 
> > > > > WsnTestClient app, except it would probably be a web service as
> > > well.
> > > > > 
> > > > > If you want to forward messages received by one consumer to
> > another
> > > 
> > > > > consumer(s), like a broker would, you just have to use the 
> > > > > NotificationMessageListener API - you can implement a listener
> > that
> > > 
> > > > > listens for all notifications and then uses
> > > > NotificationConsumerClient
> > > > > to 
> > > > > forward the messages to other resources.
> > > > > 
> > > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > > WEB)consumer's. 
> > > > >   I want to have a consumer web service that just forwards
> > messages
> > > > > from the webapp 
> > > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > > NotificationMessageListener and
> > > > > NotificationConsumerClient or do I need to use another means to
> > > > forward
> > > > > messages from a webapp to a
> > > > > Non webapp.  I ask because I'm able to connect two webservices
> > > > together
> > > > > from a non webapp.  Thanks again for
> > > > > all you help. 
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > > 09:36:37
> > > > > AM:
> > > > > 
> > > > > > Ok thanks.  Let's say for instance that I have two different
> > > types
> > > > of
> > > > > > clients.  One type of clients that are within the same
> firewall
> > > as
> > > > my
> > > > > > web server and are on the same network.  The other is a
> client
> > > that
> > > > > is
> > > > > > outside the firewall and not on the same network.  I can see
> > that
> > > > the
> > > > > > later would need a consumer web service running and the
> > incoming
> > > > > > requests would have to be forwarded to the user of the
> consumer
> > > web
> > > > > > service. 
> > > > > > 
> > > > > > First question, when I use the API's to create the
> subscription
> > > > > between
> > > > > > the publisher and consumer are there methods I can call that
> > > would
> > > > > > subscribe from the consumer to the (WsnTestClient) a
> forwarded
> > > > > message
> > > > > > or is this something I have to do manually i.e create a
> socket
> > > from
> > > > > the
> > > > > > consumer to the WsnTestClient or is this already built into
> > > > > MUSE/AXIS?
> > > > > > 
> > > > > > 
> > > > > > Second question, when I am within the same network is there a
> > way
> > > > for
> > > > > > me to set up a publisher/consumer without creating a consumer
> > web
> > > > > > service or is this not what is intended with MUSE and I would
> > > still
> > > > > > need a consumer web server and some mechanism to forward
> > messages
> > > > > from
> > > > > > the consumer web service to the (WsnTestClient).
> > > > > > 
> > > > > > Thanks again for all your answers and help!!
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Each resource must be a web service resource with a URI
> address
> > > > that
> > > > > > identifies its location.  So your consumer cannot be a java
> > > program
> > > > > > sitting outside of a webserver environment.  What you can do
> is
> > > > have
> > > > > a
> > > > > > consumer resource which routes calls to your java program.
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Makes sense.  I would like to set up a publisher / consumer
> > > service
> > > > > > were
> > > > > > the publish is a web service and the consumer is java program
> > (no
> > > > > > web server running).  Is this possible? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm not really sure, if I understand your initial question,
> so
> > > I'll
> > > > > try
> > > > > > to explain it based on the assumption, that it's unclear why
> > you
> > > > need
> > > > > > to
> > > > > > deploy 2 servlets to make the sample work.
> > > > > > 
> > > > > > 
> > > > > > For the producer/consumer example, they're mimicking a
> service
> > > > > > (producer) on a separate machine, which will inform the
> client
> > > > > machine
> > > > > > (consumer) about changes in its state via a WSDM SOAP
> message. 
> > > > > > The WsnTestClient-file is just setting up the subscription
> > > between
> > > > > the
> > > > > > producer/consumer via the SubscriptionManager.
> > > > > > The actual consumer is the
> > > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > > 
> > > > > > As for the error you're getting, I'm not sure if you deployed
> > > both
> > > > > the
> > > > > > producer/consumer wars given the earlier assumption I made.
> But
> > > it
> > > > > > seems
> > > > > > that your WsnTestClient is trying to subscribe to your
> producer
> > > > > service
> > > > > > and getting denied as the service is not available at the
> > > specified
> > > > > > location (according to the WsnTestClient.java property and
> the
> > > > > involved
> > > > > > WSDL-files).
> > > > > > 
> > > > > > I don't have a clue yet about the error from you Tomcat log
> > > files.
> > > > > > 
> > > > > > 
> > > > > > Not really sure if this made any sense.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: 07 February 2007 13:43
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > I'm using the official release and have performed step 2 and
> > here
> > > > are
> > > > > > the errors I'm getting.  Also could someone explain to me why
> I
> > > > need
> > > > > to
> > > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > > WsnTestClient should be the "Consumer". 
> > > > > > 
> > > > > > In my tomcat5 log file: 
> > > > > > 
> > > > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > > > Servlet.service() for servlet ApacheMuseServlet threw
> exception
> > > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
> method
> > > > > >
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > > not
> > > > > > found
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > > .java:46)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > > ava:32)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > > tIsolationLayer.java:183)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > > iServlet.java:36)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > > 50)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > > >    at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > > ationFilterChain.java:237)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > > terChain.java:157)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > > ve.java:214)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > > ntextValve.java:198)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > > ve.java:152)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > > a:137)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > > a:118)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:102)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > > .java:109)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > > ontext.java:104)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > > 520)
> > > > > >    at
> > > > > >
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > > 99)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > > Connection(Http11Protocol.java:705)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > > 77)
> > > > > >    at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > > l.java:683)
> > > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > > 
> > > > > > 
> > > > > > Output from WsnTestClient:
> > > > > > 
> > > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > > 
> > > > > > <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://128.29.35.11:80
> > > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > > f-066b-ff60b581802c</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:A
> > > > > > ddress>
> > > > > >         </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://128.29.35.11:80
> > > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > > >             </wsnt:ConsumerReference>
> > > > > >         </wsnt:Subscribe>
> > > > > >     </soap:Body>
> > > > > > </soap:Envelope>
> > > > > > 
> > > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> > > HTTP
> > > > > > response code: 500 for URL:
> > > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:279)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > > nt.java:235)
> > > > > >         at
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > > ribe(NotificationProducerClient.java:96)
> > > > > >         at
> org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > > Source)
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Thank you for your support. I downloaded the nightly build
> and
> > > ran
> > > > > > update_install.bat. The wsn-producer/consumer example worked
> at
> > > > once.
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > Good catch on the port number - make sure the port you're
> using
> > > for
> > > > > > Tomcat uses the one that's specified in the
> WsnTestClient.java
> > > > > client.
> > > > > > The port is part of the wsa:Address in the producer and
> > consumer
> > > > > EPRs,
> > > > > > so if it's wrong, you need to change it (you can do this on
> the
> > > > > command
> > > > > > line or by
> > > > > > 
> > > > > > modifying the test client code).
> > > > > > 
> > > > > > I'd also advise against building the source and trying to add
> > the
> > > > > > latest
> > > > > > bits incrementally - if you want to do a full build, follow
> the
> > > > > > instructions on:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > If you want the latest nightly build, you can get it here:
> > > > > > 
> > > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > > 
> > > > > > Of course, except for the "step 2" that was added, neither of
> > > those
> > > > > > samples has changed in quite a while. You should be able to
> get
> > > > them
> > > > > > working by taking the official release and performing step 2
> -
> > > let
> > > > me
> > > > > > know if the port number issue was indeed the problem.
> > > > > > 
> > > > > > Dan
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > > 
> > > > > > > I'm not sure why you would want to make the whole thing
> that 
> > > > > > > complicated.
> > > > > > > I seem to have no problem getting the producer/consumer
> > example
> > > > to
> > > > > > work
> > > > > > > with these simple steps.
> > > > > > > 
> > > > > > > 1) Download the nightly build (with the latest bug fixes)
> > from 
> > > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > > 
> > > > > > > 2) Run update-install
> > > > > > > 
> > > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > > (wsn-producer)
> > > > > > > and the WsnTestClient portType properties (producer_port &
> > > > > > > consumer_port) are pointing to the right serviceport
> > (according
> > > > to
> > > > > > your
> > > > > > > Tomcat specs).
> > > > > > > 
> > > > > > > 4) Use the ant build file to build both project-wars
> > > > > > > 
> > > > > > > 5) Deploy and enjoy
> > > > > > > 
> > > > > > > But that said did you have a look in the wsn-consumer
> > > > > > WsnTestClient.java
> > > > > > > and the wsn-producer WsREsource.wsdl to see if the
> portTypes
> > > > match
> > > > > > your
> > > > > > > Tomcat setup? To me it sounds like it's looking for a
> > consumer
> > > > > that's
> > > > > > 
> > > > > > > not listening on the given port. I could be wrong.
> > > > > > > 
> > > > > > > I know the portTypes have been a cause of some of my
> problems
> > > in
> > > > > the 
> > > > > > > past.
> > > > > > > 
> > > > > > > /Lenni
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: 05 February 2007 12:59
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > If you follow the instructions for "Eclipse Development"
> > > > described
> > > > > > here 
> > > > > > > 
> > > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > > 
> > > > > > > you get a separate project in Eclipse for every muse
> > jar-file.
> > > > You
> > > > > > can
> > > > > > > then export each project as a jar-file and replace the ones
> > > found
> > > > > in 
> > > > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > > > latest 
> > > > > > > bugfixes and updates.
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > > 
> > > > > > > You seemed to get farther than I did with the example.  I
> > been
> > > > able
> > > > > > to
> > > > > > > find on the internet that you need to add (#2) below, but
> > your
> > > > #3.
> > > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > > 
> > > > > > > -----Original Message-----
> > > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > > To: muse-user@ws.apache.org
> > > > > > > Subject: wsn-producer/consumer example
> > > > > > > 
> > > > > > > I have tried to get the wsn-producer/consumer sample to
> work
> > > > > without 
> > > > > > > success. I have done the following:
> > > > > > > 
> > > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > > 
> > > > > > > 2. Added row <resource-type use-router-persistence="true">
> in
> > 
> > > > > > > wsn-consumer muse.xml
> > > > > > > 
> > > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> > Replaced
> > > > old
> > > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > > 
> > > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > > 
> > > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > > WsnTestClient 
> > > > > > > 
> > > > > > > I still get the following error:
> > > > > > > 
> > > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > > published
> > > > > via 
> > > > > > > wsnt:Notify  failed to reach its destination. The consumer
> > may
> > > be
> > > > 
> > > > > > > unavailable.
> > > > > > The
> > > > > > > original
> > > > > > > error was: null
> > > > > > > 2007-feb-05 08:17:37
> > > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > > run
> > > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > > 
> > > > > > > Any ideas?
> > > > > > > 
> > > > > > > /Mattias
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> muse-user-help@ws.apache.org
> > > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
What is JIRA?  Do you have any idea what this might be?  Has anybody
been able to get the wsn-producer/wsn-consumer working? 

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 3:51 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

well, the first thing it tells me is that the wsn-producer sample, not 
wsn-consumer, is throwing the exception - that's where the class is
from 
in that scenario. I'll have to try out a few configurations to see if I

can reproduce it. Attach your WAR file to JIRA if you can...

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50
PM:

> Yes.  I'm not sure what's going on,but this is the exception that's
> thrown in the catalina.out file.  Any ideas?  Thanks for your help. 
> 
> java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
> specified was not found:
org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> Make sure the correct .class or .jar file is in the classpath.
>    at
> org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
>    at
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> entationClass(SimpleCapabilityDescriptor.java:49)
>    at
>
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> apabilityDescriptor.java:90)
>    at
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> tyDefinitions(SimpleResourceDescriptor.java:95)
>    at
>
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> ourceDescriptor.java:397)
>    at
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> ceDefinitions(SimpleDeploymentDescriptor.java:72)
>    at
>
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> eploymentDescriptor.java:171)
>    at
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:144)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:799)
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 2:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> just to clarify - you say you're deploying the wsn-consumer sample
> as-is 
> (run 'ant' and copy over WAR) and it's not receiving the
notifications?
> 
> are you deploying it in the same container as the producer? if not,
did
> 
> you make sure to change the port number used in the consumer's URI
(in
> the 
> test client)?
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
> PM:
> 
> >  The example I thought worked didn't.  When I view the catalina.out
> > file
> > the wsn-consumer does not receive publish updates, it seems to
> > subscribe correctly.  A JavaClassNotFound exception is thrown when
> > trying to access ConsumerCapabilityImpl.class.  Everything seems to
> be
> > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 1:08 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > from within the NotificationMessageListener API, you'll get a 
> > NotificationMessage object(s) representing the message. The 
> > NotificationMessage will have getter methods for things like the
> > producer 
> > EPR, topic, etc. It also has the XML payload, which is custom to
your
> 
> > scenario. If you are using WSDM's WEF for formatting your events,
you
> > can 
> > convert the payload XML into a ManagementEvent object like so:
> > 
> > public void process(NotificationMessage msg)
> > {
> >     WefFactory factory = new SimpleWefFactory();
> > 
> >     Iterator i = msg.getMessageContent().iterator();
> > 
> >     while (i.hasNext())
> >     {
> >         Element eventXML = (Element)i.next();
> >         ManagementEvent event = factory.createEvent(eventXML);
> >         // use getters to process event data
> >     }
> > }
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:59:44
> > PM:
> > 
> > > No I do not want to write any HTTP server myself.  I want to take
> the
> > > received SOAP messages from the consumer web service convert
those
> > into
> > > Java Objects and forward them to my non webapp.  I can just
create
> a
> > > socket and send it that way I was just hoping that maybe I could
> just
> > > use the MUSE API to do this since I can set up services from a
non
> > > webapp. 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I don't see how you would receive the messages on a non-web
app...
> > > unless 
> > > you're writing your own little server and parsing the HTTP
> yourself.
> > If
> > > 
> > > that's the case, I'd advise you to rethink it - you can either
use
> > OSGi
> > > 
> > > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
> to
> > > host 
> > > the app (~5MB). Writing a decent HTTP server for one known client
> is
> > > easy 
> > > - writing a robust HTTP server is quite hard.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:42:53
> > > PM:
> > > 
> > > > See below <DAC>
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > The WsnTestClient should not be necessary in your real world
> > scenario
> > > -
> > > > 
> > > > it's just a driver to get the sample going. In your situation,
> you
> > > can 
> > > > just have the consumer resource subscribe to the producer
itself
> -
> > > the 
> > > > code to do that would be very similar to what's in
WsnTestClient
> > (the
> > > > use 
> > > > of NotificationProducerClient), but you would package it in
your
> > > > consumer 
> > > > resource instead of a command line app. You could perform the
> > > > subscription 
> > > > work in the initialize() method of one of your capabilities on
> the 
> > > > consumer side.
> > > > 
> > > > Alternatively, in a more complex scenario, you might have an 
> > > > "orchestrator" service that is subscribing all of the consumers
> to
> > > the 
> > > > events they need to handle. This scenario would be a lot like
the
> > > > sample 
> > > > in that a third service would call subscribe() and tell the
> > producer
> > > > which 
> > > > consumer resource to send the messages to. This is just like
the 
> > > > WsnTestClient app, except it would probably be a web service as
> > well.
> > > > 
> > > > If you want to forward messages received by one consumer to
> another
> > 
> > > > consumer(s), like a broker would, you just have to use the 
> > > > NotificationMessageListener API - you can implement a listener
> that
> > 
> > > > listens for all notifications and then uses
> > > NotificationConsumerClient
> > > > to 
> > > > forward the messages to other resources.
> > > > 
> > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > WEB)consumer's. 
> > > >   I want to have a consumer web service that just forwards
> messages
> > > > from the webapp 
> > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > NotificationMessageListener and
> > > > NotificationConsumerClient or do I need to use another means to
> > > forward
> > > > messages from a webapp to a
> > > > Non webapp.  I ask because I'm able to connect two webservices
> > > together
> > > > from a non webapp.  Thanks again for
> > > > all you help. 
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > 09:36:37
> > > > AM:
> > > > 
> > > > > Ok thanks.  Let's say for instance that I have two different
> > types
> > > of
> > > > > clients.  One type of clients that are within the same
firewall
> > as
> > > my
> > > > > web server and are on the same network.  The other is a
client
> > that
> > > > is
> > > > > outside the firewall and not on the same network.  I can see
> that
> > > the
> > > > > later would need a consumer web service running and the
> incoming
> > > > > requests would have to be forwarded to the user of the
consumer
> > web
> > > > > service. 
> > > > > 
> > > > > First question, when I use the API's to create the
subscription
> > > > between
> > > > > the publisher and consumer are there methods I can call that
> > would
> > > > > subscribe from the consumer to the (WsnTestClient) a
forwarded
> > > > message
> > > > > or is this something I have to do manually i.e create a
socket
> > from
> > > > the
> > > > > consumer to the WsnTestClient or is this already built into
> > > > MUSE/AXIS?
> > > > > 
> > > > > 
> > > > > Second question, when I am within the same network is there a
> way
> > > for
> > > > > me to set up a publisher/consumer without creating a consumer
> web
> > > > > service or is this not what is intended with MUSE and I would
> > still
> > > > > need a consumer web server and some mechanism to forward
> messages
> > > > from
> > > > > the consumer web service to the (WsnTestClient).
> > > > > 
> > > > > Thanks again for all your answers and help!!
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Each resource must be a web service resource with a URI
address
> > > that
> > > > > identifies its location.  So your consumer cannot be a java
> > program
> > > > > sitting outside of a webserver environment.  What you can do
is
> > > have
> > > > a
> > > > > consumer resource which routes calls to your java program.
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Makes sense.  I would like to set up a publisher / consumer
> > service
> > > > > were
> > > > > the publish is a web service and the consumer is java program
> (no
> > > > > web server running).  Is this possible? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm not really sure, if I understand your initial question,
so
> > I'll
> > > > try
> > > > > to explain it based on the assumption, that it's unclear why
> you
> > > need
> > > > > to
> > > > > deploy 2 servlets to make the sample work.
> > > > > 
> > > > > 
> > > > > For the producer/consumer example, they're mimicking a
service
> > > > > (producer) on a separate machine, which will inform the
client
> > > > machine
> > > > > (consumer) about changes in its state via a WSDM SOAP
message. 
> > > > > The WsnTestClient-file is just setting up the subscription
> > between
> > > > the
> > > > > producer/consumer via the SubscriptionManager.
> > > > > The actual consumer is the
> > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > 
> > > > > As for the error you're getting, I'm not sure if you deployed
> > both
> > > > the
> > > > > producer/consumer wars given the earlier assumption I made.
But
> > it
> > > > > seems
> > > > > that your WsnTestClient is trying to subscribe to your
producer
> > > > service
> > > > > and getting denied as the service is not available at the
> > specified
> > > > > location (according to the WsnTestClient.java property and
the
> > > > involved
> > > > > WSDL-files).
> > > > > 
> > > > > I don't have a clue yet about the error from you Tomcat log
> > files.
> > > > > 
> > > > > 
> > > > > Not really sure if this made any sense.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: 07 February 2007 13:43
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm using the official release and have performed step 2 and
> here
> > > are
> > > > > the errors I'm getting.  Also could someone explain to me why
I
> > > need
> > > > to
> > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > WsnTestClient should be the "Consumer". 
> > > > > 
> > > > > In my tomcat5 log file: 
> > > > > 
> > > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > > Servlet.service() for servlet ApacheMuseServlet threw
exception
> > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName:
method
> > > > >
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > not
> > > > > found
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > .java:46)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > ava:32)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > tIsolationLayer.java:183)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > iServlet.java:36)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > 50)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > ationFilterChain.java:237)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > terChain.java:157)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > ve.java:214)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > ntextValve.java:198)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > ve.java:152)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > a:137)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > a:118)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:102)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > .java:109)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > 99)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > Connection(Http11Protocol.java:705)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > 77)
> > > > >    at
> > > > >
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > l.java:683)
> > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > 
> > > > > 
> > > > > Output from WsnTestClient:
> > > > > 
> > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > 
> > > > > <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://128.29.35.11:80
> > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > f-066b-ff60b581802c</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:A
> > > > > ddress>
> > > > >         </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://128.29.35.11:80
> > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > >             </wsnt:ConsumerReference>
> > > > >         </wsnt:Subscribe>
> > > > >     </soap:Body>
> > > > > </soap:Envelope>
> > > > > 
> > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> > HTTP
> > > > > response code: 500 for URL:
> > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:279)
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:235)
> > > > >         at
> > > > >
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > ribe(NotificationProducerClient.java:96)
> > > > >         at
org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > Source)
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Thank you for your support. I downloaded the nightly build
and
> > ran
> > > > > update_install.bat. The wsn-producer/consumer example worked
at
> > > once.
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Good catch on the port number - make sure the port you're
using
> > for
> > > > > Tomcat uses the one that's specified in the
WsnTestClient.java
> > > > client.
> > > > > The port is part of the wsa:Address in the producer and
> consumer
> > > > EPRs,
> > > > > so if it's wrong, you need to change it (you can do this on
the
> > > > command
> > > > > line or by
> > > > > 
> > > > > modifying the test client code).
> > > > > 
> > > > > I'd also advise against building the source and trying to add
> the
> > > > > latest
> > > > > bits incrementally - if you want to do a full build, follow
the
> > > > > instructions on:
> > > > > 
> > > > >         http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > If you want the latest nightly build, you can get it here:
> > > > > 
> > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > 
> > > > > Of course, except for the "step 2" that was added, neither of
> > those
> > > > > samples has changed in quite a while. You should be able to
get
> > > them
> > > > > working by taking the official release and performing step 2
-
> > let
> > > me
> > > > > know if the port number issue was indeed the problem.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > 
> > > > > > I'm not sure why you would want to make the whole thing
that 
> > > > > > complicated.
> > > > > > I seem to have no problem getting the producer/consumer
> example
> > > to
> > > > > work
> > > > > > with these simple steps.
> > > > > > 
> > > > > > 1) Download the nightly build (with the latest bug fixes)
> from 
> > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > 
> > > > > > 2) Run update-install
> > > > > > 
> > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > (wsn-producer)
> > > > > > and the WsnTestClient portType properties (producer_port &
> > > > > > consumer_port) are pointing to the right serviceport
> (according
> > > to
> > > > > your
> > > > > > Tomcat specs).
> > > > > > 
> > > > > > 4) Use the ant build file to build both project-wars
> > > > > > 
> > > > > > 5) Deploy and enjoy
> > > > > > 
> > > > > > But that said did you have a look in the wsn-consumer
> > > > > WsnTestClient.java
> > > > > > and the wsn-producer WsREsource.wsdl to see if the
portTypes
> > > match
> > > > > your
> > > > > > Tomcat setup? To me it sounds like it's looking for a
> consumer
> > > > that's
> > > > > 
> > > > > > not listening on the given port. I could be wrong.
> > > > > > 
> > > > > > I know the portTypes have been a cause of some of my
problems
> > in
> > > > the 
> > > > > > past.
> > > > > > 
> > > > > > /Lenni
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: 05 February 2007 12:59
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > If you follow the instructions for "Eclipse Development"
> > > described
> > > > > here 
> > > > > > 
> > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > you get a separate project in Eclipse for every muse
> jar-file.
> > > You
> > > > > can
> > > > > > then export each project as a jar-file and replace the ones
> > found
> > > > in 
> > > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > > latest 
> > > > > > bugfixes and updates.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > You seemed to get farther than I did with the example.  I
> been
> > > able
> > > > > to
> > > > > > find on the internet that you need to add (#2) below, but
> your
> > > #3.
> > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: wsn-producer/consumer example
> > > > > > 
> > > > > > I have tried to get the wsn-producer/consumer sample to
work
> > > > without 
> > > > > > success. I have done the following:
> > > > > > 
> > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > 
> > > > > > 2. Added row <resource-type use-router-persistence="true">
in
> 
> > > > > > wsn-consumer muse.xml
> > > > > > 
> > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> Replaced
> > > old
> > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > 
> > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > 
> > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > WsnTestClient 
> > > > > > 
> > > > > > I still get the following error:
> > > > > > 
> > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > published
> > > > via 
> > > > > > wsnt:Notify  failed to reach its destination. The consumer
> may
> > be
> > > 
> > > > > > unavailable.
> > > > > The
> > > > > > original
> > > > > > error was: null
> > > > > > 2007-feb-05 08:17:37
> > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > run
> > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > 
> > > > > > Any ideas?
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> >
---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail:
muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
No just consumer/producer.  Wsrf is a package in the wsn-producer.  I
was able to subscribe before now it's dieing on the subscription. 

-----Original Message-----
From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
Sent: Wednesday, February 21, 2007 3:45 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

The error indicates that it is looking for a wsrf.MyCapabilityImpl
class, which comes with the wsrf sample project.  Are you testing just
the consumer/producer sample projects, or combining with the wsrf
sample, too?  Looks like your muse.xml does identify this file, but the
class is not your /WEB-INF/classes/yourpackage folder.
   

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 21, 2007 12:35 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

By the way the class file is location in the WEB-INF/classes area it's
just not seeing it for some reason. 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Wednesday, February 21, 2007 3:32 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Yes.  I'm not sure what's going on,but this is the exception that's
thrown in the catalina.out file.  Any ideas?  Thanks for your help. 

java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
specified was not found: org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
Make sure the correct .class or .jar file is in the classpath.
	at
org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
entationClass(SimpleCapabilityDescriptor.java:49)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
apabilityDescriptor.java:90)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
tyDefinitions(SimpleResourceDescriptor.java:95)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
ourceDescriptor.java:397)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
ceDefinitions(SimpleDeploymentDescriptor.java:72)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
eploymentDescriptor.java:171)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:144)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:799)

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, February 21, 2007 2:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

just to clarify - you say you're deploying the wsn-consumer sample
as-is
(run 'ant' and copy over WAR) and it's not receiving the notifications?

are you deploying it in the same container as the producer? if not, did

you make sure to change the port number used in the consumer's URI (in
the test client)?

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
PM:

>  The example I thought worked didn't.  When I view the catalina.out 
> file the wsn-consumer does not receive publish updates, it seems to 
> subscribe correctly.  A JavaClassNotFound exception is thrown when 
> trying to access ConsumerCapabilityImpl.class.  Everything seems to
be
> deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Wednesday, February 14, 2007 1:08 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> from within the NotificationMessageListener API, you'll get a 
> NotificationMessage object(s) representing the message. The 
> NotificationMessage will have getter methods for things like the 
> producer EPR, topic, etc. It also has the XML payload, which is
custom

> to your

> scenario. If you are using WSDM's WEF for formatting your events, you

> can convert the payload XML into a ManagementEvent object like so:
> 
> public void process(NotificationMessage msg) {
>     WefFactory factory = new SimpleWefFactory();
> 
>     Iterator i = msg.getMessageContent().iterator();
> 
>     while (i.hasNext())
>     {
>         Element eventXML = (Element)i.next();
>         ManagementEvent event = factory.createEvent(eventXML);
>         // use getters to process event data
>     }
> }
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> PM:
> 
> > No I do not want to write any HTTP server myself.  I want to take
the
> > received SOAP messages from the consumer web service convert those
> into
> > Java Objects and forward them to my non webapp.  I can just create
a
> > socket and send it that way I was just hoping that maybe I could
just
> > use the MUSE API to do this since I can set up services from a non 
> > webapp.
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > Sent: Wednesday, February 14, 2007 12:57 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I don't see how you would receive the messages on a non-web app...
> > unless
> > you're writing your own little server and parsing the HTTP
yourself.
> If
> > 
> > that's the case, I'd advise you to rethink it - you can either use
> OSGi
> > 
> > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
to
> > host
> > the app (~5MB). Writing a decent HTTP server for one known client
is
> > easy
> > - writing a robust HTTP server is quite hard.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:42:53
> > PM:
> > 
> > > See below <DAC>
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > The WsnTestClient should not be necessary in your real world
> scenario
> > -
> > > 
> > > it's just a driver to get the sample going. In your situation,
you
> > can
> > > just have the consumer resource subscribe to the producer itself
-
> > the
> > > code to do that would be very similar to what's in WsnTestClient
> (the
> > > use
> > > of NotificationProducerClient), but you would package it in your 
> > > consumer resource instead of a command line app. You could
perform

> > > the subscription work in the initialize() method of one of your 
> > > capabilities on
the 
> > > consumer side.
> > > 
> > > Alternatively, in a more complex scenario, you might have an 
> > > "orchestrator" service that is subscribing all of the consumers
to
> > the
> > > events they need to handle. This scenario would be a lot like the

> > > sample in that a third service would call subscribe() and tell
the
> producer
> > > which
> > > consumer resource to send the messages to. This is just like the 
> > > WsnTestClient app, except it would probably be a web service as
> well.
> > > 
> > > If you want to forward messages received by one consumer to
another
> 
> > > consumer(s), like a broker would, you just have to use the 
> > > NotificationMessageListener API - you can implement a listener
that
> 
> > > listens for all notifications and then uses
> > NotificationConsumerClient
> > > to
> > > forward the messages to other resources.
> > > 
> > > <DAC> Can I have a broker service that would subscribe (NON 
> > > WEB)consumer's.
> > >   I want to have a consumer web service that just forwards
messages
> > > from the webapp
> > >  (broker) to nonwebapp (consumers).  Can I do this with the 
> > > NotificationMessageListener and NotificationConsumerClient or do
I

> > > need to use another means to
> > forward
> > > messages from a webapp to a
> > > Non webapp.  I ask because I'm able to connect two webservices
> > together
> > > from a non webapp.  Thanks again for all you help.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> 09:36:37
> > > AM:
> > > 
> > > > Ok thanks.  Let's say for instance that I have two different
> types
> > of
> > > > clients.  One type of clients that are within the same firewall
> as
> > my
> > > > web server and are on the same network.  The other is a client
> that
> > > is
> > > > outside the firewall and not on the same network.  I can see
that
> > the
> > > > later would need a consumer web service running and the
incoming
> > > > requests would have to be forwarded to the user of the consumer
> web
> > > > service. 
> > > > 
> > > > First question, when I use the API's to create the subscription
> > > between
> > > > the publisher and consumer are there methods I can call that
> would
> > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > message
> > > > or is this something I have to do manually i.e create a socket
> from
> > > the
> > > > consumer to the WsnTestClient or is this already built into
> > > MUSE/AXIS?
> > > > 
> > > > 
> > > > Second question, when I am within the same network is there a
way
> > for
> > > > me to set up a publisher/consumer without creating a consumer
web
> > > > service or is this not what is intended with MUSE and I would
> still
> > > > need a consumer web server and some mechanism to forward
messages
> > > from
> > > > the consumer web service to the (WsnTestClient).
> > > > 
> > > > Thanks again for all your answers and help!!
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com]
> > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Each resource must be a web service resource with a URI address
> > that
> > > > identifies its location.  So your consumer cannot be a java
> program
> > > > sitting outside of a webserver environment.  What you can do is
> > have
> > > a
> > > > consumer resource which routes calls to your java program.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Makes sense.  I would like to set up a publisher / consumer
> service
> > > > were
> > > > the publish is a web service and the consumer is java program
(no
> > > > web server running).  Is this possible? 
> > > > 
> > > > -----Original Message-----
> > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm not really sure, if I understand your initial question, so
> I'll
> > > try
> > > > to explain it based on the assumption, that it's unclear why
you
> > need
> > > > to
> > > > deploy 2 servlets to make the sample work.
> > > > 
> > > > 
> > > > For the producer/consumer example, they're mimicking a service
> > > > (producer) on a separate machine, which will inform the client
> > > machine
> > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > The WsnTestClient-file is just setting up the subscription
> between
> > > the
> > > > producer/consumer via the SubscriptionManager.
> > > > The actual consumer is the
> > ConsumerCapability/ConsumerCapabilityImpl.
> > > > 
> > > > As for the error you're getting, I'm not sure if you deployed
> both
> > > the
> > > > producer/consumer wars given the earlier assumption I made. But
> it
> > > > seems
> > > > that your WsnTestClient is trying to subscribe to your producer
> > > service
> > > > and getting denied as the service is not available at the
> specified
> > > > location (according to the WsnTestClient.java property and the
> > > involved
> > > > WSDL-files).
> > > > 
> > > > I don't have a clue yet about the error from you Tomcat log
> files.
> > > > 
> > > > 
> > > > Not really sure if this made any sense.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: 07 February 2007 13:43
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm using the official release and have performed step 2 and
here
> > are
> > > > the errors I'm getting.  Also could someone explain to me why I
> > need
> > > to
> > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The 
> > > > WsnTestClient should be the "Consumer".
> > > > 
> > > > In my tomcat5 log file: 
> > > > 
> > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method 
> > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> not
> > > > found
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > .java:46)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > ava:32)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:183)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:570)
> > > > 
> > > > 
> > > > Output from WsnTestClient:
> > > > 
> > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > 
> > > > <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://128.29.35.11:80
> > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > f-066b-ff60b581802c</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:A
> > > > ddress>
> > > >         </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://128.29.35.11:80
> > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > >             </wsnt:ConsumerReference>
> > > >         </wsnt:Subscribe>
> > > >     </soap:Body>
> > > > </soap:Envelope>
> > > > 
> > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> HTTP
> > > > response code: 500 for URL:
> > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:279)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:235)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > ribe(NotificationProducerClient.java:96)
> > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > Source)
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Thank you for your support. I downloaded the nightly build and
> ran
> > > > update_install.bat. The wsn-producer/consumer example worked at
> > once.
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > Sent: Mon 2/5/2007 3:18 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Good catch on the port number - make sure the port you're using
> for
> > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > client.
> > > > The port is part of the wsa:Address in the producer and
consumer
> > > EPRs,
> > > > so if it's wrong, you need to change it (you can do this on the
> > > command
> > > > line or by
> > > > 
> > > > modifying the test client code).
> > > > 
> > > > I'd also advise against building the source and trying to add
the
> > > > latest
> > > > bits incrementally - if you want to do a full build, follow the

> > > > instructions on:
> > > > 
> > > >         http://ws.apache.org/muse/source-code.html
> > > > 
> > > > If you want the latest nightly build, you can get it here:
> > > > 
> > > >         http://ws.apache.org/muse/nightly/latest
> > > > 
> > > > Of course, except for the "step 2" that was added, neither of
> those
> > > > samples has changed in quite a while. You should be able to get
> > them
> > > > working by taking the official release and performing step 2 -
> let
> > me
> > > > know if the port number issue was indeed the problem.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > 
> > > > > I'm not sure why you would want to make the whole thing that 
> > > > > complicated.
> > > > > I seem to have no problem getting the producer/consumer
example
> > to
> > > > work
> > > > > with these simple steps.
> > > > > 
> > > > > 1) Download the nightly build (with the latest bug fixes)
from 
> > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > 
> > > > > 2) Run update-install
> > > > > 
> > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > (wsn-producer)
> > > > > and the WsnTestClient portType properties (producer_port &
> > > > > consumer_port) are pointing to the right serviceport
(according
> > to
> > > > your
> > > > > Tomcat specs).
> > > > > 
> > > > > 4) Use the ant build file to build both project-wars
> > > > > 
> > > > > 5) Deploy and enjoy
> > > > > 
> > > > > But that said did you have a look in the wsn-consumer
> > > > WsnTestClient.java
> > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > match
> > > > your
> > > > > Tomcat setup? To me it sounds like it's looking for a
consumer
> > > that's
> > > > 
> > > > > not listening on the given port. I could be wrong.
> > > > > 
> > > > > I know the portTypes have been a cause of some of my problems
> in
> > > the
> > > > > past.
> > > > > 
> > > > > /Lenni
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: 05 February 2007 12:59
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > If you follow the instructions for "Eclipse Development"
> > described
> > > > here
> > > > > 
> > > > > http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > you get a separate project in Eclipse for every muse
jar-file.
> > You
> > > > can
> > > > > then export each project as a jar-file and replace the ones
> found
> > > in
> > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > latest
> > > > > bugfixes and updates.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > You seemed to get farther than I did with the example.  I
been
> > able
> > > > to
> > > > > find on the internet that you need to add (#2) below, but
your
> > #3.
> > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: wsn-producer/consumer example
> > > > > 
> > > > > I have tried to get the wsn-producer/consumer sample to work
> > > without
> > > > > success. I have done the following:
> > > > > 
> > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > 
> > > > > 2. Added row <resource-type use-router-persistence="true"> in

> > > > > wsn-consumer muse.xml
> > > > > 
> > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
Replaced
> > old
> > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > 
> > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > 
> > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > WsnTestClient
> > > > > 
> > > > > I still get the following error:
> > > > > 
> > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> published
> > > via
> > > > > wsnt:Notify  failed to reach its destination. The consumer
may
> be
> > 
> > > > > unavailable.
> > > > The
> > > > > original
> > > > > error was: null
> > > > > 2007-feb-05 08:17:37
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > run
> > > > > INFO: Waiting 10 seconds before sending message...
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


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

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


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


RE: wsn-producer/consumer example

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
The error indicates that it is looking for a wsrf.MyCapabilityImpl
class, which comes with the wsrf sample project.  Are you testing just
the consumer/producer sample projects, or combining with the wsrf
sample, too?  Looks like your muse.xml does identify this file, but the
class is not your /WEB-INF/classes/yourpackage folder.
   

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 21, 2007 12:35 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

By the way the class file is location in the WEB-INF/classes area it's
just not seeing it for some reason. 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Wednesday, February 21, 2007 3:32 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Yes.  I'm not sure what's going on,but this is the exception that's
thrown in the catalina.out file.  Any ideas?  Thanks for your help. 

java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
specified was not found: org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
Make sure the correct .class or .jar file is in the classpath.
	at
org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
entationClass(SimpleCapabilityDescriptor.java:49)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
apabilityDescriptor.java:90)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
tyDefinitions(SimpleResourceDescriptor.java:95)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
ourceDescriptor.java:397)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
ceDefinitions(SimpleDeploymentDescriptor.java:72)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
eploymentDescriptor.java:171)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:144)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:799)

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, February 21, 2007 2:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

just to clarify - you say you're deploying the wsn-consumer sample as-is
(run 'ant' and copy over WAR) and it's not receiving the notifications?

are you deploying it in the same container as the producer? if not, did

you make sure to change the port number used in the consumer's URI (in
the test client)?

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
PM:

>  The example I thought worked didn't.  When I view the catalina.out 
> file the wsn-consumer does not receive publish updates, it seems to 
> subscribe correctly.  A JavaClassNotFound exception is thrown when 
> trying to access ConsumerCapabilityImpl.class.  Everything seems to
be
> deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Wednesday, February 14, 2007 1:08 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> from within the NotificationMessageListener API, you'll get a 
> NotificationMessage object(s) representing the message. The 
> NotificationMessage will have getter methods for things like the 
> producer EPR, topic, etc. It also has the XML payload, which is custom

> to your

> scenario. If you are using WSDM's WEF for formatting your events, you 
> can convert the payload XML into a ManagementEvent object like so:
> 
> public void process(NotificationMessage msg) {
>     WefFactory factory = new SimpleWefFactory();
> 
>     Iterator i = msg.getMessageContent().iterator();
> 
>     while (i.hasNext())
>     {
>         Element eventXML = (Element)i.next();
>         ManagementEvent event = factory.createEvent(eventXML);
>         // use getters to process event data
>     }
> }
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> PM:
> 
> > No I do not want to write any HTTP server myself.  I want to take
the
> > received SOAP messages from the consumer web service convert those
> into
> > Java Objects and forward them to my non webapp.  I can just create
a
> > socket and send it that way I was just hoping that maybe I could
just
> > use the MUSE API to do this since I can set up services from a non 
> > webapp.
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > Sent: Wednesday, February 14, 2007 12:57 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I don't see how you would receive the messages on a non-web app...
> > unless
> > you're writing your own little server and parsing the HTTP
yourself.
> If
> > 
> > that's the case, I'd advise you to rethink it - you can either use
> OSGi
> > 
> > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
to
> > host
> > the app (~5MB). Writing a decent HTTP server for one known client
is
> > easy
> > - writing a robust HTTP server is quite hard.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:42:53
> > PM:
> > 
> > > See below <DAC>
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > The WsnTestClient should not be necessary in your real world
> scenario
> > -
> > > 
> > > it's just a driver to get the sample going. In your situation,
you
> > can
> > > just have the consumer resource subscribe to the producer itself
-
> > the
> > > code to do that would be very similar to what's in WsnTestClient
> (the
> > > use
> > > of NotificationProducerClient), but you would package it in your 
> > > consumer resource instead of a command line app. You could perform

> > > the subscription work in the initialize() method of one of your 
> > > capabilities on
the 
> > > consumer side.
> > > 
> > > Alternatively, in a more complex scenario, you might have an 
> > > "orchestrator" service that is subscribing all of the consumers
to
> > the
> > > events they need to handle. This scenario would be a lot like the 
> > > sample in that a third service would call subscribe() and tell the
> producer
> > > which
> > > consumer resource to send the messages to. This is just like the 
> > > WsnTestClient app, except it would probably be a web service as
> well.
> > > 
> > > If you want to forward messages received by one consumer to
another
> 
> > > consumer(s), like a broker would, you just have to use the 
> > > NotificationMessageListener API - you can implement a listener
that
> 
> > > listens for all notifications and then uses
> > NotificationConsumerClient
> > > to
> > > forward the messages to other resources.
> > > 
> > > <DAC> Can I have a broker service that would subscribe (NON 
> > > WEB)consumer's.
> > >   I want to have a consumer web service that just forwards
messages
> > > from the webapp
> > >  (broker) to nonwebapp (consumers).  Can I do this with the 
> > > NotificationMessageListener and NotificationConsumerClient or do I

> > > need to use another means to
> > forward
> > > messages from a webapp to a
> > > Non webapp.  I ask because I'm able to connect two webservices
> > together
> > > from a non webapp.  Thanks again for all you help.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> 09:36:37
> > > AM:
> > > 
> > > > Ok thanks.  Let's say for instance that I have two different
> types
> > of
> > > > clients.  One type of clients that are within the same firewall
> as
> > my
> > > > web server and are on the same network.  The other is a client
> that
> > > is
> > > > outside the firewall and not on the same network.  I can see
that
> > the
> > > > later would need a consumer web service running and the
incoming
> > > > requests would have to be forwarded to the user of the consumer
> web
> > > > service. 
> > > > 
> > > > First question, when I use the API's to create the subscription
> > > between
> > > > the publisher and consumer are there methods I can call that
> would
> > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > message
> > > > or is this something I have to do manually i.e create a socket
> from
> > > the
> > > > consumer to the WsnTestClient or is this already built into
> > > MUSE/AXIS?
> > > > 
> > > > 
> > > > Second question, when I am within the same network is there a
way
> > for
> > > > me to set up a publisher/consumer without creating a consumer
web
> > > > service or is this not what is intended with MUSE and I would
> still
> > > > need a consumer web server and some mechanism to forward
messages
> > > from
> > > > the consumer web service to the (WsnTestClient).
> > > > 
> > > > Thanks again for all your answers and help!!
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com]
> > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Each resource must be a web service resource with a URI address
> > that
> > > > identifies its location.  So your consumer cannot be a java
> program
> > > > sitting outside of a webserver environment.  What you can do is
> > have
> > > a
> > > > consumer resource which routes calls to your java program.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Makes sense.  I would like to set up a publisher / consumer
> service
> > > > were
> > > > the publish is a web service and the consumer is java program
(no
> > > > web server running).  Is this possible? 
> > > > 
> > > > -----Original Message-----
> > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm not really sure, if I understand your initial question, so
> I'll
> > > try
> > > > to explain it based on the assumption, that it's unclear why
you
> > need
> > > > to
> > > > deploy 2 servlets to make the sample work.
> > > > 
> > > > 
> > > > For the producer/consumer example, they're mimicking a service
> > > > (producer) on a separate machine, which will inform the client
> > > machine
> > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > The WsnTestClient-file is just setting up the subscription
> between
> > > the
> > > > producer/consumer via the SubscriptionManager.
> > > > The actual consumer is the
> > ConsumerCapability/ConsumerCapabilityImpl.
> > > > 
> > > > As for the error you're getting, I'm not sure if you deployed
> both
> > > the
> > > > producer/consumer wars given the earlier assumption I made. But
> it
> > > > seems
> > > > that your WsnTestClient is trying to subscribe to your producer
> > > service
> > > > and getting denied as the service is not available at the
> specified
> > > > location (according to the WsnTestClient.java property and the
> > > involved
> > > > WSDL-files).
> > > > 
> > > > I don't have a clue yet about the error from you Tomcat log
> files.
> > > > 
> > > > 
> > > > Not really sure if this made any sense.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: 07 February 2007 13:43
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm using the official release and have performed step 2 and
here
> > are
> > > > the errors I'm getting.  Also could someone explain to me why I
> > need
> > > to
> > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The 
> > > > WsnTestClient should be the "Consumer".
> > > > 
> > > > In my tomcat5 log file: 
> > > > 
> > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method 
> > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> not
> > > > found
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > .java:46)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > ava:32)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:183)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:570)
> > > > 
> > > > 
> > > > Output from WsnTestClient:
> > > > 
> > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > 
> > > > <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://128.29.35.11:80
> > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > f-066b-ff60b581802c</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:A
> > > > ddress>
> > > >         </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://128.29.35.11:80
> > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > >             </wsnt:ConsumerReference>
> > > >         </wsnt:Subscribe>
> > > >     </soap:Body>
> > > > </soap:Envelope>
> > > > 
> > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> HTTP
> > > > response code: 500 for URL:
> > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:279)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:235)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > ribe(NotificationProducerClient.java:96)
> > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > Source)
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Thank you for your support. I downloaded the nightly build and
> ran
> > > > update_install.bat. The wsn-producer/consumer example worked at
> > once.
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > Sent: Mon 2/5/2007 3:18 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Good catch on the port number - make sure the port you're using
> for
> > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > client.
> > > > The port is part of the wsa:Address in the producer and
consumer
> > > EPRs,
> > > > so if it's wrong, you need to change it (you can do this on the
> > > command
> > > > line or by
> > > > 
> > > > modifying the test client code).
> > > > 
> > > > I'd also advise against building the source and trying to add
the
> > > > latest
> > > > bits incrementally - if you want to do a full build, follow the 
> > > > instructions on:
> > > > 
> > > >         http://ws.apache.org/muse/source-code.html
> > > > 
> > > > If you want the latest nightly build, you can get it here:
> > > > 
> > > >         http://ws.apache.org/muse/nightly/latest
> > > > 
> > > > Of course, except for the "step 2" that was added, neither of
> those
> > > > samples has changed in quite a while. You should be able to get
> > them
> > > > working by taking the official release and performing step 2 -
> let
> > me
> > > > know if the port number issue was indeed the problem.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > 
> > > > > I'm not sure why you would want to make the whole thing that 
> > > > > complicated.
> > > > > I seem to have no problem getting the producer/consumer
example
> > to
> > > > work
> > > > > with these simple steps.
> > > > > 
> > > > > 1) Download the nightly build (with the latest bug fixes)
from 
> > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > 
> > > > > 2) Run update-install
> > > > > 
> > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > (wsn-producer)
> > > > > and the WsnTestClient portType properties (producer_port &
> > > > > consumer_port) are pointing to the right serviceport
(according
> > to
> > > > your
> > > > > Tomcat specs).
> > > > > 
> > > > > 4) Use the ant build file to build both project-wars
> > > > > 
> > > > > 5) Deploy and enjoy
> > > > > 
> > > > > But that said did you have a look in the wsn-consumer
> > > > WsnTestClient.java
> > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > match
> > > > your
> > > > > Tomcat setup? To me it sounds like it's looking for a
consumer
> > > that's
> > > > 
> > > > > not listening on the given port. I could be wrong.
> > > > > 
> > > > > I know the portTypes have been a cause of some of my problems
> in
> > > the
> > > > > past.
> > > > > 
> > > > > /Lenni
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: 05 February 2007 12:59
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > If you follow the instructions for "Eclipse Development"
> > described
> > > > here
> > > > > 
> > > > > http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > you get a separate project in Eclipse for every muse
jar-file.
> > You
> > > > can
> > > > > then export each project as a jar-file and replace the ones
> found
> > > in
> > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > latest
> > > > > bugfixes and updates.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > You seemed to get farther than I did with the example.  I
been
> > able
> > > > to
> > > > > find on the internet that you need to add (#2) below, but
your
> > #3.
> > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: wsn-producer/consumer example
> > > > > 
> > > > > I have tried to get the wsn-producer/consumer sample to work
> > > without
> > > > > success. I have done the following:
> > > > > 
> > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > 
> > > > > 2. Added row <resource-type use-router-persistence="true"> in

> > > > > wsn-consumer muse.xml
> > > > > 
> > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
Replaced
> > old
> > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > 
> > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > 
> > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > WsnTestClient
> > > > > 
> > > > > I still get the following error:
> > > > > 
> > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> published
> > > via
> > > > > wsnt:Notify  failed to reach its destination. The consumer
may
> be
> > 
> > > > > unavailable.
> > > > The
> > > > > original
> > > > > error was: null
> > > > > 2007-feb-05 08:17:37
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > run
> > > > > INFO: Waiting 10 seconds before sending message...
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


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

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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
By the way the class file is location in the WEB-INF/classes area it's
just not seeing it for some reason. 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 21, 2007 3:32 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Yes.  I'm not sure what's going on,but this is the exception that's
thrown in the catalina.out file.  Any ideas?  Thanks for your help. 

java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
specified was not found: org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
Make sure the correct .class or .jar file is in the classpath.
	at
org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
entationClass(SimpleCapabilityDescriptor.java:49)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
apabilityDescriptor.java:90)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
tyDefinitions(SimpleResourceDescriptor.java:95)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
ourceDescriptor.java:397)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
ceDefinitions(SimpleDeploymentDescriptor.java:72)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
eploymentDescriptor.java:171)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:144)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:799)

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 2:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

just to clarify - you say you're deploying the wsn-consumer sample
as-is 
(run 'ant' and copy over WAR) and it's not receiving the notifications?

are you deploying it in the same container as the producer? if not, did

you make sure to change the port number used in the consumer's URI (in
the 
test client)?

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
PM:

>  The example I thought worked didn't.  When I view the catalina.out
> file
> the wsn-consumer does not receive publish updates, it seems to
> subscribe correctly.  A JavaClassNotFound exception is thrown when
> trying to access ConsumerCapabilityImpl.class.  Everything seems to
be
> deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 1:08 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> from within the NotificationMessageListener API, you'll get a 
> NotificationMessage object(s) representing the message. The 
> NotificationMessage will have getter methods for things like the
> producer 
> EPR, topic, etc. It also has the XML payload, which is custom to your

> scenario. If you are using WSDM's WEF for formatting your events, you
> can 
> convert the payload XML into a ManagementEvent object like so:
> 
> public void process(NotificationMessage msg)
> {
>     WefFactory factory = new SimpleWefFactory();
> 
>     Iterator i = msg.getMessageContent().iterator();
> 
>     while (i.hasNext())
>     {
>         Element eventXML = (Element)i.next();
>         ManagementEvent event = factory.createEvent(eventXML);
>         // use getters to process event data
>     }
> }
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> PM:
> 
> > No I do not want to write any HTTP server myself.  I want to take
the
> > received SOAP messages from the consumer web service convert those
> into
> > Java Objects and forward them to my non webapp.  I can just create
a
> > socket and send it that way I was just hoping that maybe I could
just
> > use the MUSE API to do this since I can set up services from a non
> > webapp. 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 12:57 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I don't see how you would receive the messages on a non-web app...
> > unless 
> > you're writing your own little server and parsing the HTTP
yourself.
> If
> > 
> > that's the case, I'd advise you to rethink it - you can either use
> OSGi
> > 
> > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
to
> > host 
> > the app (~5MB). Writing a decent HTTP server for one known client
is
> > easy 
> > - writing a robust HTTP server is quite hard.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:42:53
> > PM:
> > 
> > > See below <DAC>
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > The WsnTestClient should not be necessary in your real world
> scenario
> > -
> > > 
> > > it's just a driver to get the sample going. In your situation,
you
> > can 
> > > just have the consumer resource subscribe to the producer itself
-
> > the 
> > > code to do that would be very similar to what's in WsnTestClient
> (the
> > > use 
> > > of NotificationProducerClient), but you would package it in your
> > > consumer 
> > > resource instead of a command line app. You could perform the
> > > subscription 
> > > work in the initialize() method of one of your capabilities on
the 
> > > consumer side.
> > > 
> > > Alternatively, in a more complex scenario, you might have an 
> > > "orchestrator" service that is subscribing all of the consumers
to
> > the 
> > > events they need to handle. This scenario would be a lot like the
> > > sample 
> > > in that a third service would call subscribe() and tell the
> producer
> > > which 
> > > consumer resource to send the messages to. This is just like the 
> > > WsnTestClient app, except it would probably be a web service as
> well.
> > > 
> > > If you want to forward messages received by one consumer to
another
> 
> > > consumer(s), like a broker would, you just have to use the 
> > > NotificationMessageListener API - you can implement a listener
that
> 
> > > listens for all notifications and then uses
> > NotificationConsumerClient
> > > to 
> > > forward the messages to other resources.
> > > 
> > > <DAC> Can I have a broker service that would subscribe (NON
> > > WEB)consumer's. 
> > >   I want to have a consumer web service that just forwards
messages
> > > from the webapp 
> > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > NotificationMessageListener and
> > > NotificationConsumerClient or do I need to use another means to
> > forward
> > > messages from a webapp to a
> > > Non webapp.  I ask because I'm able to connect two webservices
> > together
> > > from a non webapp.  Thanks again for
> > > all you help. 
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> 09:36:37
> > > AM:
> > > 
> > > > Ok thanks.  Let's say for instance that I have two different
> types
> > of
> > > > clients.  One type of clients that are within the same firewall
> as
> > my
> > > > web server and are on the same network.  The other is a client
> that
> > > is
> > > > outside the firewall and not on the same network.  I can see
that
> > the
> > > > later would need a consumer web service running and the
incoming
> > > > requests would have to be forwarded to the user of the consumer
> web
> > > > service. 
> > > > 
> > > > First question, when I use the API's to create the subscription
> > > between
> > > > the publisher and consumer are there methods I can call that
> would
> > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > message
> > > > or is this something I have to do manually i.e create a socket
> from
> > > the
> > > > consumer to the WsnTestClient or is this already built into
> > > MUSE/AXIS?
> > > > 
> > > > 
> > > > Second question, when I am within the same network is there a
way
> > for
> > > > me to set up a publisher/consumer without creating a consumer
web
> > > > service or is this not what is intended with MUSE and I would
> still
> > > > need a consumer web server and some mechanism to forward
messages
> > > from
> > > > the consumer web service to the (WsnTestClient).
> > > > 
> > > > Thanks again for all your answers and help!!
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Each resource must be a web service resource with a URI address
> > that
> > > > identifies its location.  So your consumer cannot be a java
> program
> > > > sitting outside of a webserver environment.  What you can do is
> > have
> > > a
> > > > consumer resource which routes calls to your java program.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Makes sense.  I would like to set up a publisher / consumer
> service
> > > > were
> > > > the publish is a web service and the consumer is java program
(no
> > > > web server running).  Is this possible? 
> > > > 
> > > > -----Original Message-----
> > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm not really sure, if I understand your initial question, so
> I'll
> > > try
> > > > to explain it based on the assumption, that it's unclear why
you
> > need
> > > > to
> > > > deploy 2 servlets to make the sample work.
> > > > 
> > > > 
> > > > For the producer/consumer example, they're mimicking a service
> > > > (producer) on a separate machine, which will inform the client
> > > machine
> > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > The WsnTestClient-file is just setting up the subscription
> between
> > > the
> > > > producer/consumer via the SubscriptionManager.
> > > > The actual consumer is the
> > ConsumerCapability/ConsumerCapabilityImpl.
> > > > 
> > > > As for the error you're getting, I'm not sure if you deployed
> both
> > > the
> > > > producer/consumer wars given the earlier assumption I made. But
> it
> > > > seems
> > > > that your WsnTestClient is trying to subscribe to your producer
> > > service
> > > > and getting denied as the service is not available at the
> specified
> > > > location (according to the WsnTestClient.java property and the
> > > involved
> > > > WSDL-files).
> > > > 
> > > > I don't have a clue yet about the error from you Tomcat log
> files.
> > > > 
> > > > 
> > > > Not really sure if this made any sense.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: 07 February 2007 13:43
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm using the official release and have performed step 2 and
here
> > are
> > > > the errors I'm getting.  Also could someone explain to me why I
> > need
> > > to
> > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > WsnTestClient should be the "Consumer". 
> > > > 
> > > > In my tomcat5 log file: 
> > > > 
> > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> not
> > > > found
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > .java:46)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > ava:32)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:183)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:570)
> > > > 
> > > > 
> > > > Output from WsnTestClient:
> > > > 
> > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > 
> > > > <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://128.29.35.11:80
> > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > f-066b-ff60b581802c</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:A
> > > > ddress>
> > > >         </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://128.29.35.11:80
> > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > >             </wsnt:ConsumerReference>
> > > >         </wsnt:Subscribe>
> > > >     </soap:Body>
> > > > </soap:Envelope>
> > > > 
> > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> HTTP
> > > > response code: 500 for URL:
> > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:279)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:235)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > ribe(NotificationProducerClient.java:96)
> > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > Source)
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Thank you for your support. I downloaded the nightly build and
> ran
> > > > update_install.bat. The wsn-producer/consumer example worked at
> > once.
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > Sent: Mon 2/5/2007 3:18 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Good catch on the port number - make sure the port you're using
> for
> > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > client.
> > > > The port is part of the wsa:Address in the producer and
consumer
> > > EPRs,
> > > > so if it's wrong, you need to change it (you can do this on the
> > > command
> > > > line or by
> > > > 
> > > > modifying the test client code).
> > > > 
> > > > I'd also advise against building the source and trying to add
the
> > > > latest
> > > > bits incrementally - if you want to do a full build, follow the
> > > > instructions on:
> > > > 
> > > >         http://ws.apache.org/muse/source-code.html
> > > > 
> > > > If you want the latest nightly build, you can get it here:
> > > > 
> > > >         http://ws.apache.org/muse/nightly/latest
> > > > 
> > > > Of course, except for the "step 2" that was added, neither of
> those
> > > > samples has changed in quite a while. You should be able to get
> > them
> > > > working by taking the official release and performing step 2 -
> let
> > me
> > > > know if the port number issue was indeed the problem.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > 
> > > > > I'm not sure why you would want to make the whole thing that 
> > > > > complicated.
> > > > > I seem to have no problem getting the producer/consumer
example
> > to
> > > > work
> > > > > with these simple steps.
> > > > > 
> > > > > 1) Download the nightly build (with the latest bug fixes)
from 
> > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > 
> > > > > 2) Run update-install
> > > > > 
> > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > (wsn-producer)
> > > > > and the WsnTestClient portType properties (producer_port &
> > > > > consumer_port) are pointing to the right serviceport
(according
> > to
> > > > your
> > > > > Tomcat specs).
> > > > > 
> > > > > 4) Use the ant build file to build both project-wars
> > > > > 
> > > > > 5) Deploy and enjoy
> > > > > 
> > > > > But that said did you have a look in the wsn-consumer
> > > > WsnTestClient.java
> > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > match
> > > > your
> > > > > Tomcat setup? To me it sounds like it's looking for a
consumer
> > > that's
> > > > 
> > > > > not listening on the given port. I could be wrong.
> > > > > 
> > > > > I know the portTypes have been a cause of some of my problems
> in
> > > the 
> > > > > past.
> > > > > 
> > > > > /Lenni
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: 05 February 2007 12:59
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > If you follow the instructions for "Eclipse Development"
> > described
> > > > here 
> > > > > 
> > > > > http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > you get a separate project in Eclipse for every muse
jar-file.
> > You
> > > > can
> > > > > then export each project as a jar-file and replace the ones
> found
> > > in 
> > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > latest 
> > > > > bugfixes and updates.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > You seemed to get farther than I did with the example.  I
been
> > able
> > > > to
> > > > > find on the internet that you need to add (#2) below, but
your
> > #3.
> > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: wsn-producer/consumer example
> > > > > 
> > > > > I have tried to get the wsn-producer/consumer sample to work
> > > without 
> > > > > success. I have done the following:
> > > > > 
> > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > 
> > > > > 2. Added row <resource-type use-router-persistence="true"> in

> > > > > wsn-consumer muse.xml
> > > > > 
> > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
Replaced
> > old
> > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > 
> > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > 
> > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > WsnTestClient 
> > > > > 
> > > > > I still get the following error:
> > > > > 
> > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> published
> > > via 
> > > > > wsnt:Notify  failed to reach its destination. The consumer
may
> be
> > 
> > > > > unavailable.
> > > > The
> > > > > original
> > > > > error was: null
> > > > > 2007-feb-05 08:17:37
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > run
> > > > > INFO: Waiting 10 seconds before sending message...
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
well, the first thing it tells me is that the wsn-producer sample, not 
wsn-consumer, is throwing the exception - that's where the class is from 
in that scenario. I'll have to try out a few configurations to see if I 
can reproduce it. Attach your WAR file to JIRA if you can...

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 03:31:50 PM:

> Yes.  I'm not sure what's going on,but this is the exception that's
> thrown in the catalina.out file.  Any ideas?  Thanks for your help. 
> 
> java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
> specified was not found: org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
> Make sure the correct .class or .jar file is in the classpath.
>    at
> org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
>    at
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
> entationClass(SimpleCapabilityDescriptor.java:49)
>    at
> org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
> apabilityDescriptor.java:90)
>    at
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
> tyDefinitions(SimpleResourceDescriptor.java:95)
>    at
> org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
> ourceDescriptor.java:397)
>    at
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
> ceDefinitions(SimpleDeploymentDescriptor.java:72)
>    at
> org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
> eploymentDescriptor.java:171)
>    at
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:144)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:799)
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 21, 2007 2:33 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> just to clarify - you say you're deploying the wsn-consumer sample
> as-is 
> (run 'ant' and copy over WAR) and it's not receiving the notifications?
> 
> are you deploying it in the same container as the producer? if not, did
> 
> you make sure to change the port number used in the consumer's URI (in
> the 
> test client)?
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
> PM:
> 
> >  The example I thought worked didn't.  When I view the catalina.out
> > file
> > the wsn-consumer does not receive publish updates, it seems to
> > subscribe correctly.  A JavaClassNotFound exception is thrown when
> > trying to access ConsumerCapabilityImpl.class.  Everything seems to
> be
> > deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 1:08 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > from within the NotificationMessageListener API, you'll get a 
> > NotificationMessage object(s) representing the message. The 
> > NotificationMessage will have getter methods for things like the
> > producer 
> > EPR, topic, etc. It also has the XML payload, which is custom to your
> 
> > scenario. If you are using WSDM's WEF for formatting your events, you
> > can 
> > convert the payload XML into a ManagementEvent object like so:
> > 
> > public void process(NotificationMessage msg)
> > {
> >     WefFactory factory = new SimpleWefFactory();
> > 
> >     Iterator i = msg.getMessageContent().iterator();
> > 
> >     while (i.hasNext())
> >     {
> >         Element eventXML = (Element)i.next();
> >         ManagementEvent event = factory.createEvent(eventXML);
> >         // use getters to process event data
> >     }
> > }
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> > PM:
> > 
> > > No I do not want to write any HTTP server myself.  I want to take
> the
> > > received SOAP messages from the consumer web service convert those
> > into
> > > Java Objects and forward them to my non webapp.  I can just create
> a
> > > socket and send it that way I was just hoping that maybe I could
> just
> > > use the MUSE API to do this since I can set up services from a non
> > > webapp. 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:57 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I don't see how you would receive the messages on a non-web app...
> > > unless 
> > > you're writing your own little server and parsing the HTTP
> yourself.
> > If
> > > 
> > > that's the case, I'd advise you to rethink it - you can either use
> > OSGi
> > > 
> > > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
> to
> > > host 
> > > the app (~5MB). Writing a decent HTTP server for one known client
> is
> > > easy 
> > > - writing a robust HTTP server is quite hard.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
> 12:42:53
> > > PM:
> > > 
> > > > See below <DAC>
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > The WsnTestClient should not be necessary in your real world
> > scenario
> > > -
> > > > 
> > > > it's just a driver to get the sample going. In your situation,
> you
> > > can 
> > > > just have the consumer resource subscribe to the producer itself
> -
> > > the 
> > > > code to do that would be very similar to what's in WsnTestClient
> > (the
> > > > use 
> > > > of NotificationProducerClient), but you would package it in your
> > > > consumer 
> > > > resource instead of a command line app. You could perform the
> > > > subscription 
> > > > work in the initialize() method of one of your capabilities on
> the 
> > > > consumer side.
> > > > 
> > > > Alternatively, in a more complex scenario, you might have an 
> > > > "orchestrator" service that is subscribing all of the consumers
> to
> > > the 
> > > > events they need to handle. This scenario would be a lot like the
> > > > sample 
> > > > in that a third service would call subscribe() and tell the
> > producer
> > > > which 
> > > > consumer resource to send the messages to. This is just like the 
> > > > WsnTestClient app, except it would probably be a web service as
> > well.
> > > > 
> > > > If you want to forward messages received by one consumer to
> another
> > 
> > > > consumer(s), like a broker would, you just have to use the 
> > > > NotificationMessageListener API - you can implement a listener
> that
> > 
> > > > listens for all notifications and then uses
> > > NotificationConsumerClient
> > > > to 
> > > > forward the messages to other resources.
> > > > 
> > > > <DAC> Can I have a broker service that would subscribe (NON
> > > > WEB)consumer's. 
> > > >   I want to have a consumer web service that just forwards
> messages
> > > > from the webapp 
> > > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > > NotificationMessageListener and
> > > > NotificationConsumerClient or do I need to use another means to
> > > forward
> > > > messages from a webapp to a
> > > > Non webapp.  I ask because I'm able to connect two webservices
> > > together
> > > > from a non webapp.  Thanks again for
> > > > all you help. 
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> > 09:36:37
> > > > AM:
> > > > 
> > > > > Ok thanks.  Let's say for instance that I have two different
> > types
> > > of
> > > > > clients.  One type of clients that are within the same firewall
> > as
> > > my
> > > > > web server and are on the same network.  The other is a client
> > that
> > > > is
> > > > > outside the firewall and not on the same network.  I can see
> that
> > > the
> > > > > later would need a consumer web service running and the
> incoming
> > > > > requests would have to be forwarded to the user of the consumer
> > web
> > > > > service. 
> > > > > 
> > > > > First question, when I use the API's to create the subscription
> > > > between
> > > > > the publisher and consumer are there methods I can call that
> > would
> > > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > > message
> > > > > or is this something I have to do manually i.e create a socket
> > from
> > > > the
> > > > > consumer to the WsnTestClient or is this already built into
> > > > MUSE/AXIS?
> > > > > 
> > > > > 
> > > > > Second question, when I am within the same network is there a
> way
> > > for
> > > > > me to set up a publisher/consumer without creating a consumer
> web
> > > > > service or is this not what is intended with MUSE and I would
> > still
> > > > > need a consumer web server and some mechanism to forward
> messages
> > > > from
> > > > > the consumer web service to the (WsnTestClient).
> > > > > 
> > > > > Thanks again for all your answers and help!!
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Each resource must be a web service resource with a URI address
> > > that
> > > > > identifies its location.  So your consumer cannot be a java
> > program
> > > > > sitting outside of a webserver environment.  What you can do is
> > > have
> > > > a
> > > > > consumer resource which routes calls to your java program.
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Makes sense.  I would like to set up a publisher / consumer
> > service
> > > > > were
> > > > > the publish is a web service and the consumer is java program
> (no
> > > > > web server running).  Is this possible? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm not really sure, if I understand your initial question, so
> > I'll
> > > > try
> > > > > to explain it based on the assumption, that it's unclear why
> you
> > > need
> > > > > to
> > > > > deploy 2 servlets to make the sample work.
> > > > > 
> > > > > 
> > > > > For the producer/consumer example, they're mimicking a service
> > > > > (producer) on a separate machine, which will inform the client
> > > > machine
> > > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > > The WsnTestClient-file is just setting up the subscription
> > between
> > > > the
> > > > > producer/consumer via the SubscriptionManager.
> > > > > The actual consumer is the
> > > ConsumerCapability/ConsumerCapabilityImpl.
> > > > > 
> > > > > As for the error you're getting, I'm not sure if you deployed
> > both
> > > > the
> > > > > producer/consumer wars given the earlier assumption I made. But
> > it
> > > > > seems
> > > > > that your WsnTestClient is trying to subscribe to your producer
> > > > service
> > > > > and getting denied as the service is not available at the
> > specified
> > > > > location (according to the WsnTestClient.java property and the
> > > > involved
> > > > > WSDL-files).
> > > > > 
> > > > > I don't have a clue yet about the error from you Tomcat log
> > files.
> > > > > 
> > > > > 
> > > > > Not really sure if this made any sense.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: 07 February 2007 13:43
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > I'm using the official release and have performed step 2 and
> here
> > > are
> > > > > the errors I'm getting.  Also could someone explain to me why I
> > > need
> > > > to
> > > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > > WsnTestClient should be the "Consumer". 
> > > > > 
> > > > > In my tomcat5 log file: 
> > > > > 
> > > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> > not
> > > > > found
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > > .java:46)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > > ava:32)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > > tIsolationLayer.java:183)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > > iServlet.java:36)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > > 50)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > > >    at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > > ationFilterChain.java:237)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > > terChain.java:157)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > > ve.java:214)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > > ntextValve.java:198)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > > ve.java:152)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > > a:137)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > > a:118)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:102)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > > .java:109)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > > ontext.java:104)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > > 520)
> > > > >    at
> > > > >
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > > 99)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > > Connection(Http11Protocol.java:705)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > > 77)
> > > > >    at
> > > > >
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > > l.java:683)
> > > > >    at java.lang.Thread.run(Thread.java:570)
> > > > > 
> > > > > 
> > > > > Output from WsnTestClient:
> > > > > 
> > > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > > 
> > > > > <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://128.29.35.11:80
> > > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > > f-066b-ff60b581802c</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:A
> > > > > ddress>
> > > > >         </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://128.29.35.11:80
> > > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > > >             </wsnt:ConsumerReference>
> > > > >         </wsnt:Subscribe>
> > > > >     </soap:Body>
> > > > > </soap:Envelope>
> > > > > 
> > > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> > HTTP
> > > > > response code: 500 for URL:
> > > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > > >         at
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:279)
> > > > >         at
> > > > >
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > > nt.java:235)
> > > > >         at
> > > > >
> > > >
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > > ribe(NotificationProducerClient.java:96)
> > > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > > Source)
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Thank you for your support. I downloaded the nightly build and
> > ran
> > > > > update_install.bat. The wsn-producer/consumer example worked at
> > > once.
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > > Sent: Mon 2/5/2007 3:18 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > Good catch on the port number - make sure the port you're using
> > for
> > > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > > client.
> > > > > The port is part of the wsa:Address in the producer and
> consumer
> > > > EPRs,
> > > > > so if it's wrong, you need to change it (you can do this on the
> > > > command
> > > > > line or by
> > > > > 
> > > > > modifying the test client code).
> > > > > 
> > > > > I'd also advise against building the source and trying to add
> the
> > > > > latest
> > > > > bits incrementally - if you want to do a full build, follow the
> > > > > instructions on:
> > > > > 
> > > > >         http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > If you want the latest nightly build, you can get it here:
> > > > > 
> > > > >         http://ws.apache.org/muse/nightly/latest
> > > > > 
> > > > > Of course, except for the "step 2" that was added, neither of
> > those
> > > > > samples has changed in quite a while. You should be able to get
> > > them
> > > > > working by taking the official release and performing step 2 -
> > let
> > > me
> > > > > know if the port number issue was indeed the problem.
> > > > > 
> > > > > Dan
> > > > > 
> > > > > 
> > > > > 
> > > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > > 
> > > > > > I'm not sure why you would want to make the whole thing that 
> > > > > > complicated.
> > > > > > I seem to have no problem getting the producer/consumer
> example
> > > to
> > > > > work
> > > > > > with these simple steps.
> > > > > > 
> > > > > > 1) Download the nightly build (with the latest bug fixes)
> from 
> > > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > > 
> > > > > > 2) Run update-install
> > > > > > 
> > > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > > (wsn-producer)
> > > > > > and the WsnTestClient portType properties (producer_port &
> > > > > > consumer_port) are pointing to the right serviceport
> (according
> > > to
> > > > > your
> > > > > > Tomcat specs).
> > > > > > 
> > > > > > 4) Use the ant build file to build both project-wars
> > > > > > 
> > > > > > 5) Deploy and enjoy
> > > > > > 
> > > > > > But that said did you have a look in the wsn-consumer
> > > > > WsnTestClient.java
> > > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > > match
> > > > > your
> > > > > > Tomcat setup? To me it sounds like it's looking for a
> consumer
> > > > that's
> > > > > 
> > > > > > not listening on the given port. I could be wrong.
> > > > > > 
> > > > > > I know the portTypes have been a cause of some of my problems
> > in
> > > > the 
> > > > > > past.
> > > > > > 
> > > > > > /Lenni
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: 05 February 2007 12:59
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > If you follow the instructions for "Eclipse Development"
> > > described
> > > > > here 
> > > > > > 
> > > > > > http://ws.apache.org/muse/source-code.html
> > > > > > 
> > > > > > you get a separate project in Eclipse for every muse
> jar-file.
> > > You
> > > > > can
> > > > > > then export each project as a jar-file and replace the ones
> > found
> > > > in 
> > > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > > latest 
> > > > > > bugfixes and updates.
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: RE: wsn-producer/consumer example
> > > > > > 
> > > > > > You seemed to get farther than I did with the example.  I
> been
> > > able
> > > > > to
> > > > > > find on the internet that you need to add (#2) below, but
> your
> > > #3.
> > > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > > 
> > > > > > -----Original Message-----
> > > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > > To: muse-user@ws.apache.org
> > > > > > Subject: wsn-producer/consumer example
> > > > > > 
> > > > > > I have tried to get the wsn-producer/consumer sample to work
> > > > without 
> > > > > > success. I have done the following:
> > > > > > 
> > > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > > 
> > > > > > 2. Added row <resource-type use-router-persistence="true"> in
> 
> > > > > > wsn-consumer muse.xml
> > > > > > 
> > > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
> Replaced
> > > old
> > > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > > 
> > > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > > 
> > > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > > WsnTestClient 
> > > > > > 
> > > > > > I still get the following error:
> > > > > > 
> > > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> > published
> > > > via 
> > > > > > wsnt:Notify  failed to reach its destination. The consumer
> may
> > be
> > > 
> > > > > > unavailable.
> > > > > The
> > > > > > original
> > > > > > error was: null
> > > > > > 2007-feb-05 08:17:37
> > > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > > run
> > > > > > INFO: Waiting 10 seconds before sending message...
> > > > > > 
> > > > > > Any ideas?
> > > > > > 
> > > > > > /Mattias
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > >
> > > >
> > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Yes.  I'm not sure what's going on,but this is the exception that's
thrown in the catalina.out file.  Any ideas?  Thanks for your help. 

java.lang.RuntimeException: [ID = 'JavaClassNotFound'] The Java class
specified was not found: org.apache.ws.muse.test.wsrf.MyCapabilityImpl.
Make sure the correct .class or .jar file is in the classpath.
	at
org.apache.muse.util.ReflectUtils.getClass(ReflectUtils.java:213)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.createImplem
entationClass(SimpleCapabilityDescriptor.java:49)
	at
org.apache.muse.core.descriptor.SimpleCapabilityDescriptor.load(SimpleC
apabilityDescriptor.java:90)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabili
tyDefinitions(SimpleResourceDescriptor.java:95)
	at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleRes
ourceDescriptor.java:397)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResour
ceDefinitions(SimpleDeploymentDescriptor.java:72)
	at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleD
eploymentDescriptor.java:171)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:144)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:799)

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 21, 2007 2:33 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

just to clarify - you say you're deploying the wsn-consumer sample
as-is 
(run 'ant' and copy over WAR) and it's not receiving the notifications?

are you deploying it in the same container as the producer? if not, did

you make sure to change the port number used in the consumer's URI (in
the 
test client)?

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58
PM:

>  The example I thought worked didn't.  When I view the catalina.out
> file
> the wsn-consumer does not receive publish updates, it seems to
> subscribe correctly.  A JavaClassNotFound exception is thrown when
> trying to access ConsumerCapabilityImpl.class.  Everything seems to
be
> deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 1:08 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> from within the NotificationMessageListener API, you'll get a 
> NotificationMessage object(s) representing the message. The 
> NotificationMessage will have getter methods for things like the
> producer 
> EPR, topic, etc. It also has the XML payload, which is custom to your

> scenario. If you are using WSDM's WEF for formatting your events, you
> can 
> convert the payload XML into a ManagementEvent object like so:
> 
> public void process(NotificationMessage msg)
> {
>     WefFactory factory = new SimpleWefFactory();
> 
>     Iterator i = msg.getMessageContent().iterator();
> 
>     while (i.hasNext())
>     {
>         Element eventXML = (Element)i.next();
>         ManagementEvent event = factory.createEvent(eventXML);
>         // use getters to process event data
>     }
> }
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> PM:
> 
> > No I do not want to write any HTTP server myself.  I want to take
the
> > received SOAP messages from the consumer web service convert those
> into
> > Java Objects and forward them to my non webapp.  I can just create
a
> > socket and send it that way I was just hoping that maybe I could
just
> > use the MUSE API to do this since I can set up services from a non
> > webapp. 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 12:57 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I don't see how you would receive the messages on a non-web app...
> > unless 
> > you're writing your own little server and parsing the HTTP
yourself.
> If
> > 
> > that's the case, I'd advise you to rethink it - you can either use
> OSGi
> > 
> > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat
to
> > host 
> > the app (~5MB). Writing a decent HTTP server for one known client
is
> > easy 
> > - writing a robust HTTP server is quite hard.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007
12:42:53
> > PM:
> > 
> > > See below <DAC>
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > The WsnTestClient should not be necessary in your real world
> scenario
> > -
> > > 
> > > it's just a driver to get the sample going. In your situation,
you
> > can 
> > > just have the consumer resource subscribe to the producer itself
-
> > the 
> > > code to do that would be very similar to what's in WsnTestClient
> (the
> > > use 
> > > of NotificationProducerClient), but you would package it in your
> > > consumer 
> > > resource instead of a command line app. You could perform the
> > > subscription 
> > > work in the initialize() method of one of your capabilities on
the 
> > > consumer side.
> > > 
> > > Alternatively, in a more complex scenario, you might have an 
> > > "orchestrator" service that is subscribing all of the consumers
to
> > the 
> > > events they need to handle. This scenario would be a lot like the
> > > sample 
> > > in that a third service would call subscribe() and tell the
> producer
> > > which 
> > > consumer resource to send the messages to. This is just like the 
> > > WsnTestClient app, except it would probably be a web service as
> well.
> > > 
> > > If you want to forward messages received by one consumer to
another
> 
> > > consumer(s), like a broker would, you just have to use the 
> > > NotificationMessageListener API - you can implement a listener
that
> 
> > > listens for all notifications and then uses
> > NotificationConsumerClient
> > > to 
> > > forward the messages to other resources.
> > > 
> > > <DAC> Can I have a broker service that would subscribe (NON
> > > WEB)consumer's. 
> > >   I want to have a consumer web service that just forwards
messages
> > > from the webapp 
> > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > NotificationMessageListener and
> > > NotificationConsumerClient or do I need to use another means to
> > forward
> > > messages from a webapp to a
> > > Non webapp.  I ask because I'm able to connect two webservices
> > together
> > > from a non webapp.  Thanks again for
> > > all you help. 
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> 09:36:37
> > > AM:
> > > 
> > > > Ok thanks.  Let's say for instance that I have two different
> types
> > of
> > > > clients.  One type of clients that are within the same firewall
> as
> > my
> > > > web server and are on the same network.  The other is a client
> that
> > > is
> > > > outside the firewall and not on the same network.  I can see
that
> > the
> > > > later would need a consumer web service running and the
incoming
> > > > requests would have to be forwarded to the user of the consumer
> web
> > > > service. 
> > > > 
> > > > First question, when I use the API's to create the subscription
> > > between
> > > > the publisher and consumer are there methods I can call that
> would
> > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > message
> > > > or is this something I have to do manually i.e create a socket
> from
> > > the
> > > > consumer to the WsnTestClient or is this already built into
> > > MUSE/AXIS?
> > > > 
> > > > 
> > > > Second question, when I am within the same network is there a
way
> > for
> > > > me to set up a publisher/consumer without creating a consumer
web
> > > > service or is this not what is intended with MUSE and I would
> still
> > > > need a consumer web server and some mechanism to forward
messages
> > > from
> > > > the consumer web service to the (WsnTestClient).
> > > > 
> > > > Thanks again for all your answers and help!!
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Each resource must be a web service resource with a URI address
> > that
> > > > identifies its location.  So your consumer cannot be a java
> program
> > > > sitting outside of a webserver environment.  What you can do is
> > have
> > > a
> > > > consumer resource which routes calls to your java program.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Makes sense.  I would like to set up a publisher / consumer
> service
> > > > were
> > > > the publish is a web service and the consumer is java program
(no
> > > > web server running).  Is this possible? 
> > > > 
> > > > -----Original Message-----
> > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm not really sure, if I understand your initial question, so
> I'll
> > > try
> > > > to explain it based on the assumption, that it's unclear why
you
> > need
> > > > to
> > > > deploy 2 servlets to make the sample work.
> > > > 
> > > > 
> > > > For the producer/consumer example, they're mimicking a service
> > > > (producer) on a separate machine, which will inform the client
> > > machine
> > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > The WsnTestClient-file is just setting up the subscription
> between
> > > the
> > > > producer/consumer via the SubscriptionManager.
> > > > The actual consumer is the
> > ConsumerCapability/ConsumerCapabilityImpl.
> > > > 
> > > > As for the error you're getting, I'm not sure if you deployed
> both
> > > the
> > > > producer/consumer wars given the earlier assumption I made. But
> it
> > > > seems
> > > > that your WsnTestClient is trying to subscribe to your producer
> > > service
> > > > and getting denied as the service is not available at the
> specified
> > > > location (according to the WsnTestClient.java property and the
> > > involved
> > > > WSDL-files).
> > > > 
> > > > I don't have a clue yet about the error from you Tomcat log
> files.
> > > > 
> > > > 
> > > > Not really sure if this made any sense.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: 07 February 2007 13:43
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm using the official release and have performed step 2 and
here
> > are
> > > > the errors I'm getting.  Also could someone explain to me why I
> > need
> > > to
> > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > WsnTestClient should be the "Consumer". 
> > > > 
> > > > In my tomcat5 log file: 
> > > > 
> > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> not
> > > > found
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > .java:46)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > ava:32)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:183)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:570)
> > > > 
> > > > 
> > > > Output from WsnTestClient:
> > > > 
> > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > 
> > > > <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://128.29.35.11:80
> > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > f-066b-ff60b581802c</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:A
> > > > ddress>
> > > >         </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://128.29.35.11:80
> > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > >             </wsnt:ConsumerReference>
> > > >         </wsnt:Subscribe>
> > > >     </soap:Body>
> > > > </soap:Envelope>
> > > > 
> > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> HTTP
> > > > response code: 500 for URL:
> > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:279)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:235)
> > > >         at
> > > >
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > ribe(NotificationProducerClient.java:96)
> > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > Source)
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Thank you for your support. I downloaded the nightly build and
> ran
> > > > update_install.bat. The wsn-producer/consumer example worked at
> > once.
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > Sent: Mon 2/5/2007 3:18 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Good catch on the port number - make sure the port you're using
> for
> > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > client.
> > > > The port is part of the wsa:Address in the producer and
consumer
> > > EPRs,
> > > > so if it's wrong, you need to change it (you can do this on the
> > > command
> > > > line or by
> > > > 
> > > > modifying the test client code).
> > > > 
> > > > I'd also advise against building the source and trying to add
the
> > > > latest
> > > > bits incrementally - if you want to do a full build, follow the
> > > > instructions on:
> > > > 
> > > >         http://ws.apache.org/muse/source-code.html
> > > > 
> > > > If you want the latest nightly build, you can get it here:
> > > > 
> > > >         http://ws.apache.org/muse/nightly/latest
> > > > 
> > > > Of course, except for the "step 2" that was added, neither of
> those
> > > > samples has changed in quite a while. You should be able to get
> > them
> > > > working by taking the official release and performing step 2 -
> let
> > me
> > > > know if the port number issue was indeed the problem.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > 
> > > > > I'm not sure why you would want to make the whole thing that 
> > > > > complicated.
> > > > > I seem to have no problem getting the producer/consumer
example
> > to
> > > > work
> > > > > with these simple steps.
> > > > > 
> > > > > 1) Download the nightly build (with the latest bug fixes)
from 
> > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > 
> > > > > 2) Run update-install
> > > > > 
> > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > (wsn-producer)
> > > > > and the WsnTestClient portType properties (producer_port &
> > > > > consumer_port) are pointing to the right serviceport
(according
> > to
> > > > your
> > > > > Tomcat specs).
> > > > > 
> > > > > 4) Use the ant build file to build both project-wars
> > > > > 
> > > > > 5) Deploy and enjoy
> > > > > 
> > > > > But that said did you have a look in the wsn-consumer
> > > > WsnTestClient.java
> > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > match
> > > > your
> > > > > Tomcat setup? To me it sounds like it's looking for a
consumer
> > > that's
> > > > 
> > > > > not listening on the given port. I could be wrong.
> > > > > 
> > > > > I know the portTypes have been a cause of some of my problems
> in
> > > the 
> > > > > past.
> > > > > 
> > > > > /Lenni
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: 05 February 2007 12:59
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > If you follow the instructions for "Eclipse Development"
> > described
> > > > here 
> > > > > 
> > > > > http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > you get a separate project in Eclipse for every muse
jar-file.
> > You
> > > > can
> > > > > then export each project as a jar-file and replace the ones
> found
> > > in 
> > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > latest 
> > > > > bugfixes and updates.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > You seemed to get farther than I did with the example.  I
been
> > able
> > > > to
> > > > > find on the internet that you need to add (#2) below, but
your
> > #3.
> > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: wsn-producer/consumer example
> > > > > 
> > > > > I have tried to get the wsn-producer/consumer sample to work
> > > without 
> > > > > success. I have done the following:
> > > > > 
> > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > 
> > > > > 2. Added row <resource-type use-router-persistence="true"> in

> > > > > wsn-consumer muse.xml
> > > > > 
> > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN.
Replaced
> > old
> > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > 
> > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > 
> > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > WsnTestClient 
> > > > > 
> > > > > I still get the following error:
> > > > > 
> > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> published
> > > via 
> > > > > wsnt:Notify  failed to reach its destination. The consumer
may
> be
> > 
> > > > > unavailable.
> > > > The
> > > > > original
> > > > > error was: null
> > > > > 2007-feb-05 08:17:37
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > run
> > > > > INFO: Waiting 10 seconds before sending message...
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: How to configure MUSE logging to spill out server side error stacktrace

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Muse puts all error messages and stack traces that it can control in 
muse.log. If an error is flagged by Axis2 before it gets to Muse, you'll 
either have to turn up the Axis2 logging config or use a SOAP monitor to 
see the actual error; at the moment, runtime exceptions during 
initialization get dumped to the console rather than muse.log, and we 
haven't gone back to determine why this is happening. But either way, the 
info should be available on the server-side.

If you want to add your own log messages in addition to the one Muse puts 
in muse.log for thrown exceptions, you have to use the capability's 
java.util.logging.Logger, like so:


getLog().info("some message");

getLog().warning("some warning");

etc.


This is all part of the standard J2SE logging package.

Dan


"Baseer Khan \(bakhan\)" <ba...@cisco.com> wrote on 02/21/2007 02:44:12 
PM:

> I guess if you want to see stacktrace from *Your* code into muse.log
> file you have to use muse.utl.Logger class. You can use your own logger
> (log4j or other) and dump the trace in a separate log file.
> 
> --Baseer
> 
> 
> -----Original Message-----
> From: Jeff Hu (jefhu) 
> Sent: Wednesday, February 21, 2007 11:34 AM
> To: muse-user@ws.apache.org
> Subject: How to configure MUSE logging to spill out server side error
> stacktrace
> 
> Can anyone enlighten me how to configure MUSE log to spill out server
> side error stack trace.
> 
> I notice the muse.xml has
> <router>
> 
> <java-router-class>org.apache.muse.core.routing.SimpleResourceRouter</ja
> va-router-class>
>         <logging>
>             <log-file>log/muse.log</log-file>
>             <log-level>FINE</log-level> 
>              <!-- I set to 'ALL' according to
 
http://ws.apache.
> org/muse/docs/2.0.0/specs/muse-descriptor.xsd -->
>         </logging>
> ....
> 
> For example, I run a client program and have client side stacktrace as
> following. However, the muse.log in server side and web-app server
> console contain not error information. It is very hard to debug.  Many
> thanks!
> 
> 
> 
> org.apache.muse.ws.addressing.soap.SoapFault:
> http://localhost:8080/1WSDMGateway/services/QueryServicePort
>    at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
> t.java:279)
>    at
> com.cisco.nm.cmp.nbi.wsdm.client.core.NotificationProducerClient.invoke(
> NotificationProducerClient.java:119)
>    at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
> t.java:235)
>    at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
> t.java:213)
>    at
> com.cisco.nm.cmp.nbi.wsdm.client.proxy.queryservice.QueryServicePortProx
> y.get(QueryServicePortProxy.java:35)
>    at
> com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
> STest.run(QueryServicesGetAxis2WSSTest.java:63)
>    at
> com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
> STest.main(QueryServicesGetAxis2WSSTest.java:39)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: How to configure MUSE logging to spill out server side error stacktrace

Posted by "Baseer Khan (bakhan)" <ba...@cisco.com>.
I guess if you want to see stacktrace from *Your* code into muse.log
file you have to use muse.utl.Logger class. You can use your own logger
(log4j or other) and dump the trace in a separate log file.

--Baseer
 

-----Original Message-----
From: Jeff Hu (jefhu) 
Sent: Wednesday, February 21, 2007 11:34 AM
To: muse-user@ws.apache.org
Subject: How to configure MUSE logging to spill out server side error
stacktrace

Can anyone enlighten me how to configure MUSE log to spill out server
side error stack trace.

I notice the muse.xml has
<router>
 
<java-router-class>org.apache.muse.core.routing.SimpleResourceRouter</ja
va-router-class>
        <logging>
            <log-file>log/muse.log</log-file>
            <log-level>FINE</log-level>  
             <!-- I set to 'ALL' according to
 
http://ws.apache.org/muse/docs/2.0.0/specs/muse-descriptor.xsd -->
        </logging>
....

For example, I run a client program and have client side stacktrace as
following. However, the muse.log in server side and web-app server
console contain not error information. It is very hard to debug.  Many
thanks!



org.apache.muse.ws.addressing.soap.SoapFault:
http://localhost:8080/1WSDMGateway/services/QueryServicePort
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:279)
	at
com.cisco.nm.cmp.nbi.wsdm.client.core.NotificationProducerClient.invoke(
NotificationProducerClient.java:119)
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:235)
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:213)
	at
com.cisco.nm.cmp.nbi.wsdm.client.proxy.queryservice.QueryServicePortProx
y.get(QueryServicePortProxy.java:35)
	at
com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
STest.run(QueryServicesGetAxis2WSSTest.java:63)
	at
com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
STest.main(QueryServicesGetAxis2WSSTest.java:39)

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

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


How to configure MUSE logging to spill out server side error stacktrace

Posted by "Jeff Hu (jefhu)" <je...@cisco.com>.
Can anyone enlighten me how to configure MUSE log to spill out server
side error stack trace.

I notice the muse.xml has 
<router>
 
<java-router-class>org.apache.muse.core.routing.SimpleResourceRouter</ja
va-router-class>
        <logging>
            <log-file>log/muse.log</log-file>
            <log-level>FINE</log-level>  
             <!-- I set to 'ALL' according to
 
http://ws.apache.org/muse/docs/2.0.0/specs/muse-descriptor.xsd -->
        </logging>
....

For example, I run a client program and have client side stacktrace as
following. However, the muse.log in server side and web-app server
console contain not error information. It is very hard to debug.  Many
thanks!



org.apache.muse.ws.addressing.soap.SoapFault:
http://localhost:8080/1WSDMGateway/services/QueryServicePort
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:279)
	at
com.cisco.nm.cmp.nbi.wsdm.client.core.NotificationProducerClient.invoke(
NotificationProducerClient.java:119)
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:235)
	at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClien
t.java:213)
	at
com.cisco.nm.cmp.nbi.wsdm.client.proxy.queryservice.QueryServicePortProx
y.get(QueryServicePortProxy.java:35)
	at
com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
STest.run(QueryServicesGetAxis2WSSTest.java:63)
	at
com.cisco.nm.cmp.nbi.wsdm.client.test.wsresource.QueryServicesGetAxis2WS
STest.main(QueryServicesGetAxis2WSSTest.java:39)

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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
just to clarify - you say you're deploying the wsn-consumer sample as-is 
(run 'ant' and copy over WAR) and it's not receiving the notifications? 
are you deploying it in the same container as the producer? if not, did 
you make sure to change the port number used in the consumer's URI (in the 
test client)?

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/21/2007 12:16:58 PM:

>  The example I thought worked didn't.  When I view the catalina.out
> file
> the wsn-consumer does not receive publish updates, it seems to
> subscribe correctly.  A JavaClassNotFound exception is thrown when
> trying to access ConsumerCapabilityImpl.class.  Everything seems to be
> deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 1:08 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> from within the NotificationMessageListener API, you'll get a 
> NotificationMessage object(s) representing the message. The 
> NotificationMessage will have getter methods for things like the
> producer 
> EPR, topic, etc. It also has the XML payload, which is custom to your 
> scenario. If you are using WSDM's WEF for formatting your events, you
> can 
> convert the payload XML into a ManagementEvent object like so:
> 
> public void process(NotificationMessage msg)
> {
>     WefFactory factory = new SimpleWefFactory();
> 
>     Iterator i = msg.getMessageContent().iterator();
> 
>     while (i.hasNext())
>     {
>         Element eventXML = (Element)i.next();
>         ManagementEvent event = factory.createEvent(eventXML);
>         // use getters to process event data
>     }
> }
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
> PM:
> 
> > No I do not want to write any HTTP server myself.  I want to take the
> > received SOAP messages from the consumer web service convert those
> into
> > Java Objects and forward them to my non webapp.  I can just create a
> > socket and send it that way I was just hoping that maybe I could just
> > use the MUSE API to do this since I can set up services from a non
> > webapp. 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 12:57 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I don't see how you would receive the messages on a non-web app...
> > unless 
> > you're writing your own little server and parsing the HTTP yourself.
> If
> > 
> > that's the case, I'd advise you to rethink it - you can either use
> OSGi
> > 
> > for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to
> > host 
> > the app (~5MB). Writing a decent HTTP server for one known client is
> > easy 
> > - writing a robust HTTP server is quite hard.
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53
> > PM:
> > 
> > > See below <DAC>
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > > Sent: Wednesday, February 14, 2007 12:31 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > The WsnTestClient should not be necessary in your real world
> scenario
> > -
> > > 
> > > it's just a driver to get the sample going. In your situation, you
> > can 
> > > just have the consumer resource subscribe to the producer itself -
> > the 
> > > code to do that would be very similar to what's in WsnTestClient
> (the
> > > use 
> > > of NotificationProducerClient), but you would package it in your
> > > consumer 
> > > resource instead of a command line app. You could perform the
> > > subscription 
> > > work in the initialize() method of one of your capabilities on the 
> > > consumer side.
> > > 
> > > Alternatively, in a more complex scenario, you might have an 
> > > "orchestrator" service that is subscribing all of the consumers to
> > the 
> > > events they need to handle. This scenario would be a lot like the
> > > sample 
> > > in that a third service would call subscribe() and tell the
> producer
> > > which 
> > > consumer resource to send the messages to. This is just like the 
> > > WsnTestClient app, except it would probably be a web service as
> well.
> > > 
> > > If you want to forward messages received by one consumer to another
> 
> > > consumer(s), like a broker would, you just have to use the 
> > > NotificationMessageListener API - you can implement a listener that
> 
> > > listens for all notifications and then uses
> > NotificationConsumerClient
> > > to 
> > > forward the messages to other resources.
> > > 
> > > <DAC> Can I have a broker service that would subscribe (NON
> > > WEB)consumer's. 
> > >   I want to have a consumer web service that just forwards messages
> > > from the webapp 
> > >  (broker) to nonwebapp (consumers).  Can I do this with the
> > > NotificationMessageListener and
> > > NotificationConsumerClient or do I need to use another means to
> > forward
> > > messages from a webapp to a
> > > Non webapp.  I ask because I'm able to connect two webservices
> > together
> > > from a non webapp.  Thanks again for
> > > all you help. 
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
> 09:36:37
> > > AM:
> > > 
> > > > Ok thanks.  Let's say for instance that I have two different
> types
> > of
> > > > clients.  One type of clients that are within the same firewall
> as
> > my
> > > > web server and are on the same network.  The other is a client
> that
> > > is
> > > > outside the firewall and not on the same network.  I can see that
> > the
> > > > later would need a consumer web service running and the incoming
> > > > requests would have to be forwarded to the user of the consumer
> web
> > > > service. 
> > > > 
> > > > First question, when I use the API's to create the subscription
> > > between
> > > > the publisher and consumer are there methods I can call that
> would
> > > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > > message
> > > > or is this something I have to do manually i.e create a socket
> from
> > > the
> > > > consumer to the WsnTestClient or is this already built into
> > > MUSE/AXIS?
> > > > 
> > > > 
> > > > Second question, when I am within the same network is there a way
> > for
> > > > me to set up a publisher/consumer without creating a consumer web
> > > > service or is this not what is intended with MUSE and I would
> still
> > > > need a consumer web server and some mechanism to forward messages
> > > from
> > > > the consumer web service to the (WsnTestClient).
> > > > 
> > > > Thanks again for all your answers and help!!
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Each resource must be a web service resource with a URI address
> > that
> > > > identifies its location.  So your consumer cannot be a java
> program
> > > > sitting outside of a webserver environment.  What you can do is
> > have
> > > a
> > > > consumer resource which routes calls to your java program.
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Makes sense.  I would like to set up a publisher / consumer
> service
> > > > were
> > > > the publish is a web service and the consumer is java program (no
> > > > web server running).  Is this possible? 
> > > > 
> > > > -----Original Message-----
> > > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm not really sure, if I understand your initial question, so
> I'll
> > > try
> > > > to explain it based on the assumption, that it's unclear why you
> > need
> > > > to
> > > > deploy 2 servlets to make the sample work.
> > > > 
> > > > 
> > > > For the producer/consumer example, they're mimicking a service
> > > > (producer) on a separate machine, which will inform the client
> > > machine
> > > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > > The WsnTestClient-file is just setting up the subscription
> between
> > > the
> > > > producer/consumer via the SubscriptionManager.
> > > > The actual consumer is the
> > ConsumerCapability/ConsumerCapabilityImpl.
> > > > 
> > > > As for the error you're getting, I'm not sure if you deployed
> both
> > > the
> > > > producer/consumer wars given the earlier assumption I made. But
> it
> > > > seems
> > > > that your WsnTestClient is trying to subscribe to your producer
> > > service
> > > > and getting denied as the service is not available at the
> specified
> > > > location (according to the WsnTestClient.java property and the
> > > involved
> > > > WSDL-files).
> > > > 
> > > > I don't have a clue yet about the error from you Tomcat log
> files.
> > > > 
> > > > 
> > > > Not really sure if this made any sense.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: 07 February 2007 13:43
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > I'm using the official release and have performed step 2 and here
> > are
> > > > the errors I'm getting.  Also could someone explain to me why I
> > need
> > > to
> > > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > > WsnTestClient should be the "Consumer". 
> > > > 
> > > > In my tomcat5 log file: 
> > > > 
> > > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
> not
> > > > found
> > > >    at
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > > .java:46)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > > ava:32)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > > tIsolationLayer.java:183)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > > iServlet.java:36)
> > > >    at
> > > >
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > > 50)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > > >    at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > > ationFilterChain.java:237)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > > terChain.java:157)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > > ve.java:214)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > > ntextValve.java:198)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > > ve.java:152)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > > a:137)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > > a:118)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:102)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > > .java:109)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > > ontext.java:104)
> > > >    at
> > > >
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > > 520)
> > > >    at
> > > >
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > > 99)
> > > >    at
> > > >
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > > Connection(Http11Protocol.java:705)
> > > >    at
> > > >
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > > 77)
> > > >    at
> > > >
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > > l.java:683)
> > > >    at java.lang.Thread.run(Thread.java:570)
> > > > 
> > > > 
> > > > Output from WsnTestClient:
> > > > 
> > > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > > 
> > > > <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://128.29.35.11:80
> > > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > > f-066b-ff60b581802c</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:A
> > > > ddress>
> > > >         </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://128.29.35.11:80
> > > > 80/wsn-consumer/services/consumer</wsa:Address>
> > > >             </wsnt:ConsumerReference>
> > > >         </wsnt:Subscribe>
> > > >     </soap:Body>
> > > > </soap:Envelope>
> > > > 
> > > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
> HTTP
> > > > response code: 500 for URL:
> > > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > > >         at
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:279)
> > > >         at
> > > >
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > > nt.java:235)
> > > >         at
> > > >
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > > ribe(NotificationProducerClient.java:96)
> > > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > > Source)
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Thank you for your support. I downloaded the nightly build and
> ran
> > > > update_install.bat. The wsn-producer/consumer example worked at
> > once.
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > > Sent: Mon 2/5/2007 3:18 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > Good catch on the port number - make sure the port you're using
> for
> > > > Tomcat uses the one that's specified in the WsnTestClient.java
> > > client.
> > > > The port is part of the wsa:Address in the producer and consumer
> > > EPRs,
> > > > so if it's wrong, you need to change it (you can do this on the
> > > command
> > > > line or by
> > > > 
> > > > modifying the test client code).
> > > > 
> > > > I'd also advise against building the source and trying to add the
> > > > latest
> > > > bits incrementally - if you want to do a full build, follow the
> > > > instructions on:
> > > > 
> > > >         http://ws.apache.org/muse/source-code.html
> > > > 
> > > > If you want the latest nightly build, you can get it here:
> > > > 
> > > >         http://ws.apache.org/muse/nightly/latest
> > > > 
> > > > Of course, except for the "step 2" that was added, neither of
> those
> > > > samples has changed in quite a while. You should be able to get
> > them
> > > > working by taking the official release and performing step 2 -
> let
> > me
> > > > know if the port number issue was indeed the problem.
> > > > 
> > > > Dan
> > > > 
> > > > 
> > > > 
> > > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > > 
> > > > > I'm not sure why you would want to make the whole thing that 
> > > > > complicated.
> > > > > I seem to have no problem getting the producer/consumer example
> > to
> > > > work
> > > > > with these simple steps.
> > > > > 
> > > > > 1) Download the nightly build (with the latest bug fixes) from 
> > > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > > 
> > > > > 2) Run update-install
> > > > > 
> > > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > > (wsn-producer)
> > > > > and the WsnTestClient portType properties (producer_port &
> > > > > consumer_port) are pointing to the right serviceport (according
> > to
> > > > your
> > > > > Tomcat specs).
> > > > > 
> > > > > 4) Use the ant build file to build both project-wars
> > > > > 
> > > > > 5) Deploy and enjoy
> > > > > 
> > > > > But that said did you have a look in the wsn-consumer
> > > > WsnTestClient.java
> > > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> > match
> > > > your
> > > > > Tomcat setup? To me it sounds like it's looking for a consumer
> > > that's
> > > > 
> > > > > not listening on the given port. I could be wrong.
> > > > > 
> > > > > I know the portTypes have been a cause of some of my problems
> in
> > > the 
> > > > > past.
> > > > > 
> > > > > /Lenni
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: 05 February 2007 12:59
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > If you follow the instructions for "Eclipse Development"
> > described
> > > > here 
> > > > > 
> > > > > http://ws.apache.org/muse/source-code.html
> > > > > 
> > > > > you get a separate project in Eclipse for every muse jar-file.
> > You
> > > > can
> > > > > then export each project as a jar-file and replace the ones
> found
> > > in 
> > > > > your MUSE_HOME/modules subdirectories. This way you get the
> > latest 
> > > > > bugfixes and updates.
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > > Sent: Mon 2/5/2007 1:45 PM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: RE: wsn-producer/consumer example
> > > > > 
> > > > > You seemed to get farther than I did with the example.  I been
> > able
> > > > to
> > > > > find on the internet that you need to add (#2) below, but your
> > #3.
> > > > > Created new snapshot from SVN.  Could you explain? 
> > > > > 
> > > > > -----Original Message-----
> > > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > > To: muse-user@ws.apache.org
> > > > > Subject: wsn-producer/consumer example
> > > > > 
> > > > > I have tried to get the wsn-producer/consumer sample to work
> > > without 
> > > > > success. I have done the following:
> > > > > 
> > > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > > 
> > > > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > > > wsn-consumer muse.xml
> > > > > 
> > > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced
> > old
> > > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > > 
> > > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > > 
> > > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > > WsnTestClient 
> > > > > 
> > > > > I still get the following error:
> > > > > 
> > > > > INFO: [ID = 'LastPublishFailed'] The last notification
> published
> > > via 
> > > > > wsnt:Notify  failed to reach its destination. The consumer may
> be
> > 
> > > > > unavailable.
> > > > The
> > > > > original
> > > > > error was: null
> > > > > 2007-feb-05 08:17:37
> > > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > > run
> > > > > INFO: Waiting 10 seconds before sending message...
> > > > > 
> > > > > Any ideas?
> > > > > 
> > > > > /Mattias
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
 The example I thought worked didn't.  When I view the catalina.out
file
the wsn-consumer does not receive publish updates, it seems to
subscribe correctly.  A JavaClassNotFound exception is thrown when
trying to access ConsumerCapabilityImpl.class.  Everything seems to be
deployed correctly.  I'm using Tomcat5.  Anyone have any ideas?

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 14, 2007 1:08 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

from within the NotificationMessageListener API, you'll get a 
NotificationMessage object(s) representing the message. The 
NotificationMessage will have getter methods for things like the
producer 
EPR, topic, etc. It also has the XML payload, which is custom to your 
scenario. If you are using WSDM's WEF for formatting your events, you
can 
convert the payload XML into a ManagementEvent object like so:

public void process(NotificationMessage msg)
{
    WefFactory factory = new SimpleWefFactory();

    Iterator i = msg.getMessageContent().iterator();

    while (i.hasNext())
    {
        Element eventXML = (Element)i.next();
        ManagementEvent event = factory.createEvent(eventXML);
        // use getters to process event data
    }
}



"Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44
PM:

> No I do not want to write any HTTP server myself.  I want to take the
> received SOAP messages from the consumer web service convert those
into
> Java Objects and forward them to my non webapp.  I can just create a
> socket and send it that way I was just hoping that maybe I could just
> use the MUSE API to do this since I can set up services from a non
> webapp. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 12:57 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I don't see how you would receive the messages on a non-web app...
> unless 
> you're writing your own little server and parsing the HTTP yourself.
If
> 
> that's the case, I'd advise you to rethink it - you can either use
OSGi
> 
> for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to
> host 
> the app (~5MB). Writing a decent HTTP server for one known client is
> easy 
> - writing a robust HTTP server is quite hard.
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53
> PM:
> 
> > See below <DAC>
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 12:31 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > The WsnTestClient should not be necessary in your real world
scenario
> -
> > 
> > it's just a driver to get the sample going. In your situation, you
> can 
> > just have the consumer resource subscribe to the producer itself -
> the 
> > code to do that would be very similar to what's in WsnTestClient
(the
> > use 
> > of NotificationProducerClient), but you would package it in your
> > consumer 
> > resource instead of a command line app. You could perform the
> > subscription 
> > work in the initialize() method of one of your capabilities on the 
> > consumer side.
> > 
> > Alternatively, in a more complex scenario, you might have an 
> > "orchestrator" service that is subscribing all of the consumers to
> the 
> > events they need to handle. This scenario would be a lot like the
> > sample 
> > in that a third service would call subscribe() and tell the
producer
> > which 
> > consumer resource to send the messages to. This is just like the 
> > WsnTestClient app, except it would probably be a web service as
well.
> > 
> > If you want to forward messages received by one consumer to another

> > consumer(s), like a broker would, you just have to use the 
> > NotificationMessageListener API - you can implement a listener that

> > listens for all notifications and then uses
> NotificationConsumerClient
> > to 
> > forward the messages to other resources.
> > 
> > <DAC> Can I have a broker service that would subscribe (NON
> > WEB)consumer's. 
> >   I want to have a consumer web service that just forwards messages
> > from the webapp 
> >  (broker) to nonwebapp (consumers).  Can I do this with the
> > NotificationMessageListener and
> > NotificationConsumerClient or do I need to use another means to
> forward
> > messages from a webapp to a
> > Non webapp.  I ask because I'm able to connect two webservices
> together
> > from a non webapp.  Thanks again for
> > all you help. 
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007
09:36:37
> > AM:
> > 
> > > Ok thanks.  Let's say for instance that I have two different
types
> of
> > > clients.  One type of clients that are within the same firewall
as
> my
> > > web server and are on the same network.  The other is a client
that
> > is
> > > outside the firewall and not on the same network.  I can see that
> the
> > > later would need a consumer web service running and the incoming
> > > requests would have to be forwarded to the user of the consumer
web
> > > service. 
> > > 
> > > First question, when I use the API's to create the subscription
> > between
> > > the publisher and consumer are there methods I can call that
would
> > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > message
> > > or is this something I have to do manually i.e create a socket
from
> > the
> > > consumer to the WsnTestClient or is this already built into
> > MUSE/AXIS?
> > > 
> > > 
> > > Second question, when I am within the same network is there a way
> for
> > > me to set up a publisher/consumer without creating a consumer web
> > > service or is this not what is intended with MUSE and I would
still
> > > need a consumer web server and some mechanism to forward messages
> > from
> > > the consumer web service to the (WsnTestClient).
> > > 
> > > Thanks again for all your answers and help!!
> > > 
> > > 
> > > -----Original Message-----
> > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Each resource must be a web service resource with a URI address
> that
> > > identifies its location.  So your consumer cannot be a java
program
> > > sitting outside of a webserver environment.  What you can do is
> have
> > a
> > > consumer resource which routes calls to your java program.
> > > 
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Makes sense.  I would like to set up a publisher / consumer
service
> > > were
> > > the publish is a web service and the consumer is java program (no
> > > web server running).  Is this possible? 
> > > 
> > > -----Original Message-----
> > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I'm not really sure, if I understand your initial question, so
I'll
> > try
> > > to explain it based on the assumption, that it's unclear why you
> need
> > > to
> > > deploy 2 servlets to make the sample work.
> > > 
> > > 
> > > For the producer/consumer example, they're mimicking a service
> > > (producer) on a separate machine, which will inform the client
> > machine
> > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > The WsnTestClient-file is just setting up the subscription
between
> > the
> > > producer/consumer via the SubscriptionManager.
> > > The actual consumer is the
> ConsumerCapability/ConsumerCapabilityImpl.
> > > 
> > > As for the error you're getting, I'm not sure if you deployed
both
> > the
> > > producer/consumer wars given the earlier assumption I made. But
it
> > > seems
> > > that your WsnTestClient is trying to subscribe to your producer
> > service
> > > and getting denied as the service is not available at the
specified
> > > location (according to the WsnTestClient.java property and the
> > involved
> > > WSDL-files).
> > > 
> > > I don't have a clue yet about the error from you Tomcat log
files.
> > > 
> > > 
> > > Not really sure if this made any sense.
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > Sent: 07 February 2007 13:43
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I'm using the official release and have performed step 2 and here
> are
> > > the errors I'm getting.  Also could someone explain to me why I
> need
> > to
> > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > WsnTestClient should be the "Consumer". 
> > > 
> > > In my tomcat5 log file: 
> > > 
> > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
not
> > > found
> > >    at
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > .java:46)
> > >    at
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > >    at
> > >
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > ava:32)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > tIsolationLayer.java:183)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > iServlet.java:36)
> > >    at
> > >
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > 50)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > >    at
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > ationFilterChain.java:237)
> > >    at
> > >
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > terChain.java:157)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > ve.java:214)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > ntextValve.java:198)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > ve.java:152)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > a:137)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > a:118)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:102)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > .java:109)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >    at
> > >
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > 99)
> > >    at
> > >
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > Connection(Http11Protocol.java:705)
> > >    at
> > >
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > 77)
> > >    at
> > >
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > l.java:683)
> > >    at java.lang.Thread.run(Thread.java:570)
> > > 
> > > 
> > > Output from WsnTestClient:
> > > 
> > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > 
> > > <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://128.29.35.11:80
> > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > f-066b-ff60b581802c</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:A
> > > ddress>
> > >         </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://128.29.35.11:80
> > > 80/wsn-consumer/services/consumer</wsa:Address>
> > >             </wsnt:ConsumerReference>
> > >         </wsnt:Subscribe>
> > >     </soap:Body>
> > > </soap:Envelope>
> > > 
> > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned
HTTP
> > > response code: 500 for URL:
> > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > >         at
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > nt.java:279)
> > >         at
> > >
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > nt.java:235)
> > >         at
> > >
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > ribe(NotificationProducerClient.java:96)
> > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > Source)
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Thank you for your support. I downloaded the nightly build and
ran
> > > update_install.bat. The wsn-producer/consumer example worked at
> once.
> > > 
> > > /Mattias
> > > 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > Sent: Mon 2/5/2007 3:18 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Good catch on the port number - make sure the port you're using
for
> > > Tomcat uses the one that's specified in the WsnTestClient.java
> > client.
> > > The port is part of the wsa:Address in the producer and consumer
> > EPRs,
> > > so if it's wrong, you need to change it (you can do this on the
> > command
> > > line or by
> > > 
> > > modifying the test client code).
> > > 
> > > I'd also advise against building the source and trying to add the
> > > latest
> > > bits incrementally - if you want to do a full build, follow the
> > > instructions on:
> > > 
> > >         http://ws.apache.org/muse/source-code.html
> > > 
> > > If you want the latest nightly build, you can get it here:
> > > 
> > >         http://ws.apache.org/muse/nightly/latest
> > > 
> > > Of course, except for the "step 2" that was added, neither of
those
> > > samples has changed in quite a while. You should be able to get
> them
> > > working by taking the official release and performing step 2 -
let
> me
> > > know if the port number issue was indeed the problem.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > 
> > > > I'm not sure why you would want to make the whole thing that 
> > > > complicated.
> > > > I seem to have no problem getting the producer/consumer example
> to
> > > work
> > > > with these simple steps.
> > > > 
> > > > 1) Download the nightly build (with the latest bug fixes) from 
> > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > 
> > > > 2) Run update-install
> > > > 
> > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > (wsn-producer)
> > > > and the WsnTestClient portType properties (producer_port &
> > > > consumer_port) are pointing to the right serviceport (according
> to
> > > your
> > > > Tomcat specs).
> > > > 
> > > > 4) Use the ant build file to build both project-wars
> > > > 
> > > > 5) Deploy and enjoy
> > > > 
> > > > But that said did you have a look in the wsn-consumer
> > > WsnTestClient.java
> > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> match
> > > your
> > > > Tomcat setup? To me it sounds like it's looking for a consumer
> > that's
> > > 
> > > > not listening on the given port. I could be wrong.
> > > > 
> > > > I know the portTypes have been a cause of some of my problems
in
> > the 
> > > > past.
> > > > 
> > > > /Lenni
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: 05 February 2007 12:59
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > If you follow the instructions for "Eclipse Development"
> described
> > > here 
> > > > 
> > > > http://ws.apache.org/muse/source-code.html
> > > > 
> > > > you get a separate project in Eclipse for every muse jar-file.
> You
> > > can
> > > > then export each project as a jar-file and replace the ones
found
> > in 
> > > > your MUSE_HOME/modules subdirectories. This way you get the
> latest 
> > > > bugfixes and updates.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: Mon 2/5/2007 1:45 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > You seemed to get farther than I did with the example.  I been
> able
> > > to
> > > > find on the internet that you need to add (#2) below, but your
> #3.
> > > > Created new snapshot from SVN.  Could you explain? 
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: wsn-producer/consumer example
> > > > 
> > > > I have tried to get the wsn-producer/consumer sample to work
> > without 
> > > > success. I have done the following:
> > > > 
> > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > 
> > > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > > wsn-consumer muse.xml
> > > > 
> > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced
> old
> > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > 
> > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > 
> > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > WsnTestClient 
> > > > 
> > > > I still get the following error:
> > > > 
> > > > INFO: [ID = 'LastPublishFailed'] The last notification
published
> > via 
> > > > wsnt:Notify  failed to reach its destination. The consumer may
be
> 
> > > > unavailable.
> > > The
> > > > original
> > > > error was: null
> > > > 2007-feb-05 08:17:37
> > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > run
> > > > INFO: Waiting 10 seconds before sending message...
> > > > 
> > > > Any ideas?
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


Re: serviceGroup implementation

Posted by Daniel Jemiolo <da...@us.ibm.com>.
can you send the stack trace that is in the muse.log file? I'm not sure if 
the problem is the RMD or the WSDL.

Dan



Radhika Basavaraju/San Jose/Contr/IBM@IBMUS wrote on 02/14/2007 05:32:34 
PM:

> 
> 
> 
> 
> Hi,
> I am trying to implement the servicegroup/entry in a wsResource.
> 
> 1. I have added definitions of serviceGroup and serviceGroupEntry to
> muse.xml
> 2. Added WS-ServiceGroup-1_2.wsdl, xsd, WS-ServiceGroupEntry-1_2.wsdl 
and
> others to web-inf/classes/wsdl
> 3. Also created the rmd file along with the wsdl of the wsdm resource.
> 
> Now when I run the client, I get the error:
> 
> <soap:Reason>
>                 <soap:Text>[ID = 'PropertyNotInSchema'] There is no
> property nam
> ed '{http://docs.oasis-open.org/wsrf/sg-2}Entry' defined in the schema. 
A
> proper
> ty should not have any operations or metadata applied to it if it is not 
in
> the
> WS-RP document.</soap:Text>
>             </soap:Reason>
> 
> The wsrf example runs fine.
> 
> Could you advise?
> 
> Thanks,
> Radhika.
> 
> 
> 
> 


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


serviceGroup implementation

Posted by Radhika Basavaraju <ra...@us.ibm.com>.



Hi,
I am trying to implement the servicegroup/entry in a wsResource.

1. I have added definitions of serviceGroup and serviceGroupEntry to
muse.xml
2. Added WS-ServiceGroup-1_2.wsdl, xsd, WS-ServiceGroupEntry-1_2.wsdl and
others to web-inf/classes/wsdl
3. Also created the rmd file along with the wsdl of the wsdm resource.

Now when I run the client, I get the error:

<soap:Reason>
                <soap:Text>[ID = 'PropertyNotInSchema'] There is no
property nam
ed '{http://docs.oasis-open.org/wsrf/sg-2}Entry' defined in the schema. A
proper
ty should not have any operations or metadata applied to it if it is not in
the
WS-RP document.</soap:Text>
            </soap:Reason>

The wsrf example runs fine.

Could you advise?

Thanks,
Radhika.





RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
from within the NotificationMessageListener API, you'll get a 
NotificationMessage object(s) representing the message. The 
NotificationMessage will have getter methods for things like the producer 
EPR, topic, etc. It also has the XML payload, which is custom to your 
scenario. If you are using WSDM's WEF for formatting your events, you can 
convert the payload XML into a ManagementEvent object like so:

public void process(NotificationMessage msg)
{
    WefFactory factory = new SimpleWefFactory();

    Iterator i = msg.getMessageContent().iterator();

    while (i.hasNext())
    {
        Element eventXML = (Element)i.next();
        ManagementEvent event = factory.createEvent(eventXML);
        // use getters to process event data
    }
}



"Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:59:44 PM:

> No I do not want to write any HTTP server myself.  I want to take the
> received SOAP messages from the consumer web service convert those into
> Java Objects and forward them to my non webapp.  I can just create a
> socket and send it that way I was just hoping that maybe I could just
> use the MUSE API to do this since I can set up services from a non
> webapp. 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 12:57 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I don't see how you would receive the messages on a non-web app...
> unless 
> you're writing your own little server and parsing the HTTP yourself. If
> 
> that's the case, I'd advise you to rethink it - you can either use OSGi
> 
> for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to
> host 
> the app (~5MB). Writing a decent HTTP server for one known client is
> easy 
> - writing a robust HTTP server is quite hard.
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53
> PM:
> 
> > See below <DAC>
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> > Sent: Wednesday, February 14, 2007 12:31 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > The WsnTestClient should not be necessary in your real world scenario
> -
> > 
> > it's just a driver to get the sample going. In your situation, you
> can 
> > just have the consumer resource subscribe to the producer itself -
> the 
> > code to do that would be very similar to what's in WsnTestClient (the
> > use 
> > of NotificationProducerClient), but you would package it in your
> > consumer 
> > resource instead of a command line app. You could perform the
> > subscription 
> > work in the initialize() method of one of your capabilities on the 
> > consumer side.
> > 
> > Alternatively, in a more complex scenario, you might have an 
> > "orchestrator" service that is subscribing all of the consumers to
> the 
> > events they need to handle. This scenario would be a lot like the
> > sample 
> > in that a third service would call subscribe() and tell the producer
> > which 
> > consumer resource to send the messages to. This is just like the 
> > WsnTestClient app, except it would probably be a web service as well.
> > 
> > If you want to forward messages received by one consumer to another 
> > consumer(s), like a broker would, you just have to use the 
> > NotificationMessageListener API - you can implement a listener that 
> > listens for all notifications and then uses
> NotificationConsumerClient
> > to 
> > forward the messages to other resources.
> > 
> > <DAC> Can I have a broker service that would subscribe (NON
> > WEB)consumer's. 
> >   I want to have a consumer web service that just forwards messages
> > from the webapp 
> >  (broker) to nonwebapp (consumers).  Can I do this with the
> > NotificationMessageListener and
> > NotificationConsumerClient or do I need to use another means to
> forward
> > messages from a webapp to a
> > Non webapp.  I ask because I'm able to connect two webservices
> together
> > from a non webapp.  Thanks again for
> > all you help. 
> > 
> > Dan
> > 
> > 
> > 
> > "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37
> > AM:
> > 
> > > Ok thanks.  Let's say for instance that I have two different types
> of
> > > clients.  One type of clients that are within the same firewall as
> my
> > > web server and are on the same network.  The other is a client that
> > is
> > > outside the firewall and not on the same network.  I can see that
> the
> > > later would need a consumer web service running and the incoming
> > > requests would have to be forwarded to the user of the consumer web
> > > service. 
> > > 
> > > First question, when I use the API's to create the subscription
> > between
> > > the publisher and consumer are there methods I can call that would
> > > subscribe from the consumer to the (WsnTestClient) a forwarded
> > message
> > > or is this something I have to do manually i.e create a socket from
> > the
> > > consumer to the WsnTestClient or is this already built into
> > MUSE/AXIS?
> > > 
> > > 
> > > Second question, when I am within the same network is there a way
> for
> > > me to set up a publisher/consumer without creating a consumer web
> > > service or is this not what is intended with MUSE and I would still
> > > need a consumer web server and some mechanism to forward messages
> > from
> > > the consumer web service to the (WsnTestClient).
> > > 
> > > Thanks again for all your answers and help!!
> > > 
> > > 
> > > -----Original Message-----
> > > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > > Sent: Wednesday, February 07, 2007 1:04 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Each resource must be a web service resource with a URI address
> that
> > > identifies its location.  So your consumer cannot be a java program
> > > sitting outside of a webserver environment.  What you can do is
> have
> > a
> > > consumer resource which routes calls to your java program.
> > > 
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > > Sent: Wednesday, February 07, 2007 7:21 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Makes sense.  I would like to set up a publisher / consumer service
> > > were
> > > the publish is a web service and the consumer is java program (no
> > > web server running).  Is this possible? 
> > > 
> > > -----Original Message-----
> > > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > > Sent: Wednesday, February 07, 2007 10:17 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I'm not really sure, if I understand your initial question, so I'll
> > try
> > > to explain it based on the assumption, that it's unclear why you
> need
> > > to
> > > deploy 2 servlets to make the sample work.
> > > 
> > > 
> > > For the producer/consumer example, they're mimicking a service
> > > (producer) on a separate machine, which will inform the client
> > machine
> > > (consumer) about changes in its state via a WSDM SOAP message. 
> > > The WsnTestClient-file is just setting up the subscription between
> > the
> > > producer/consumer via the SubscriptionManager.
> > > The actual consumer is the
> ConsumerCapability/ConsumerCapabilityImpl.
> > > 
> > > As for the error you're getting, I'm not sure if you deployed both
> > the
> > > producer/consumer wars given the earlier assumption I made. But it
> > > seems
> > > that your WsnTestClient is trying to subscribe to your producer
> > service
> > > and getting denied as the service is not available at the specified
> > > location (according to the WsnTestClient.java property and the
> > involved
> > > WSDL-files).
> > > 
> > > I don't have a clue yet about the error from you Tomcat log files.
> > > 
> > > 
> > > Not really sure if this made any sense.
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > Sent: 07 February 2007 13:43
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > I'm using the official release and have performed step 2 and here
> are
> > > the errors I'm getting.  Also could someone explain to me why I
> need
> > to
> > > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > > WsnTestClient should be the "Consumer". 
> > > 
> > > In my tomcat5 log file: 
> > > 
> > >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > > Servlet.service() for servlet ApacheMuseServlet threw exception
> > > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> > > found
> > >    at
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > > .java:46)
> > >    at
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> > >    at
> > >
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > > ava:32)
> > >    at
> > >
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > > tIsolationLayer.java:183)
> > >    at
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > > iServlet.java:36)
> > >    at
> > >
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > > 50)
> > >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> > >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> > >    at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > > ationFilterChain.java:237)
> > >    at
> > >
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > > terChain.java:157)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > > ve.java:214)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > > ntextValve.java:198)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > > ve.java:152)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > > a:137)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > > a:118)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:102)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > > .java:109)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > > ontext.java:104)
> > >    at
> > >
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > > 520)
> > >    at
> > >
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> > >    at
> > >
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > >    at
> > >
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > > 99)
> > >    at
> > >
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > > Connection(Http11Protocol.java:705)
> > >    at
> > >
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > > 77)
> > >    at
> > >
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > > l.java:683)
> > >    at java.lang.Thread.run(Thread.java:570)
> > > 
> > > 
> > > Output from WsnTestClient:
> > > 
> > > CLIENT TRACE] SOAP envelope contents (outgoing):
> > > 
> > > <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://128.29.35.11:80
> > > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > > f-066b-ff60b581802c</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:A
> > > ddress>
> > >         </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://128.29.35.11:80
> > > 80/wsn-consumer/services/consumer</wsa:Address>
> > >             </wsnt:ConsumerReference>
> > >         </wsnt:Subscribe>
> > >     </soap:Body>
> > > </soap:Envelope>
> > > 
> > > org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> > > response code: 500 for URL:
> > > http://128.29.35.11:8080/wsn-producer/services/WsResource
> > >         at
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > nt.java:279)
> > >         at
> > >
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > > nt.java:235)
> > >         at
> > >
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > > ribe(NotificationProducerClient.java:96)
> > >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> > Source)
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: Tuesday, February 06, 2007 4:14 AM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Thank you for your support. I downloaded the nightly build and ran
> > > update_install.bat. The wsn-producer/consumer example worked at
> once.
> > > 
> > > /Mattias
> > > 
> > > 
> > > -----Original Message-----
> > > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > > Sent: Mon 2/5/2007 3:18 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > Good catch on the port number - make sure the port you're using for
> > > Tomcat uses the one that's specified in the WsnTestClient.java
> > client.
> > > The port is part of the wsa:Address in the producer and consumer
> > EPRs,
> > > so if it's wrong, you need to change it (you can do this on the
> > command
> > > line or by
> > > 
> > > modifying the test client code).
> > > 
> > > I'd also advise against building the source and trying to add the
> > > latest
> > > bits incrementally - if you want to do a full build, follow the
> > > instructions on:
> > > 
> > >         http://ws.apache.org/muse/source-code.html
> > > 
> > > If you want the latest nightly build, you can get it here:
> > > 
> > >         http://ws.apache.org/muse/nightly/latest
> > > 
> > > Of course, except for the "step 2" that was added, neither of those
> > > samples has changed in quite a while. You should be able to get
> them
> > > working by taking the official release and performing step 2 - let
> me
> > > know if the port number issue was indeed the problem.
> > > 
> > > Dan
> > > 
> > > 
> > > 
> > > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > > 
> > > > I'm not sure why you would want to make the whole thing that 
> > > > complicated.
> > > > I seem to have no problem getting the producer/consumer example
> to
> > > work
> > > > with these simple steps.
> > > > 
> > > > 1) Download the nightly build (with the latest bug fixes) from 
> > > > http://ws.apache.org/muse/nightly/latest/bin/
> > > > 
> > > > 2) Run update-install
> > > > 
> > > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > > (wsn-producer)
> > > > and the WsnTestClient portType properties (producer_port &
> > > > consumer_port) are pointing to the right serviceport (according
> to
> > > your
> > > > Tomcat specs).
> > > > 
> > > > 4) Use the ant build file to build both project-wars
> > > > 
> > > > 5) Deploy and enjoy
> > > > 
> > > > But that said did you have a look in the wsn-consumer
> > > WsnTestClient.java
> > > > and the wsn-producer WsREsource.wsdl to see if the portTypes
> match
> > > your
> > > > Tomcat setup? To me it sounds like it's looking for a consumer
> > that's
> > > 
> > > > not listening on the given port. I could be wrong.
> > > > 
> > > > I know the portTypes have been a cause of some of my problems in
> > the 
> > > > past.
> > > > 
> > > > /Lenni
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: 05 February 2007 12:59
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > If you follow the instructions for "Eclipse Development"
> described
> > > here 
> > > > 
> > > > http://ws.apache.org/muse/source-code.html
> > > > 
> > > > you get a separate project in Eclipse for every muse jar-file.
> You
> > > can
> > > > then export each project as a jar-file and replace the ones found
> > in 
> > > > your MUSE_HOME/modules subdirectories. This way you get the
> latest 
> > > > bugfixes and updates.
> > > > 
> > > > -----Original Message-----
> > > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > > Sent: Mon 2/5/2007 1:45 PM
> > > > To: muse-user@ws.apache.org
> > > > Subject: RE: wsn-producer/consumer example
> > > > 
> > > > You seemed to get farther than I did with the example.  I been
> able
> > > to
> > > > find on the internet that you need to add (#2) below, but your
> #3.
> > > > Created new snapshot from SVN.  Could you explain? 
> > > > 
> > > > -----Original Message-----
> > > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > > Sent: Monday, February 05, 2007 2:40 AM
> > > > To: muse-user@ws.apache.org
> > > > Subject: wsn-producer/consumer example
> > > > 
> > > > I have tried to get the wsn-producer/consumer sample to work
> > without 
> > > > success. I have done the following:
> > > > 
> > > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > > 
> > > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > > wsn-consumer muse.xml
> > > > 
> > > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced
> old
> > > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > > 
> > > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > > 
> > > > 5. Deploy wars on Tomcat without any error messages. Run
> > > WsnTestClient 
> > > > 
> > > > I still get the following error:
> > > > 
> > > > INFO: [ID = 'LastPublishFailed'] The last notification published
> > via 
> > > > wsnt:Notify  failed to reach its destination. The consumer may be
> 
> > > > unavailable.
> > > The
> > > > original
> > > > error was: null
> > > > 2007-feb-05 08:17:37
> > org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > > run
> > > > INFO: Waiting 10 seconds before sending message...
> > > > 
> > > > Any ideas?
> > > > 
> > > > /Mattias
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > > 
> > > > 
> > > > 
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Muse's data transport is done thru HTTP.  So a non-web app can send data
to Muse as long as it has APIs for sending over HTTP.  But, it won't
work in the opposite way because Muse (or any other normal web app) can
only send back data if your app has a URL and can receive data over
HTTP.

What you will have to do is add a consumer resource to Muse.  Then
attach a capability class to that resource, and add your code in there
to forward the data to your non-web app in whatever manner you choose,
if not over HTTP.  In order to forward Java Objects, you most likely
will have to serialize them from the server, and deserialize on the
client.  By default, Muse can serialize to XML format.


-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 14, 2007 10:00 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

No I do not want to write any HTTP server myself.  I want to take the
received SOAP messages from the consumer web service convert those into
Java Objects and forward them to my non webapp.  I can just create a
socket and send it that way I was just hoping that maybe I could just
use the MUSE API to do this since I can set up services from a non
webapp.  

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Wednesday, February 14, 2007 12:57 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I don't see how you would receive the messages on a non-web app...
unless
you're writing your own little server and parsing the HTTP yourself. If

that's the case, I'd advise you to rethink it - you can either use OSGi

for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to
host the app (~5MB). Writing a decent HTTP server for one known client
is easy
- writing a robust HTTP server is quite hard.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53
PM:

> See below <DAC>
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Wednesday, February 14, 2007 12:31 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> The WsnTestClient should not be necessary in your real world scenario
-
> 
> it's just a driver to get the sample going. In your situation, you
can 
> just have the consumer resource subscribe to the producer itself -
the 
> code to do that would be very similar to what's in WsnTestClient (the 
> use of NotificationProducerClient), but you would package it in your 
> consumer resource instead of a command line app. You could perform the

> subscription work in the initialize() method of one of your 
> capabilities on the consumer side.
> 
> Alternatively, in a more complex scenario, you might have an 
> "orchestrator" service that is subscribing all of the consumers to
the 
> events they need to handle. This scenario would be a lot like the 
> sample in that a third service would call subscribe() and tell the 
> producer which consumer resource to send the messages to. This is just

> like the WsnTestClient app, except it would probably be a web service 
> as well.
> 
> If you want to forward messages received by one consumer to another 
> consumer(s), like a broker would, you just have to use the 
> NotificationMessageListener API - you can implement a listener that 
> listens for all notifications and then uses
NotificationConsumerClient
> to
> forward the messages to other resources.
> 
> <DAC> Can I have a broker service that would subscribe (NON 
> WEB)consumer's.
>   I want to have a consumer web service that just forwards messages 
> from the webapp
>  (broker) to nonwebapp (consumers).  Can I do this with the 
> NotificationMessageListener and NotificationConsumerClient or do I 
> need to use another means to
forward
> messages from a webapp to a
> Non webapp.  I ask because I'm able to connect two webservices
together
> from a non webapp.  Thanks again for
> all you help. 
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37
> AM:
> 
> > Ok thanks.  Let's say for instance that I have two different types
of
> > clients.  One type of clients that are within the same firewall as
my
> > web server and are on the same network.  The other is a client that
> is
> > outside the firewall and not on the same network.  I can see that
the
> > later would need a consumer web service running and the incoming 
> > requests would have to be forwarded to the user of the consumer web 
> > service.
> > 
> > First question, when I use the API's to create the subscription
> between
> > the publisher and consumer are there methods I can call that would 
> > subscribe from the consumer to the (WsnTestClient) a forwarded
> message
> > or is this something I have to do manually i.e create a socket from
> the
> > consumer to the WsnTestClient or is this already built into
> MUSE/AXIS?
> > 
> > 
> > Second question, when I am within the same network is there a way
for
> > me to set up a publisher/consumer without creating a consumer web 
> > service or is this not what is intended with MUSE and I would still 
> > need a consumer web server and some mechanism to forward messages
> from
> > the consumer web service to the (WsnTestClient).
> > 
> > Thanks again for all your answers and help!!
> > 
> > 
> > -----Original Message-----
> > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com]
> > Sent: Wednesday, February 07, 2007 1:04 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Each resource must be a web service resource with a URI address
that
> > identifies its location.  So your consumer cannot be a java program 
> > sitting outside of a webserver environment.  What you can do is
have
> a
> > consumer resource which routes calls to your java program.
> > 
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Wednesday, February 07, 2007 7:21 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Makes sense.  I would like to set up a publisher / consumer service 
> > were the publish is a web service and the consumer is java program 
> > (no web server running).  Is this possible?
> > 
> > -----Original Message-----
> > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > Sent: Wednesday, February 07, 2007 10:17 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm not really sure, if I understand your initial question, so I'll
> try
> > to explain it based on the assumption, that it's unclear why you
need
> > to
> > deploy 2 servlets to make the sample work.
> > 
> > 
> > For the producer/consumer example, they're mimicking a service
> > (producer) on a separate machine, which will inform the client
> machine
> > (consumer) about changes in its state via a WSDM SOAP message. 
> > The WsnTestClient-file is just setting up the subscription between
> the
> > producer/consumer via the SubscriptionManager.
> > The actual consumer is the
ConsumerCapability/ConsumerCapabilityImpl.
> > 
> > As for the error you're getting, I'm not sure if you deployed both
> the
> > producer/consumer wars given the earlier assumption I made. But it 
> > seems that your WsnTestClient is trying to subscribe to your 
> > producer
> service
> > and getting denied as the service is not available at the specified 
> > location (according to the WsnTestClient.java property and the
> involved
> > WSDL-files).
> > 
> > I don't have a clue yet about the error from you Tomcat log files.
> > 
> > 
> > Not really sure if this made any sense.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: 07 February 2007 13:43
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm using the official release and have performed step 2 and here
are
> > the errors I'm getting.  Also could someone explain to me why I
need
> to
> > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The 
> > WsnTestClient should be the "Consumer".
> > 
> > In my tomcat5 log file: 
> > 
> >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > Servlet.service() for servlet ApacheMuseServlet threw exception
> > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method 
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not 
> > found
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > .java:46)
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > ava:32)
> >    at
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:183)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:570)
> > 
> > 
> > Output from WsnTestClient:
> > 
> > CLIENT TRACE] SOAP envelope contents (outgoing):
> > 
> > <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://128.29.35.11:80
> > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > f-066b-ff60b581802c</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:A
> > ddress>
> >         </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://128.29.35.11:80
> > 80/wsn-consumer/services/consumer</wsa:Address>
> >             </wsnt:ConsumerReference>
> >         </wsnt:Subscribe>
> >     </soap:Body>
> > </soap:Envelope>
> > 
> > org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP 
> > response code: 500 for URL:
> > http://128.29.35.11:8080/wsn-producer/services/WsResource
> >         at
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:279)
> >         at
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:235)
> >         at
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > ribe(NotificationProducerClient.java:96)
> >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> Source)
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Tuesday, February 06, 2007 4:14 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Thank you for your support. I downloaded the nightly build and ran 
> > update_install.bat. The wsn-producer/consumer example worked at
once.
> > 
> > /Mattias
> > 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > Sent: Mon 2/5/2007 3:18 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Good catch on the port number - make sure the port you're using for 
> > Tomcat uses the one that's specified in the WsnTestClient.java
> client.
> > The port is part of the wsa:Address in the producer and consumer
> EPRs,
> > so if it's wrong, you need to change it (you can do this on the
> command
> > line or by
> > 
> > modifying the test client code).
> > 
> > I'd also advise against building the source and trying to add the 
> > latest bits incrementally - if you want to do a full build, follow 
> > the instructions on:
> > 
> >         http://ws.apache.org/muse/source-code.html
> > 
> > If you want the latest nightly build, you can get it here:
> > 
> >         http://ws.apache.org/muse/nightly/latest
> > 
> > Of course, except for the "step 2" that was added, neither of those 
> > samples has changed in quite a while. You should be able to get
them
> > working by taking the official release and performing step 2 - let
me
> > know if the port number issue was indeed the problem.
> > 
> > Dan
> > 
> > 
> > 
> > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > 
> > > I'm not sure why you would want to make the whole thing that 
> > > complicated.
> > > I seem to have no problem getting the producer/consumer example
to
> > work
> > > with these simple steps.
> > > 
> > > 1) Download the nightly build (with the latest bug fixes) from 
> > > http://ws.apache.org/muse/nightly/latest/bin/
> > > 
> > > 2) Run update-install
> > > 
> > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > (wsn-producer)
> > > and the WsnTestClient portType properties (producer_port &
> > > consumer_port) are pointing to the right serviceport (according
to
> > your
> > > Tomcat specs).
> > > 
> > > 4) Use the ant build file to build both project-wars
> > > 
> > > 5) Deploy and enjoy
> > > 
> > > But that said did you have a look in the wsn-consumer
> > WsnTestClient.java
> > > and the wsn-producer WsREsource.wsdl to see if the portTypes
match
> > your
> > > Tomcat setup? To me it sounds like it's looking for a consumer
> that's
> > 
> > > not listening on the given port. I could be wrong.
> > > 
> > > I know the portTypes have been a cause of some of my problems in
> the
> > > past.
> > > 
> > > /Lenni
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: 05 February 2007 12:59
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > If you follow the instructions for "Eclipse Development"
described
> > here
> > > 
> > > http://ws.apache.org/muse/source-code.html
> > > 
> > > you get a separate project in Eclipse for every muse jar-file.
You
> > can
> > > then export each project as a jar-file and replace the ones found
> in
> > > your MUSE_HOME/modules subdirectories. This way you get the
latest 
> > > bugfixes and updates.
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > Sent: Mon 2/5/2007 1:45 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > You seemed to get farther than I did with the example.  I been
able
> > to
> > > find on the internet that you need to add (#2) below, but your
#3.
> > > Created new snapshot from SVN.  Could you explain? 
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: Monday, February 05, 2007 2:40 AM
> > > To: muse-user@ws.apache.org
> > > Subject: wsn-producer/consumer example
> > > 
> > > I have tried to get the wsn-producer/consumer sample to work
> without
> > > success. I have done the following:
> > > 
> > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > 
> > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > wsn-consumer muse.xml
> > > 
> > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced
old
> > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > 
> > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > 
> > > 5. Deploy wars on Tomcat without any error messages. Run
> > WsnTestClient
> > > 
> > > I still get the following error:
> > > 
> > > INFO: [ID = 'LastPublishFailed'] The last notification published
> via
> > > wsnt:Notify  failed to reach its destination. The consumer may be

> > > unavailable.
> > The
> > > original
> > > error was: null
> > > 2007-feb-05 08:17:37
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > run
> > > INFO: Waiting 10 seconds before sending message...
> > > 
> > > Any ideas?
> > > 
> > > /Mattias
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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

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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
No I do not want to write any HTTP server myself.  I want to take the
received SOAP messages from the consumer web service convert those into
Java Objects and forward them to my non webapp.  I can just create a
socket and send it that way I was just hoping that maybe I could just
use the MUSE API to do this since I can set up services from a non
webapp.  

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 14, 2007 12:57 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I don't see how you would receive the messages on a non-web app...
unless 
you're writing your own little server and parsing the HTTP yourself. If

that's the case, I'd advise you to rethink it - you can either use OSGi

for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to
host 
the app (~5MB). Writing a decent HTTP server for one known client is
easy 
- writing a robust HTTP server is quite hard.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53
PM:

> See below <DAC>
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 12:31 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> The WsnTestClient should not be necessary in your real world scenario
-
> 
> it's just a driver to get the sample going. In your situation, you
can 
> just have the consumer resource subscribe to the producer itself -
the 
> code to do that would be very similar to what's in WsnTestClient (the
> use 
> of NotificationProducerClient), but you would package it in your
> consumer 
> resource instead of a command line app. You could perform the
> subscription 
> work in the initialize() method of one of your capabilities on the 
> consumer side.
> 
> Alternatively, in a more complex scenario, you might have an 
> "orchestrator" service that is subscribing all of the consumers to
the 
> events they need to handle. This scenario would be a lot like the
> sample 
> in that a third service would call subscribe() and tell the producer
> which 
> consumer resource to send the messages to. This is just like the 
> WsnTestClient app, except it would probably be a web service as well.
> 
> If you want to forward messages received by one consumer to another 
> consumer(s), like a broker would, you just have to use the 
> NotificationMessageListener API - you can implement a listener that 
> listens for all notifications and then uses
NotificationConsumerClient
> to 
> forward the messages to other resources.
> 
> <DAC> Can I have a broker service that would subscribe (NON
> WEB)consumer's. 
>   I want to have a consumer web service that just forwards messages
> from the webapp 
>  (broker) to nonwebapp (consumers).  Can I do this with the
> NotificationMessageListener and
> NotificationConsumerClient or do I need to use another means to
forward
> messages from a webapp to a
> Non webapp.  I ask because I'm able to connect two webservices
together
> from a non webapp.  Thanks again for
> all you help. 
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37
> AM:
> 
> > Ok thanks.  Let's say for instance that I have two different types
of
> > clients.  One type of clients that are within the same firewall as
my
> > web server and are on the same network.  The other is a client that
> is
> > outside the firewall and not on the same network.  I can see that
the
> > later would need a consumer web service running and the incoming
> > requests would have to be forwarded to the user of the consumer web
> > service. 
> > 
> > First question, when I use the API's to create the subscription
> between
> > the publisher and consumer are there methods I can call that would
> > subscribe from the consumer to the (WsnTestClient) a forwarded
> message
> > or is this something I have to do manually i.e create a socket from
> the
> > consumer to the WsnTestClient or is this already built into
> MUSE/AXIS?
> > 
> > 
> > Second question, when I am within the same network is there a way
for
> > me to set up a publisher/consumer without creating a consumer web
> > service or is this not what is intended with MUSE and I would still
> > need a consumer web server and some mechanism to forward messages
> from
> > the consumer web service to the (WsnTestClient).
> > 
> > Thanks again for all your answers and help!!
> > 
> > 
> > -----Original Message-----
> > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > Sent: Wednesday, February 07, 2007 1:04 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Each resource must be a web service resource with a URI address
that
> > identifies its location.  So your consumer cannot be a java program
> > sitting outside of a webserver environment.  What you can do is
have
> a
> > consumer resource which routes calls to your java program.
> > 
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > Sent: Wednesday, February 07, 2007 7:21 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Makes sense.  I would like to set up a publisher / consumer service
> > were
> > the publish is a web service and the consumer is java program (no
> > web server running).  Is this possible? 
> > 
> > -----Original Message-----
> > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > Sent: Wednesday, February 07, 2007 10:17 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm not really sure, if I understand your initial question, so I'll
> try
> > to explain it based on the assumption, that it's unclear why you
need
> > to
> > deploy 2 servlets to make the sample work.
> > 
> > 
> > For the producer/consumer example, they're mimicking a service
> > (producer) on a separate machine, which will inform the client
> machine
> > (consumer) about changes in its state via a WSDM SOAP message. 
> > The WsnTestClient-file is just setting up the subscription between
> the
> > producer/consumer via the SubscriptionManager.
> > The actual consumer is the
ConsumerCapability/ConsumerCapabilityImpl.
> > 
> > As for the error you're getting, I'm not sure if you deployed both
> the
> > producer/consumer wars given the earlier assumption I made. But it
> > seems
> > that your WsnTestClient is trying to subscribe to your producer
> service
> > and getting denied as the service is not available at the specified
> > location (according to the WsnTestClient.java property and the
> involved
> > WSDL-files).
> > 
> > I don't have a clue yet about the error from you Tomcat log files.
> > 
> > 
> > Not really sure if this made any sense.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: 07 February 2007 13:43
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm using the official release and have performed step 2 and here
are
> > the errors I'm getting.  Also could someone explain to me why I
need
> to
> > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > WsnTestClient should be the "Consumer". 
> > 
> > In my tomcat5 log file: 
> > 
> >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > Servlet.service() for servlet ApacheMuseServlet threw exception
> > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> > found
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > .java:46)
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> >    at
> >
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > ava:32)
> >    at
> >
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:183)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:570)
> > 
> > 
> > Output from WsnTestClient:
> > 
> > CLIENT TRACE] SOAP envelope contents (outgoing):
> > 
> > <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://128.29.35.11:80
> > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > f-066b-ff60b581802c</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:A
> > ddress>
> >         </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://128.29.35.11:80
> > 80/wsn-consumer/services/consumer</wsa:Address>
> >             </wsnt:ConsumerReference>
> >         </wsnt:Subscribe>
> >     </soap:Body>
> > </soap:Envelope>
> > 
> > org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> > response code: 500 for URL:
> > http://128.29.35.11:8080/wsn-producer/services/WsResource
> >         at
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:279)
> >         at
> >
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:235)
> >         at
> >
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > ribe(NotificationProducerClient.java:96)
> >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> Source)
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Tuesday, February 06, 2007 4:14 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Thank you for your support. I downloaded the nightly build and ran
> > update_install.bat. The wsn-producer/consumer example worked at
once.
> > 
> > /Mattias
> > 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > Sent: Mon 2/5/2007 3:18 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Good catch on the port number - make sure the port you're using for
> > Tomcat uses the one that's specified in the WsnTestClient.java
> client.
> > The port is part of the wsa:Address in the producer and consumer
> EPRs,
> > so if it's wrong, you need to change it (you can do this on the
> command
> > line or by
> > 
> > modifying the test client code).
> > 
> > I'd also advise against building the source and trying to add the
> > latest
> > bits incrementally - if you want to do a full build, follow the
> > instructions on:
> > 
> >         http://ws.apache.org/muse/source-code.html
> > 
> > If you want the latest nightly build, you can get it here:
> > 
> >         http://ws.apache.org/muse/nightly/latest
> > 
> > Of course, except for the "step 2" that was added, neither of those
> > samples has changed in quite a while. You should be able to get
them
> > working by taking the official release and performing step 2 - let
me
> > know if the port number issue was indeed the problem.
> > 
> > Dan
> > 
> > 
> > 
> > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > 
> > > I'm not sure why you would want to make the whole thing that 
> > > complicated.
> > > I seem to have no problem getting the producer/consumer example
to
> > work
> > > with these simple steps.
> > > 
> > > 1) Download the nightly build (with the latest bug fixes) from 
> > > http://ws.apache.org/muse/nightly/latest/bin/
> > > 
> > > 2) Run update-install
> > > 
> > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > (wsn-producer)
> > > and the WsnTestClient portType properties (producer_port &
> > > consumer_port) are pointing to the right serviceport (according
to
> > your
> > > Tomcat specs).
> > > 
> > > 4) Use the ant build file to build both project-wars
> > > 
> > > 5) Deploy and enjoy
> > > 
> > > But that said did you have a look in the wsn-consumer
> > WsnTestClient.java
> > > and the wsn-producer WsREsource.wsdl to see if the portTypes
match
> > your
> > > Tomcat setup? To me it sounds like it's looking for a consumer
> that's
> > 
> > > not listening on the given port. I could be wrong.
> > > 
> > > I know the portTypes have been a cause of some of my problems in
> the 
> > > past.
> > > 
> > > /Lenni
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: 05 February 2007 12:59
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > If you follow the instructions for "Eclipse Development"
described
> > here 
> > > 
> > > http://ws.apache.org/muse/source-code.html
> > > 
> > > you get a separate project in Eclipse for every muse jar-file.
You
> > can
> > > then export each project as a jar-file and replace the ones found
> in 
> > > your MUSE_HOME/modules subdirectories. This way you get the
latest 
> > > bugfixes and updates.
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > Sent: Mon 2/5/2007 1:45 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > You seemed to get farther than I did with the example.  I been
able
> > to
> > > find on the internet that you need to add (#2) below, but your
#3.
> > > Created new snapshot from SVN.  Could you explain? 
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: Monday, February 05, 2007 2:40 AM
> > > To: muse-user@ws.apache.org
> > > Subject: wsn-producer/consumer example
> > > 
> > > I have tried to get the wsn-producer/consumer sample to work
> without 
> > > success. I have done the following:
> > > 
> > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > 
> > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > wsn-consumer muse.xml
> > > 
> > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced
old
> > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > 
> > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > 
> > > 5. Deploy wars on Tomcat without any error messages. Run
> > WsnTestClient 
> > > 
> > > I still get the following error:
> > > 
> > > INFO: [ID = 'LastPublishFailed'] The last notification published
> via 
> > > wsnt:Notify  failed to reach its destination. The consumer may be

> > > unavailable.
> > The
> > > original
> > > error was: null
> > > 2007-feb-05 08:17:37
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > run
> > > INFO: Waiting 10 seconds before sending message...
> > > 
> > > Any ideas?
> > > 
> > > /Mattias
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
I don't see how you would receive the messages on a non-web app... unless 
you're writing your own little server and parsing the HTTP yourself. If 
that's the case, I'd advise you to rethink it - you can either use OSGi 
for your app (the -osgi flag in wsdl2java) or use embedded Tomcat to host 
the app (~5MB). Writing a decent HTTP server for one known client is easy 
- writing a robust HTTP server is quite hard.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/14/2007 12:42:53 PM:

> See below <DAC>
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
> Sent: Wednesday, February 14, 2007 12:31 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> The WsnTestClient should not be necessary in your real world scenario -
> 
> it's just a driver to get the sample going. In your situation, you can 
> just have the consumer resource subscribe to the producer itself - the 
> code to do that would be very similar to what's in WsnTestClient (the
> use 
> of NotificationProducerClient), but you would package it in your
> consumer 
> resource instead of a command line app. You could perform the
> subscription 
> work in the initialize() method of one of your capabilities on the 
> consumer side.
> 
> Alternatively, in a more complex scenario, you might have an 
> "orchestrator" service that is subscribing all of the consumers to the 
> events they need to handle. This scenario would be a lot like the
> sample 
> in that a third service would call subscribe() and tell the producer
> which 
> consumer resource to send the messages to. This is just like the 
> WsnTestClient app, except it would probably be a web service as well.
> 
> If you want to forward messages received by one consumer to another 
> consumer(s), like a broker would, you just have to use the 
> NotificationMessageListener API - you can implement a listener that 
> listens for all notifications and then uses NotificationConsumerClient
> to 
> forward the messages to other resources.
> 
> <DAC> Can I have a broker service that would subscribe (NON
> WEB)consumer's. 
>   I want to have a consumer web service that just forwards messages
> from the webapp 
>  (broker) to nonwebapp (consumers).  Can I do this with the
> NotificationMessageListener and
> NotificationConsumerClient or do I need to use another means to forward
> messages from a webapp to a
> Non webapp.  I ask because I'm able to connect two webservices together
> from a non webapp.  Thanks again for
> all you help. 
> 
> Dan
> 
> 
> 
> "Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37
> AM:
> 
> > Ok thanks.  Let's say for instance that I have two different types of
> > clients.  One type of clients that are within the same firewall as my
> > web server and are on the same network.  The other is a client that
> is
> > outside the firewall and not on the same network.  I can see that the
> > later would need a consumer web service running and the incoming
> > requests would have to be forwarded to the user of the consumer web
> > service. 
> > 
> > First question, when I use the API's to create the subscription
> between
> > the publisher and consumer are there methods I can call that would
> > subscribe from the consumer to the (WsnTestClient) a forwarded
> message
> > or is this something I have to do manually i.e create a socket from
> the
> > consumer to the WsnTestClient or is this already built into
> MUSE/AXIS?
> > 
> > 
> > Second question, when I am within the same network is there a way for
> > me to set up a publisher/consumer without creating a consumer web
> > service or is this not what is intended with MUSE and I would still
> > need a consumer web server and some mechanism to forward messages
> from
> > the consumer web service to the (WsnTestClient).
> > 
> > Thanks again for all your answers and help!!
> > 
> > 
> > -----Original Message-----
> > From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> > Sent: Wednesday, February 07, 2007 1:04 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Each resource must be a web service resource with a URI address that
> > identifies its location.  So your consumer cannot be a java program
> > sitting outside of a webserver environment.  What you can do is have
> a
> > consumer resource which routes calls to your java program.
> > 
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org] 
> > Sent: Wednesday, February 07, 2007 7:21 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Makes sense.  I would like to set up a publisher / consumer service
> > were
> > the publish is a web service and the consumer is java program (no
> > web server running).  Is this possible? 
> > 
> > -----Original Message-----
> > From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> > Sent: Wednesday, February 07, 2007 10:17 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm not really sure, if I understand your initial question, so I'll
> try
> > to explain it based on the assumption, that it's unclear why you need
> > to
> > deploy 2 servlets to make the sample work.
> > 
> > 
> > For the producer/consumer example, they're mimicking a service
> > (producer) on a separate machine, which will inform the client
> machine
> > (consumer) about changes in its state via a WSDM SOAP message. 
> > The WsnTestClient-file is just setting up the subscription between
> the
> > producer/consumer via the SubscriptionManager.
> > The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.
> > 
> > As for the error you're getting, I'm not sure if you deployed both
> the
> > producer/consumer wars given the earlier assumption I made. But it
> > seems
> > that your WsnTestClient is trying to subscribe to your producer
> service
> > and getting denied as the service is not available at the specified
> > location (according to the WsnTestClient.java property and the
> involved
> > WSDL-files).
> > 
> > I don't have a clue yet about the error from you Tomcat log files.
> > 
> > 
> > Not really sure if this made any sense.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: 07 February 2007 13:43
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > I'm using the official release and have performed step 2 and here are
> > the errors I'm getting.  Also could someone explain to me why I need
> to
> > run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> > WsnTestClient should be the "Consumer". 
> > 
> > In my tomcat5 log file: 
> > 
> >  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> > Servlet.service() for servlet ApacheMuseServlet threw exception
> > java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> > <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> > found
> >    at
> >
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> > .java:46)
> >    at
> >
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
> >    at
> >
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> > ava:32)
> >    at
> >
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> > tIsolationLayer.java:183)
> >    at
> >
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> > iServlet.java:36)
> >    at
> >
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> > 50)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
> >    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
> >    at
> >
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> > ationFilterChain.java:237)
> >    at
> >
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> > terChain.java:157)
> >    at
> >
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> > ve.java:214)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> > ntextValve.java:198)
> >    at
> >
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> > ve.java:152)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> > a:137)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> > a:118)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:102)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> >
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> > .java:109)
> >    at
> >
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> > ontext.java:104)
> >    at
> >
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> > 520)
> >    at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
> >    at
> >
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> >    at
> >
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> > 99)
> >    at
> >
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> > Connection(Http11Protocol.java:705)
> >    at
> >
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> > 77)
> >    at
> >
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> > l.java:683)
> >    at java.lang.Thread.run(Thread.java:570)
> > 
> > 
> > Output from WsnTestClient:
> > 
> > CLIENT TRACE] SOAP envelope contents (outgoing):
> > 
> > <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://128.29.35.11:80
> > 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> > f-066b-ff60b581802c</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:A
> > ddress>
> >         </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://128.29.35.11:80
> > 80/wsn-consumer/services/consumer</wsa:Address>
> >             </wsnt:ConsumerReference>
> >         </wsnt:Subscribe>
> >     </soap:Body>
> > </soap:Envelope>
> > 
> > org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> > response code: 500 for URL:
> > http://128.29.35.11:8080/wsn-producer/services/WsResource
> >         at
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:279)
> >         at
> >
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> > nt.java:235)
> >         at
> >
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> > ribe(NotificationProducerClient.java:96)
> >         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
> Source)
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Tuesday, February 06, 2007 4:14 AM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Thank you for your support. I downloaded the nightly build and ran
> > update_install.bat. The wsn-producer/consumer example worked at once.
> > 
> > /Mattias
> > 
> > 
> > -----Original Message-----
> > From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> > Sent: Mon 2/5/2007 3:18 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > Good catch on the port number - make sure the port you're using for
> > Tomcat uses the one that's specified in the WsnTestClient.java
> client.
> > The port is part of the wsa:Address in the producer and consumer
> EPRs,
> > so if it's wrong, you need to change it (you can do this on the
> command
> > line or by
> > 
> > modifying the test client code).
> > 
> > I'd also advise against building the source and trying to add the
> > latest
> > bits incrementally - if you want to do a full build, follow the
> > instructions on:
> > 
> >         http://ws.apache.org/muse/source-code.html
> > 
> > If you want the latest nightly build, you can get it here:
> > 
> >         http://ws.apache.org/muse/nightly/latest
> > 
> > Of course, except for the "step 2" that was added, neither of those
> > samples has changed in quite a while. You should be able to get them
> > working by taking the official release and performing step 2 - let me
> > know if the port number issue was indeed the problem.
> > 
> > Dan
> > 
> > 
> > 
> > <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> > 
> > > I'm not sure why you would want to make the whole thing that 
> > > complicated.
> > > I seem to have no problem getting the producer/consumer example to
> > work
> > > with these simple steps.
> > > 
> > > 1) Download the nightly build (with the latest bug fixes) from 
> > > http://ws.apache.org/muse/nightly/latest/bin/
> > > 
> > > 2) Run update-install
> > > 
> > > 3) Double-check the WsResourcePort in the WsResource.wsdl
> > (wsn-producer)
> > > and the WsnTestClient portType properties (producer_port &
> > > consumer_port) are pointing to the right serviceport (according to
> > your
> > > Tomcat specs).
> > > 
> > > 4) Use the ant build file to build both project-wars
> > > 
> > > 5) Deploy and enjoy
> > > 
> > > But that said did you have a look in the wsn-consumer
> > WsnTestClient.java
> > > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> > your
> > > Tomcat setup? To me it sounds like it's looking for a consumer
> that's
> > 
> > > not listening on the given port. I could be wrong.
> > > 
> > > I know the portTypes have been a cause of some of my problems in
> the 
> > > past.
> > > 
> > > /Lenni
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: 05 February 2007 12:59
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > If you follow the instructions for "Eclipse Development" described
> > here 
> > > 
> > > http://ws.apache.org/muse/source-code.html
> > > 
> > > you get a separate project in Eclipse for every muse jar-file. You
> > can
> > > then export each project as a jar-file and replace the ones found
> in 
> > > your MUSE_HOME/modules subdirectories. This way you get the latest 
> > > bugfixes and updates.
> > > 
> > > -----Original Message-----
> > > From: Callner, David A. [mailto:dcallner@mitre.org]
> > > Sent: Mon 2/5/2007 1:45 PM
> > > To: muse-user@ws.apache.org
> > > Subject: RE: wsn-producer/consumer example
> > > 
> > > You seemed to get farther than I did with the example.  I been able
> > to
> > > find on the internet that you need to add (#2) below, but your #3.
> > > Created new snapshot from SVN.  Could you explain? 
> > > 
> > > -----Original Message-----
> > > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > > Sent: Monday, February 05, 2007 2:40 AM
> > > To: muse-user@ws.apache.org
> > > Subject: wsn-producer/consumer example
> > > 
> > > I have tried to get the wsn-producer/consumer sample to work
> without 
> > > success. I have done the following:
> > > 
> > > 1. Downloaded 2.1.0 distribution and ran update_install.
> > > 
> > > 2. Added row <resource-type use-router-persistence="true"> in 
> > > wsn-consumer muse.xml
> > > 
> > > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > > 
> > > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > > 
> > > 5. Deploy wars on Tomcat without any error messages. Run
> > WsnTestClient 
> > > 
> > > I still get the following error:
> > > 
> > > INFO: [ID = 'LastPublishFailed'] The last notification published
> via 
> > > wsnt:Notify  failed to reach its destination. The consumer may be 
> > > unavailable.
> > The
> > > original
> > > error was: null
> > > 2007-feb-05 08:17:37
> org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > > run
> > > INFO: Waiting 10 seconds before sending message...
> > > 
> > > Any ideas?
> > > 
> > > /Mattias
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > > 
> > > 
> > > 
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: muse-user-help@ws.apache.org
> > > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
See below <DAC>

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 14, 2007 12:31 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

The WsnTestClient should not be necessary in your real world scenario -

it's just a driver to get the sample going. In your situation, you can 
just have the consumer resource subscribe to the producer itself - the 
code to do that would be very similar to what's in WsnTestClient (the
use 
of NotificationProducerClient), but you would package it in your
consumer 
resource instead of a command line app. You could perform the
subscription 
work in the initialize() method of one of your capabilities on the 
consumer side.

Alternatively, in a more complex scenario, you might have an 
"orchestrator" service that is subscribing all of the consumers to the 
events they need to handle. This scenario would be a lot like the
sample 
in that a third service would call subscribe() and tell the producer
which 
consumer resource to send the messages to. This is just like the 
WsnTestClient app, except it would probably be a web service as well.

If you want to forward messages received by one consumer to another 
consumer(s), like a broker would, you just have to use the 
NotificationMessageListener API - you can implement a listener that 
listens for all notifications and then uses NotificationConsumerClient
to 
forward the messages to other resources.

<DAC> Can I have a broker service that would subscribe (NON
WEB)consumer's. 
  I want to have a consumer web service that just forwards messages
from the webapp 
 (broker) to nonwebapp (consumers).  Can I do this with the
NotificationMessageListener and
NotificationConsumerClient or do I need to use another means to forward
messages from a webapp to a
Non webapp.  I ask because I'm able to connect two webservices together
from a non webapp.  Thanks again for
all you help.     

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37
AM:

> Ok thanks.  Let's say for instance that I have two different types of
> clients.  One type of clients that are within the same firewall as my
> web server and are on the same network.  The other is a client that
is
> outside the firewall and not on the same network.  I can see that the
> later would need a consumer web service running and the incoming
> requests would have to be forwarded to the user of the consumer web
> service. 
> 
> First question, when I use the API's to create the subscription
between
> the publisher and consumer are there methods I can call that would
> subscribe from the consumer to the (WsnTestClient) a forwarded
message
> or is this something I have to do manually i.e create a socket from
the
> consumer to the WsnTestClient or is this already built into
MUSE/AXIS?
> 
> 
> Second question, when I am within the same network is there a way for
> me to set up a publisher/consumer without creating a consumer web
> service or is this not what is intended with MUSE and I would still
> need a consumer web server and some mechanism to forward messages
from
> the consumer web service to the (WsnTestClient).
> 
> Thanks again for all your answers and help!!
> 
> 
> -----Original Message-----
> From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> Sent: Wednesday, February 07, 2007 1:04 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Each resource must be a web service resource with a URI address that
> identifies its location.  So your consumer cannot be a java program
> sitting outside of a webserver environment.  What you can do is have
a
> consumer resource which routes calls to your java program.
> 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Wednesday, February 07, 2007 7:21 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Makes sense.  I would like to set up a publisher / consumer service
> were
> the publish is a web service and the consumer is java program (no
> web server running).  Is this possible? 
> 
> -----Original Message-----
> From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> Sent: Wednesday, February 07, 2007 10:17 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm not really sure, if I understand your initial question, so I'll
try
> to explain it based on the assumption, that it's unclear why you need
> to
> deploy 2 servlets to make the sample work.
> 
> 
> For the producer/consumer example, they're mimicking a service
> (producer) on a separate machine, which will inform the client
machine
> (consumer) about changes in its state via a WSDM SOAP message. 
> The WsnTestClient-file is just setting up the subscription between
the
> producer/consumer via the SubscriptionManager.
> The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.
> 
> As for the error you're getting, I'm not sure if you deployed both
the
> producer/consumer wars given the earlier assumption I made. But it
> seems
> that your WsnTestClient is trying to subscribe to your producer
service
> and getting denied as the service is not available at the specified
> location (according to the WsnTestClient.java property and the
involved
> WSDL-files).
> 
> I don't have a clue yet about the error from you Tomcat log files.
> 
> 
> Not really sure if this made any sense.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: 07 February 2007 13:43
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm using the official release and have performed step 2 and here are
> the errors I'm getting.  Also could someone explain to me why I need
to
> run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> WsnTestClient should be the "Consumer". 
> 
> In my tomcat5 log file: 
> 
>  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> Servlet.service() for servlet ApacheMuseServlet threw exception
> java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> found
>    at
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> .java:46)
>    at
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
>    at
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> ava:32)
>    at
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:183)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:570)
> 
> 
> Output from WsnTestClient:
> 
> CLIENT TRACE] SOAP envelope contents (outgoing):
> 
> <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://128.29.35.11:80
> 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> f-066b-ff60b581802c</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:A
> ddress>
>         </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://128.29.35.11:80
> 80/wsn-consumer/services/consumer</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://128.29.35.11:8080/wsn-producer/services/WsResource
>         at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:279)
>         at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:235)
>         at
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> ribe(NotificationProducerClient.java:96)
>         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
Source)
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: Tuesday, February 06, 2007 4:14 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Thank you for your support. I downloaded the nightly build and ran
> update_install.bat. The wsn-producer/consumer example worked at once.
> 
> /Mattias
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Mon 2/5/2007 3:18 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Good catch on the port number - make sure the port you're using for
> Tomcat uses the one that's specified in the WsnTestClient.java
client.
> The port is part of the wsa:Address in the producer and consumer
EPRs,
> so if it's wrong, you need to change it (you can do this on the
command
> line or by
> 
> modifying the test client code).
> 
> I'd also advise against building the source and trying to add the
> latest
> bits incrementally - if you want to do a full build, follow the
> instructions on:
> 
>         http://ws.apache.org/muse/source-code.html
> 
> If you want the latest nightly build, you can get it here:
> 
>         http://ws.apache.org/muse/nightly/latest
> 
> Of course, except for the "step 2" that was added, neither of those
> samples has changed in quite a while. You should be able to get them
> working by taking the official release and performing step 2 - let me
> know if the port number issue was indeed the problem.
> 
> Dan
> 
> 
> 
> <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> 
> > I'm not sure why you would want to make the whole thing that 
> > complicated.
> > I seem to have no problem getting the producer/consumer example to
> work
> > with these simple steps.
> > 
> > 1) Download the nightly build (with the latest bug fixes) from 
> > http://ws.apache.org/muse/nightly/latest/bin/
> > 
> > 2) Run update-install
> > 
> > 3) Double-check the WsResourcePort in the WsResource.wsdl
> (wsn-producer)
> > and the WsnTestClient portType properties (producer_port &
> > consumer_port) are pointing to the right serviceport (according to
> your
> > Tomcat specs).
> > 
> > 4) Use the ant build file to build both project-wars
> > 
> > 5) Deploy and enjoy
> > 
> > But that said did you have a look in the wsn-consumer
> WsnTestClient.java
> > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> your
> > Tomcat setup? To me it sounds like it's looking for a consumer
that's
> 
> > not listening on the given port. I could be wrong.
> > 
> > I know the portTypes have been a cause of some of my problems in
the 
> > past.
> > 
> > /Lenni
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: 05 February 2007 12:59
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > If you follow the instructions for "Eclipse Development" described
> here 
> > 
> > http://ws.apache.org/muse/source-code.html
> > 
> > you get a separate project in Eclipse for every muse jar-file. You
> can
> > then export each project as a jar-file and replace the ones found
in 
> > your MUSE_HOME/modules subdirectories. This way you get the latest 
> > bugfixes and updates.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Mon 2/5/2007 1:45 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > You seemed to get farther than I did with the example.  I been able
> to
> > find on the internet that you need to add (#2) below, but your #3.
> > Created new snapshot from SVN.  Could you explain? 
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Monday, February 05, 2007 2:40 AM
> > To: muse-user@ws.apache.org
> > Subject: wsn-producer/consumer example
> > 
> > I have tried to get the wsn-producer/consumer sample to work
without 
> > success. I have done the following:
> > 
> > 1. Downloaded 2.1.0 distribution and ran update_install.
> > 
> > 2. Added row <resource-type use-router-persistence="true"> in 
> > wsn-consumer muse.xml
> > 
> > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > 
> > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > 
> > 5. Deploy wars on Tomcat without any error messages. Run
> WsnTestClient 
> > 
> > I still get the following error:
> > 
> > INFO: [ID = 'LastPublishFailed'] The last notification published
via 
> > wsnt:Notify  failed to reach its destination. The consumer may be 
> > unavailable.
> The
> > original
> > error was: null
> > 2007-feb-05 08:17:37
org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > run
> > INFO: Waiting 10 seconds before sending message...
> > 
> > Any ideas?
> > 
> > /Mattias
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
The WsnTestClient should not be necessary in your real world scenario - 
it's just a driver to get the sample going. In your situation, you can 
just have the consumer resource subscribe to the producer itself - the 
code to do that would be very similar to what's in WsnTestClient (the use 
of NotificationProducerClient), but you would package it in your consumer 
resource instead of a command line app. You could perform the subscription 
work in the initialize() method of one of your capabilities on the 
consumer side.

Alternatively, in a more complex scenario, you might have an 
"orchestrator" service that is subscribing all of the consumers to the 
events they need to handle. This scenario would be a lot like the sample 
in that a third service would call subscribe() and tell the producer which 
consumer resource to send the messages to. This is just like the 
WsnTestClient app, except it would probably be a web service as well.

If you want to forward messages received by one consumer to another 
consumer(s), like a broker would, you just have to use the 
NotificationMessageListener API - you can implement a listener that 
listens for all notifications and then uses NotificationConsumerClient to 
forward the messages to other resources.

Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/13/2007 09:36:37 AM:

> Ok thanks.  Let's say for instance that I have two different types of
> clients.  One type of clients that are within the same firewall as my
> web server and are on the same network.  The other is a client that is
> outside the firewall and not on the same network.  I can see that the
> later would need a consumer web service running and the incoming
> requests would have to be forwarded to the user of the consumer web
> service. 
> 
> First question, when I use the API's to create the subscription between
> the publisher and consumer are there methods I can call that would
> subscribe from the consumer to the (WsnTestClient) a forwarded message
> or is this something I have to do manually i.e create a socket from the
> consumer to the WsnTestClient or is this already built into MUSE/AXIS?
> 
> 
> Second question, when I am within the same network is there a way for
> me to set up a publisher/consumer without creating a consumer web
> service or is this not what is intended with MUSE and I would still
> need a consumer web server and some mechanism to forward messages from
> the consumer web service to the (WsnTestClient).
> 
> Thanks again for all your answers and help!!
> 
> 
> -----Original Message-----
> From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
> Sent: Wednesday, February 07, 2007 1:04 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Each resource must be a web service resource with a URI address that
> identifies its location.  So your consumer cannot be a java program
> sitting outside of a webserver environment.  What you can do is have a
> consumer resource which routes calls to your java program.
> 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Wednesday, February 07, 2007 7:21 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Makes sense.  I would like to set up a publisher / consumer service
> were
> the publish is a web service and the consumer is java program (no
> web server running).  Is this possible? 
> 
> -----Original Message-----
> From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> Sent: Wednesday, February 07, 2007 10:17 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm not really sure, if I understand your initial question, so I'll try
> to explain it based on the assumption, that it's unclear why you need
> to
> deploy 2 servlets to make the sample work.
> 
> 
> For the producer/consumer example, they're mimicking a service
> (producer) on a separate machine, which will inform the client machine
> (consumer) about changes in its state via a WSDM SOAP message. 
> The WsnTestClient-file is just setting up the subscription between the
> producer/consumer via the SubscriptionManager.
> The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.
> 
> As for the error you're getting, I'm not sure if you deployed both the
> producer/consumer wars given the earlier assumption I made. But it
> seems
> that your WsnTestClient is trying to subscribe to your producer service
> and getting denied as the service is not available at the specified
> location (according to the WsnTestClient.java property and the involved
> WSDL-files).
> 
> I don't have a clue yet about the error from you Tomcat log files.
> 
> 
> Not really sure if this made any sense.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: 07 February 2007 13:43
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm using the official release and have performed step 2 and here are
> the errors I'm getting.  Also could someone explain to me why I need to
> run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> WsnTestClient should be the "Consumer". 
> 
> In my tomcat5 log file: 
> 
>  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> Servlet.service() for servlet ApacheMuseServlet threw exception
> java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> found
>    at
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> .java:46)
>    at
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
>    at
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> ava:32)
>    at
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:183)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:570)
> 
> 
> Output from WsnTestClient:
> 
> CLIENT TRACE] SOAP envelope contents (outgoing):
> 
> <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://128.29.35.11:80
> 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> f-066b-ff60b581802c</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:A
> ddress>
>         </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://128.29.35.11:80
> 80/wsn-consumer/services/consumer</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://128.29.35.11:8080/wsn-producer/services/WsResource
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:279)
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:235)
>         at
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> ribe(NotificationProducerClient.java:96)
>         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: Tuesday, February 06, 2007 4:14 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Thank you for your support. I downloaded the nightly build and ran
> update_install.bat. The wsn-producer/consumer example worked at once.
> 
> /Mattias
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Mon 2/5/2007 3:18 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Good catch on the port number - make sure the port you're using for
> Tomcat uses the one that's specified in the WsnTestClient.java client.
> The port is part of the wsa:Address in the producer and consumer EPRs,
> so if it's wrong, you need to change it (you can do this on the command
> line or by
> 
> modifying the test client code).
> 
> I'd also advise against building the source and trying to add the
> latest
> bits incrementally - if you want to do a full build, follow the
> instructions on:
> 
>         http://ws.apache.org/muse/source-code.html
> 
> If you want the latest nightly build, you can get it here:
> 
>         http://ws.apache.org/muse/nightly/latest
> 
> Of course, except for the "step 2" that was added, neither of those
> samples has changed in quite a while. You should be able to get them
> working by taking the official release and performing step 2 - let me
> know if the port number issue was indeed the problem.
> 
> Dan
> 
> 
> 
> <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> 
> > I'm not sure why you would want to make the whole thing that 
> > complicated.
> > I seem to have no problem getting the producer/consumer example to
> work
> > with these simple steps.
> > 
> > 1) Download the nightly build (with the latest bug fixes) from 
> > http://ws.apache.org/muse/nightly/latest/bin/
> > 
> > 2) Run update-install
> > 
> > 3) Double-check the WsResourcePort in the WsResource.wsdl
> (wsn-producer)
> > and the WsnTestClient portType properties (producer_port &
> > consumer_port) are pointing to the right serviceport (according to
> your
> > Tomcat specs).
> > 
> > 4) Use the ant build file to build both project-wars
> > 
> > 5) Deploy and enjoy
> > 
> > But that said did you have a look in the wsn-consumer
> WsnTestClient.java
> > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> your
> > Tomcat setup? To me it sounds like it's looking for a consumer that's
> 
> > not listening on the given port. I could be wrong.
> > 
> > I know the portTypes have been a cause of some of my problems in the 
> > past.
> > 
> > /Lenni
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: 05 February 2007 12:59
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > If you follow the instructions for "Eclipse Development" described
> here 
> > 
> > http://ws.apache.org/muse/source-code.html
> > 
> > you get a separate project in Eclipse for every muse jar-file. You
> can
> > then export each project as a jar-file and replace the ones found in 
> > your MUSE_HOME/modules subdirectories. This way you get the latest 
> > bugfixes and updates.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Mon 2/5/2007 1:45 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > You seemed to get farther than I did with the example.  I been able
> to
> > find on the internet that you need to add (#2) below, but your #3.
> > Created new snapshot from SVN.  Could you explain? 
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Monday, February 05, 2007 2:40 AM
> > To: muse-user@ws.apache.org
> > Subject: wsn-producer/consumer example
> > 
> > I have tried to get the wsn-producer/consumer sample to work without 
> > success. I have done the following:
> > 
> > 1. Downloaded 2.1.0 distribution and ran update_install.
> > 
> > 2. Added row <resource-type use-router-persistence="true"> in 
> > wsn-consumer muse.xml
> > 
> > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > 
> > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > 
> > 5. Deploy wars on Tomcat without any error messages. Run
> WsnTestClient 
> > 
> > I still get the following error:
> > 
> > INFO: [ID = 'LastPublishFailed'] The last notification published via 
> > wsnt:Notify  failed to reach its destination. The consumer may be 
> > unavailable.
> The
> > original
> > error was: null
> > 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > run
> > INFO: Waiting 10 seconds before sending message...
> > 
> > Any ideas?
> > 
> > /Mattias
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Ok thanks.  Let's say for instance that I have two different types of
clients.  One type of clients that are within the same firewall as my
web server and are on the same network.  The other is a client that is
outside the firewall and not on the same network.  I can see that the
later would need a consumer web service running and the incoming
requests would have to be forwarded to the user of the consumer web
service.  

First question, when I use the API's to create the subscription between
the publisher and consumer are there methods I can call that would
subscribe from the consumer to the (WsnTestClient) a forwarded message
or is this something I have to do manually i.e create a socket from the
consumer to the WsnTestClient or is this already built into MUSE/AXIS?


Second question, when I am within the same network is there a way for
me to set up a publisher/consumer without creating a consumer web
service or is this not what is intended with MUSE and I would still
need a consumer web server and some mechanism to forward messages from
the consumer web service to the (WsnTestClient).

Thanks again for all your answers and help!!


-----Original Message-----
From: Vinh Nguyen (vinguye2) [mailto:vinguye2@cisco.com] 
Sent: Wednesday, February 07, 2007 1:04 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Each resource must be a web service resource with a URI address that
identifies its location.  So your consumer cannot be a java program
sitting outside of a webserver environment.  What you can do is have a
consumer resource which routes calls to your java program.
 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 07, 2007 7:21 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Makes sense.  I would like to set up a publisher / consumer service
were
the publish is a web service and the consumer is java program (no
web server running).  Is this possible?   

-----Original Message-----
From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
Sent: Wednesday, February 07, 2007 10:17 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm not really sure, if I understand your initial question, so I'll try
to explain it based on the assumption, that it's unclear why you need
to
deploy 2 servlets to make the sample work.


For the producer/consumer example, they're mimicking a service
(producer) on a separate machine, which will inform the client machine
(consumer) about changes in its state via a WSDM SOAP message. 
The WsnTestClient-file is just setting up the subscription between the
producer/consumer via the SubscriptionManager.
The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.

As for the error you're getting, I'm not sure if you deployed both the
producer/consumer wars given the earlier assumption I made. But it
seems
that your WsnTestClient is trying to subscribe to your producer service
and getting denied as the service is not available at the specified
location (according to the WsnTestClient.java property and the involved
WSDL-files).

I don't have a clue yet about the error from you Tomcat log files.


Not really sure if this made any sense.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: 07 February 2007 13:43
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm using the official release and have performed step 2 and here are
the errors I'm getting.  Also could someone explain to me why I need to
run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
WsnTestClient should be the "Consumer".  

In my tomcat5 log file: 

 2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
Servlet.service() for servlet ApacheMuseServlet threw exception
java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found
	at
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
.java:46)
	at
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
	at
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
ava:32)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:183)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:570)


Output from WsnTestClient:

CLIENT TRACE] SOAP envelope contents (outgoing):

<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://128.29.35.11:80
80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
f-066b-ff60b581802c</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:A
ddress>
        </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://128.29.35.11:80
80/wsn-consumer/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://128.29.35.11:8080/wsn-producer/services/WsResource
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:279)
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:235)
        at
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
ribe(NotificationProducerClient.java:96)
        at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
Sent: Tuesday, February 06, 2007 4:14 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Thank you for your support. I downloaded the nightly build and ran
update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for
Tomcat uses the one that's specified in the WsnTestClient.java client.
The port is part of the wsa:Address in the producer and consumer EPRs,
so if it's wrong, you need to change it (you can do this on the command
line or by

modifying the test client code).

I'd also advise against building the source and trying to add the
latest
bits incrementally - if you want to do a full build, follow the
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those
samples has changed in quite a while. You should be able to get them
working by taking the official release and performing step 2 - let me
know if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that 
> complicated.
> I seem to have no problem getting the producer/consumer example to
work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from 
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl
(wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to
your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer
WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match
your
> Tomcat setup? To me it sounds like it's looking for a consumer that's

> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the 
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described
here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You
can
> then export each project as a jar-file and replace the ones found in 
> your MUSE_HOME/modules subdirectories. This way you get the latest 
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able
to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without 
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in 
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run
WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via 
> wsnt:Notify  failed to reach its destination. The consumer may be 
> unavailable.
The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




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


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


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

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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Vinh is correct - you need some kind of server if you're going to receive 
HTTP/SOAP requests (which is what the notifications are). If you simply 
want to make your consumer have a small footprint, you should try the 
first release candidate build for Muse 2.2, available at the end of the 
month - this build will allow you to run Muse on OSGi under J2ME - about 
as small as we can make it. An email will be posted to the list when the 
first RC build is up after code freeze.

Dan


"Vinh Nguyen \(vinguye2\)" <vi...@cisco.com> wrote on 02/07/2007 
01:04:11 PM:

> Each resource must be a web service resource with a URI address that
> identifies its location.  So your consumer cannot be a java program
> sitting outside of a webserver environment.  What you can do is have a
> consumer resource which routes calls to your java program.
> 
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org] 
> Sent: Wednesday, February 07, 2007 7:21 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Makes sense.  I would like to set up a publisher / consumer service were
> the publish is a web service and the consumer is java program (no
> web server running).  Is this possible? 
> 
> -----Original Message-----
> From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
> Sent: Wednesday, February 07, 2007 10:17 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm not really sure, if I understand your initial question, so I'll try
> to explain it based on the assumption, that it's unclear why you need to
> deploy 2 servlets to make the sample work.
> 
> 
> For the producer/consumer example, they're mimicking a service
> (producer) on a separate machine, which will inform the client machine
> (consumer) about changes in its state via a WSDM SOAP message. 
> The WsnTestClient-file is just setting up the subscription between the
> producer/consumer via the SubscriptionManager.
> The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.
> 
> As for the error you're getting, I'm not sure if you deployed both the
> producer/consumer wars given the earlier assumption I made. But it seems
> that your WsnTestClient is trying to subscribe to your producer service
> and getting denied as the service is not available at the specified
> location (according to the WsnTestClient.java property and the involved
> WSDL-files).
> 
> I don't have a clue yet about the error from you Tomcat log files.
> 
> 
> Not really sure if this made any sense.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: 07 February 2007 13:43
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> I'm using the official release and have performed step 2 and here are
> the errors I'm getting.  Also could someone explain to me why I need to
> run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> WsnTestClient should be the "Consumer". 
> 
> In my tomcat5 log file: 
> 
>  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> Servlet.service() for servlet ApacheMuseServlet threw exception
> java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> found
>    at
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> .java:46)
>    at
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
>    at
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> ava:32)
>    at
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:183)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:570)
> 
> 
> Output from WsnTestClient:
> 
> CLIENT TRACE] SOAP envelope contents (outgoing):
> 
> <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://128.29.35.11:80
> 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> f-066b-ff60b581802c</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:A
> ddress>
>         </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://128.29.35.11:80
> 80/wsn-consumer/services/consumer</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://128.29.35.11:8080/wsn-producer/services/WsResource
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:279)
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:235)
>         at
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> ribe(NotificationProducerClient.java:96)
>         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: Tuesday, February 06, 2007 4:14 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Thank you for your support. I downloaded the nightly build and ran
> update_install.bat. The wsn-producer/consumer example worked at once.
> 
> /Mattias
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Mon 2/5/2007 3:18 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Good catch on the port number - make sure the port you're using for
> Tomcat uses the one that's specified in the WsnTestClient.java client.
> The port is part of the wsa:Address in the producer and consumer EPRs,
> so if it's wrong, you need to change it (you can do this on the command
> line or by
> 
> modifying the test client code).
> 
> I'd also advise against building the source and trying to add the latest
> bits incrementally - if you want to do a full build, follow the
> instructions on:
> 
>         http://ws.apache.org/muse/source-code.html
> 
> If you want the latest nightly build, you can get it here:
> 
>         http://ws.apache.org/muse/nightly/latest
> 
> Of course, except for the "step 2" that was added, neither of those
> samples has changed in quite a while. You should be able to get them
> working by taking the official release and performing step 2 - let me
> know if the port number issue was indeed the problem.
> 
> Dan
> 
> 
> 
> <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> 
> > I'm not sure why you would want to make the whole thing that 
> > complicated.
> > I seem to have no problem getting the producer/consumer example to
> work
> > with these simple steps.
> > 
> > 1) Download the nightly build (with the latest bug fixes) from 
> > http://ws.apache.org/muse/nightly/latest/bin/
> > 
> > 2) Run update-install
> > 
> > 3) Double-check the WsResourcePort in the WsResource.wsdl
> (wsn-producer)
> > and the WsnTestClient portType properties (producer_port &
> > consumer_port) are pointing to the right serviceport (according to
> your
> > Tomcat specs).
> > 
> > 4) Use the ant build file to build both project-wars
> > 
> > 5) Deploy and enjoy
> > 
> > But that said did you have a look in the wsn-consumer
> WsnTestClient.java
> > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> your
> > Tomcat setup? To me it sounds like it's looking for a consumer that's 
> > not listening on the given port. I could be wrong.
> > 
> > I know the portTypes have been a cause of some of my problems in the 
> > past.
> > 
> > /Lenni
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: 05 February 2007 12:59
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > If you follow the instructions for "Eclipse Development" described
> here 
> > 
> > http://ws.apache.org/muse/source-code.html
> > 
> > you get a separate project in Eclipse for every muse jar-file. You
> can
> > then export each project as a jar-file and replace the ones found in 
> > your MUSE_HOME/modules subdirectories. This way you get the latest 
> > bugfixes and updates.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Mon 2/5/2007 1:45 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > You seemed to get farther than I did with the example.  I been able
> to
> > find on the internet that you need to add (#2) below, but your #3.
> > Created new snapshot from SVN.  Could you explain? 
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> > Sent: Monday, February 05, 2007 2:40 AM
> > To: muse-user@ws.apache.org
> > Subject: wsn-producer/consumer example
> > 
> > I have tried to get the wsn-producer/consumer sample to work without 
> > success. I have done the following:
> > 
> > 1. Downloaded 2.1.0 distribution and ran update_install.
> > 
> > 2. Added row <resource-type use-router-persistence="true"> in 
> > wsn-consumer muse.xml
> > 
> > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > 
> > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > 
> > 5. Deploy wars on Tomcat without any error messages. Run
> WsnTestClient 
> > 
> > I still get the following error:
> > 
> > INFO: [ID = 'LastPublishFailed'] The last notification published via 
> > wsnt:Notify  failed to reach its destination. The consumer may be 
> > unavailable.
> The
> > original
> > error was: null
> > 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > run
> > INFO: Waiting 10 seconds before sending message...
> > 
> > Any ideas?
> > 
> > /Mattias
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Vinh Nguyen (vinguye2)" <vi...@cisco.com>.
Each resource must be a web service resource with a URI address that
identifies its location.  So your consumer cannot be a java program
sitting outside of a webserver environment.  What you can do is have a
consumer resource which routes calls to your java program.
 

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: Wednesday, February 07, 2007 7:21 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Makes sense.  I would like to set up a publisher / consumer service were
the publish is a web service and the consumer is java program (no
web server running).  Is this possible?   

-----Original Message-----
From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com]
Sent: Wednesday, February 07, 2007 10:17 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm not really sure, if I understand your initial question, so I'll try
to explain it based on the assumption, that it's unclear why you need to
deploy 2 servlets to make the sample work.


For the producer/consumer example, they're mimicking a service
(producer) on a separate machine, which will inform the client machine
(consumer) about changes in its state via a WSDM SOAP message. 
The WsnTestClient-file is just setting up the subscription between the
producer/consumer via the SubscriptionManager.
The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.

As for the error you're getting, I'm not sure if you deployed both the
producer/consumer wars given the earlier assumption I made. But it seems
that your WsnTestClient is trying to subscribe to your producer service
and getting denied as the service is not available at the specified
location (according to the WsnTestClient.java property and the involved
WSDL-files).

I don't have a clue yet about the error from you Tomcat log files.


Not really sure if this made any sense.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: 07 February 2007 13:43
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm using the official release and have performed step 2 and here are
the errors I'm getting.  Also could someone explain to me why I need to
run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
WsnTestClient should be the "Consumer".  

In my tomcat5 log file: 

 2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
Servlet.service() for servlet ApacheMuseServlet threw exception
java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found
	at
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
.java:46)
	at
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
	at
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
ava:32)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:183)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:570)


Output from WsnTestClient:

CLIENT TRACE] SOAP envelope contents (outgoing):

<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://128.29.35.11:80
80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
f-066b-ff60b581802c</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:A
ddress>
        </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://128.29.35.11:80
80/wsn-consumer/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://128.29.35.11:8080/wsn-producer/services/WsResource
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:279)
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:235)
        at
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
ribe(NotificationProducerClient.java:96)
        at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
Sent: Tuesday, February 06, 2007 4:14 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Thank you for your support. I downloaded the nightly build and ran
update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for
Tomcat uses the one that's specified in the WsnTestClient.java client.
The port is part of the wsa:Address in the producer and consumer EPRs,
so if it's wrong, you need to change it (you can do this on the command
line or by

modifying the test client code).

I'd also advise against building the source and trying to add the latest
bits incrementally - if you want to do a full build, follow the
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those
samples has changed in quite a while. You should be able to get them
working by taking the official release and performing step 2 - let me
know if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that 
> complicated.
> I seem to have no problem getting the producer/consumer example to
work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from 
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl
(wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to
your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer
WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match
your
> Tomcat setup? To me it sounds like it's looking for a consumer that's 
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the 
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described
here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You
can
> then export each project as a jar-file and replace the ones found in 
> your MUSE_HOME/modules subdirectories. This way you get the latest 
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able
to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com]
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without 
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in 
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run
WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via 
> wsnt:Notify  failed to reach its destination. The consumer may be 
> unavailable.
The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




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


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


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

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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Makes sense.  I would like to set up a publisher / consumer service
were the publish is a web service and the consumer is java program (no
web server running).  Is this possible?   

-----Original Message-----
From: lenni.madsen@bt.com [mailto:lenni.madsen@bt.com] 
Sent: Wednesday, February 07, 2007 10:17 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm not really sure, if I understand your initial question, so I'll try
to explain it based on the assumption, that it's unclear why you need
to
deploy 2 servlets to make the sample work.


For the producer/consumer example, they're mimicking a service
(producer) on a separate machine, which will inform the client machine
(consumer) about changes in its state via a WSDM SOAP message. 
The WsnTestClient-file is just setting up the subscription between the
producer/consumer via the SubscriptionManager.
The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.

As for the error you're getting, I'm not sure if you deployed both the
producer/consumer wars given the earlier assumption I made. But it
seems
that your WsnTestClient is trying to subscribe to your producer service
and getting denied as the service is not available at the specified
location (according to the WsnTestClient.java property and the involved
WSDL-files).

I don't have a clue yet about the error from you Tomcat log files.


Not really sure if this made any sense.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: 07 February 2007 13:43
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm using the official release and have performed step 2 and here are
the errors I'm getting.  Also could someone explain to me why I need to
run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
WsnTestClient should be the "Consumer".  

In my tomcat5 log file: 

 2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
Servlet.service() for servlet ApacheMuseServlet threw exception
java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found
	at
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
.java:46)
	at
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
	at
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
ava:32)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:183)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:570)


Output from WsnTestClient:

CLIENT TRACE] SOAP envelope contents (outgoing):

<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://128.29.35.11:80
80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
f-066b-ff60b581802c</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:A
ddress>
        </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://128.29.35.11:80
80/wsn-consumer/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://128.29.35.11:8080/wsn-producer/services/WsResource
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:279)
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:235)
        at
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
ribe(NotificationProducerClient.java:96)
        at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Tuesday, February 06, 2007 4:14 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Thank you for your support. I downloaded the nightly build and ran
update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for
Tomcat 
uses the one that's specified in the WsnTestClient.java client. The
port 
is part of the wsa:Address in the producer and consumer EPRs, so if
it's 
wrong, you need to change it (you can do this on the command line or by

modifying the test client code).

I'd also advise against building the source and trying to add the
latest 
bits incrementally - if you want to do a full build, follow the 
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those 
samples has changed in quite a while. You should be able to get them 
working by taking the official release and performing step 2 - let me
know 
if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that
> complicated.
> I seem to have no problem getting the producer/consumer example to
work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl
(wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to
your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer
WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match
your
> Tomcat setup? To me it sounds like it's looking for a consumer that's
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described
here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You
can
> then export each project as a jar-file and replace the ones found in
> your MUSE_HOME/modules subdirectories. This way you get the latest
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able
to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run
WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via
> wsnt:Notify
>  failed to reach its destination. The consumer may be unavailable.
The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




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


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


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


RE: wsn-producer runtime events

Posted by le...@bt.com.
I was actually thinking about utilizing exceptions from java application
code, but the event word just stuck in my mind for some reason.

1) I just wanted to make sure I wasn't reinventing the deep plate by
implementing my own conversion from exception events to WEF.

2) The runtime handling would be somewhat application specific, so I'll
map the events to the WEF on a case by case basis.

Thanks for the answer.

/Lenni

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: 09 February 2007 16:08
To: muse-user@ws.apache.org
Subject: Re: wsn-producer runtime events

Hi Lenni,

I need some clarifications before I can answer:

1. What do you mean by 'Java event'? Exceptions? Or some other 
event/listener API? If it's the latter, what is the basic API for the 
event data?

2. We have no code for the automatic converstion of events (exception or

otherwise) to WEF, because it would be very hard to guess the semantics 
and fill in all the WEF fields properly. Right now WEF creation has to
be 
done like so:

 
http://ws.apache.org/muse/docs/2.1.0/manual/how-to/publish-any-notificat
ion.html

Can you describe how much 'handling' you're looking for out of the 
runtime?


Dan



<le...@bt.com> wrote on 02/09/2007 06:48:43 AM:

> Hi all
> 
> I was wondering if there was a default implementation for handling any
> runtime events produced by application logic, or if it would look a
bit
> simplified as follows:
> 
> 1) The application logic fires off a Java event
> 2) A WSDM WsResource with a Java event listener handles the event
> 3) The WSDM WsResource creates a WEF and pushes it to a WSN producer
> 
> /Lenni
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


Re: wsn-producer runtime events

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

I need some clarifications before I can answer:

1. What do you mean by 'Java event'? Exceptions? Or some other 
event/listener API? If it's the latter, what is the basic API for the 
event data?

2. We have no code for the automatic converstion of events (exception or 
otherwise) to WEF, because it would be very hard to guess the semantics 
and fill in all the WEF fields properly. Right now WEF creation has to be 
done like so:

 
http://ws.apache.org/muse/docs/2.1.0/manual/how-to/publish-any-notification.html

Can you describe how much 'handling' you're looking for out of the 
runtime?


Dan



<le...@bt.com> wrote on 02/09/2007 06:48:43 AM:

> Hi all
> 
> I was wondering if there was a default implementation for handling any
> runtime events produced by application logic, or if it would look a bit
> simplified as follows:
> 
> 1) The application logic fires off a Java event
> 2) A WSDM WsResource with a Java event listener handles the event
> 3) The WSDM WsResource creates a WEF and pushes it to a WSN producer
> 
> /Lenni
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


wsn-producer runtime events

Posted by le...@bt.com.
Hi all

I was wondering if there was a default implementation for handling any
runtime events produced by application logic, or if it would look a bit
simplified as follows:

1) The application logic fires off a Java event
2) A WSDM WsResource with a Java event listener handles the event
3) The WSDM WsResource creates a WEF and pushes it to a WSN producer

/Lenni

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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
Thanks I was using an old installation of tomcat and it had corrupted
jar files.  Thanks for your help. 

-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com] 
Sent: Wednesday, February 07, 2007 9:04 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Your other error (the NoSuchMethodError) may be caused because you
didn't 
include muse-util-qname.jar in your WAR. wsdl2java should have copied
this 
in during code gen, let us know if this is not the case. also, have you

modified your tomcat or JRE install in anyway? added other jars (which
may 
contain javax.xml.namespace.QName) to the common/endorsed libraries?
some 
info on your setup would help in tracking this down.

thanks,
Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/07/2007 08:42:47
AM:

> I'm using the official release and have performed step 2 and here are
> the errors I'm getting.  Also could someone explain to me why I need
to
> run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> WsnTestClient should be the "Consumer". 
> 
> In my tomcat5 log file: 
> 
>  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> Servlet.service() for servlet ApacheMuseServlet threw exception
> java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> found
>    at
>
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> .java:46)
>    at
>
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
>    at
>
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> ava:32)
>    at
>
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:183)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
>
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
>
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
>
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
>
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
>
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
>
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:570)
> 
> 
> Output from WsnTestClient:
> 
> CLIENT TRACE] SOAP envelope contents (outgoing):
> 
> <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://128.29.35.11:80
> 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> f-066b-ff60b581802c</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:A
> ddress>
>         </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://128.29.35.11:80
> 80/wsn-consumer/services/consumer</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://128.29.35.11:8080/wsn-producer/services/WsResource
>         at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:279)
>         at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:235)
>         at
>
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> ribe(NotificationProducerClient.java:96)
>         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown
Source)
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Tuesday, February 06, 2007 4:14 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Thank you for your support. I downloaded the nightly build and ran
> update_install.bat. The wsn-producer/consumer example worked at once.
> 
> /Mattias
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Mon 2/5/2007 3:18 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Good catch on the port number - make sure the port you're using for
> Tomcat 
> uses the one that's specified in the WsnTestClient.java client. The
> port 
> is part of the wsa:Address in the producer and consumer EPRs, so if
> it's 
> wrong, you need to change it (you can do this on the command line or
by
> 
> modifying the test client code).
> 
> I'd also advise against building the source and trying to add the
> latest 
> bits incrementally - if you want to do a full build, follow the 
> instructions on:
> 
>         http://ws.apache.org/muse/source-code.html
> 
> If you want the latest nightly build, you can get it here:
> 
>         http://ws.apache.org/muse/nightly/latest
> 
> Of course, except for the "step 2" that was added, neither of those 
> samples has changed in quite a while. You should be able to get them 
> working by taking the official release and performing step 2 - let me
> know 
> if the port number issue was indeed the problem.
> 
> Dan
> 
> 
> 
> <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> 
> > I'm not sure why you would want to make the whole thing that
> > complicated.
> > I seem to have no problem getting the producer/consumer example to
> work
> > with these simple steps.
> > 
> > 1) Download the nightly build (with the latest bug fixes) from
> > http://ws.apache.org/muse/nightly/latest/bin/
> > 
> > 2) Run update-install
> > 
> > 3) Double-check the WsResourcePort in the WsResource.wsdl
> (wsn-producer)
> > and the WsnTestClient portType properties (producer_port &
> > consumer_port) are pointing to the right serviceport (according to
> your
> > Tomcat specs).
> > 
> > 4) Use the ant build file to build both project-wars
> > 
> > 5) Deploy and enjoy
> > 
> > But that said did you have a look in the wsn-consumer
> WsnTestClient.java
> > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> your
> > Tomcat setup? To me it sounds like it's looking for a consumer
that's
> > not listening on the given port. I could be wrong.
> > 
> > I know the portTypes have been a cause of some of my problems in
the
> > past.
> > 
> > /Lenni
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> > Sent: 05 February 2007 12:59
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > If you follow the instructions for "Eclipse Development" described
> here 
> > 
> > http://ws.apache.org/muse/source-code.html
> > 
> > you get a separate project in Eclipse for every muse jar-file. You
> can
> > then export each project as a jar-file and replace the ones found
in
> > your MUSE_HOME/modules subdirectories. This way you get the latest
> > bugfixes and updates.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Mon 2/5/2007 1:45 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > You seemed to get farther than I did with the example.  I been able
> to
> > find on the internet that you need to add (#2) below, but your #3.
> > Created new snapshot from SVN.  Could you explain? 
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> > Sent: Monday, February 05, 2007 2:40 AM
> > To: muse-user@ws.apache.org
> > Subject: wsn-producer/consumer example
> > 
> > I have tried to get the wsn-producer/consumer sample to work
without
> > success. I have done the following:
> > 
> > 1. Downloaded 2.1.0 distribution and ran update_install.
> > 
> > 2. Added row <resource-type use-router-persistence="true"> in
> > wsn-consumer muse.xml
> > 
> > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > 
> > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > 
> > 5. Deploy wars on Tomcat without any error messages. Run
> WsnTestClient 
> > 
> > I still get the following error:
> > 
> > INFO: [ID = 'LastPublishFailed'] The last notification published
via
> > wsnt:Notify
> >  failed to reach its destination. The consumer may be unavailable.
> The
> > original
> > error was: null
> > 2007-feb-05 08:17:37
org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > run
> > INFO: Waiting 10 seconds before sending message...
> > 
> > Any ideas?
> > 
> > /Mattias
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


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


RE: wsn-producer/consumer example

Posted by le...@bt.com.
I'm not really sure, if I understand your initial question, so I'll try
to explain it based on the assumption, that it's unclear why you need to
deploy 2 servlets to make the sample work.


For the producer/consumer example, they're mimicking a service
(producer) on a separate machine, which will inform the client machine
(consumer) about changes in its state via a WSDM SOAP message. 
The WsnTestClient-file is just setting up the subscription between the
producer/consumer via the SubscriptionManager.
The actual consumer is the ConsumerCapability/ConsumerCapabilityImpl.

As for the error you're getting, I'm not sure if you deployed both the
producer/consumer wars given the earlier assumption I made. But it seems
that your WsnTestClient is trying to subscribe to your producer service
and getting denied as the service is not available at the specified
location (according to the WsnTestClient.java property and the involved
WSDL-files).

I don't have a clue yet about the error from you Tomcat log files.


Not really sure if this made any sense.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org] 
Sent: 07 February 2007 13:43
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

I'm using the official release and have performed step 2 and here are
the errors I'm getting.  Also could someone explain to me why I need to
run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
WsnTestClient should be the "Consumer".  

In my tomcat5 log file: 

 2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
Servlet.service() for servlet ApacheMuseServlet threw exception
java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found
	at
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
.java:46)
	at
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
	at
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
ava:32)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:183)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:570)


Output from WsnTestClient:

CLIENT TRACE] SOAP envelope contents (outgoing):

<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://128.29.35.11:80
80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
f-066b-ff60b581802c</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:A
ddress>
        </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://128.29.35.11:80
80/wsn-consumer/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://128.29.35.11:8080/wsn-producer/services/WsResource
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:279)
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:235)
        at
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
ribe(NotificationProducerClient.java:96)
        at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Tuesday, February 06, 2007 4:14 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Thank you for your support. I downloaded the nightly build and ran
update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for
Tomcat 
uses the one that's specified in the WsnTestClient.java client. The
port 
is part of the wsa:Address in the producer and consumer EPRs, so if
it's 
wrong, you need to change it (you can do this on the command line or by

modifying the test client code).

I'd also advise against building the source and trying to add the
latest 
bits incrementally - if you want to do a full build, follow the 
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those 
samples has changed in quite a while. You should be able to get them 
working by taking the official release and performing step 2 - let me
know 
if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that
> complicated.
> I seem to have no problem getting the producer/consumer example to
work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl
(wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to
your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer
WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match
your
> Tomcat setup? To me it sounds like it's looking for a consumer that's
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described
here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You
can
> then export each project as a jar-file and replace the ones found in
> your MUSE_HOME/modules subdirectories. This way you get the latest
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able
to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run
WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via
> wsnt:Notify
>  failed to reach its destination. The consumer may be unavailable.
The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




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


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


RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Your other error (the NoSuchMethodError) may be caused because you didn't 
include muse-util-qname.jar in your WAR. wsdl2java should have copied this 
in during code gen, let us know if this is not the case. also, have you 
modified your tomcat or JRE install in anyway? added other jars (which may 
contain javax.xml.namespace.QName) to the common/endorsed libraries? some 
info on your setup would help in tracking this down.

thanks,
Dan



"Callner, David A." <dc...@mitre.org> wrote on 02/07/2007 08:42:47 AM:

> I'm using the official release and have performed step 2 and here are
> the errors I'm getting.  Also could someone explain to me why I need to
> run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
> WsnTestClient should be the "Consumer". 
> 
> In my tomcat5 log file: 
> 
>  2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
> Servlet.service() for servlet ApacheMuseServlet threw exception
> java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
> <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
> found
>    at
> org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
> .java:46)
>    at
> org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
>    at
> org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
> ava:32)
>    at
> org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
> tIsolationLayer.java:183)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
> iServlet.java:36)
>    at
> org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
> 50)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
>    at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
> ationFilterChain.java:237)
>    at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
> terChain.java:157)
>    at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
> ve.java:214)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
> ntextValve.java:198)
>    at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
> ve.java:152)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
> a:137)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
> a:118)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:102)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
> .java:109)
>    at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
> ontext.java:104)
>    at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
> 520)
>    at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
>    at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
>    at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
> 99)
>    at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
> Connection(Http11Protocol.java:705)
>    at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
> 77)
>    at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
> l.java:683)
>    at java.lang.Thread.run(Thread.java:570)
> 
> 
> Output from WsnTestClient:
> 
> CLIENT TRACE] SOAP envelope contents (outgoing):
> 
> <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://128.29.35.11:80
> 80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
> f-066b-ff60b581802c</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:A
> ddress>
>         </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://128.29.35.11:80
> 80/wsn-consumer/services/consumer</wsa:Address>
>             </wsnt:ConsumerReference>
>         </wsnt:Subscribe>
>     </soap:Body>
> </soap:Envelope>
> 
> org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
> response code: 500 for URL:
> http://128.29.35.11:8080/wsn-producer/services/WsResource
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:279)
>         at
> org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
> nt.java:235)
>         at
> org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
> ribe(NotificationProducerClient.java:96)
>         at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Tuesday, February 06, 2007 4:14 AM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Thank you for your support. I downloaded the nightly build and ran
> update_install.bat. The wsn-producer/consumer example worked at once.
> 
> /Mattias
> 
> 
> -----Original Message-----
> From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
> Sent: Mon 2/5/2007 3:18 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> Good catch on the port number - make sure the port you're using for
> Tomcat 
> uses the one that's specified in the WsnTestClient.java client. The
> port 
> is part of the wsa:Address in the producer and consumer EPRs, so if
> it's 
> wrong, you need to change it (you can do this on the command line or by
> 
> modifying the test client code).
> 
> I'd also advise against building the source and trying to add the
> latest 
> bits incrementally - if you want to do a full build, follow the 
> instructions on:
> 
>         http://ws.apache.org/muse/source-code.html
> 
> If you want the latest nightly build, you can get it here:
> 
>         http://ws.apache.org/muse/nightly/latest
> 
> Of course, except for the "step 2" that was added, neither of those 
> samples has changed in quite a while. You should be able to get them 
> working by taking the official release and performing step 2 - let me
> know 
> if the port number issue was indeed the problem.
> 
> Dan
> 
> 
> 
> <le...@bt.com> wrote on 02/05/2007 08:48:58 AM:
> 
> > I'm not sure why you would want to make the whole thing that
> > complicated.
> > I seem to have no problem getting the producer/consumer example to
> work
> > with these simple steps.
> > 
> > 1) Download the nightly build (with the latest bug fixes) from
> > http://ws.apache.org/muse/nightly/latest/bin/
> > 
> > 2) Run update-install
> > 
> > 3) Double-check the WsResourcePort in the WsResource.wsdl
> (wsn-producer)
> > and the WsnTestClient portType properties (producer_port &
> > consumer_port) are pointing to the right serviceport (according to
> your
> > Tomcat specs).
> > 
> > 4) Use the ant build file to build both project-wars
> > 
> > 5) Deploy and enjoy
> > 
> > But that said did you have a look in the wsn-consumer
> WsnTestClient.java
> > and the wsn-producer WsREsource.wsdl to see if the portTypes match
> your
> > Tomcat setup? To me it sounds like it's looking for a consumer that's
> > not listening on the given port. I could be wrong.
> > 
> > I know the portTypes have been a cause of some of my problems in the
> > past.
> > 
> > /Lenni
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> > Sent: 05 February 2007 12:59
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > If you follow the instructions for "Eclipse Development" described
> here 
> > 
> > http://ws.apache.org/muse/source-code.html
> > 
> > you get a separate project in Eclipse for every muse jar-file. You
> can
> > then export each project as a jar-file and replace the ones found in
> > your MUSE_HOME/modules subdirectories. This way you get the latest
> > bugfixes and updates.
> > 
> > -----Original Message-----
> > From: Callner, David A. [mailto:dcallner@mitre.org]
> > Sent: Mon 2/5/2007 1:45 PM
> > To: muse-user@ws.apache.org
> > Subject: RE: wsn-producer/consumer example
> > 
> > You seemed to get farther than I did with the example.  I been able
> to
> > find on the internet that you need to add (#2) below, but your #3.
> > Created new snapshot from SVN.  Could you explain? 
> > 
> > -----Original Message-----
> > From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> > Sent: Monday, February 05, 2007 2:40 AM
> > To: muse-user@ws.apache.org
> > Subject: wsn-producer/consumer example
> > 
> > I have tried to get the wsn-producer/consumer sample to work without
> > success. I have done the following:
> > 
> > 1. Downloaded 2.1.0 distribution and ran update_install.
> > 
> > 2. Added row <resource-type use-router-persistence="true"> in
> > wsn-consumer muse.xml
> > 
> > 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> > (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> > 
> > 4. Rebuild wars for wsn-consumer and wsn-producer.
> > 
> > 5. Deploy wars on Tomcat without any error messages. Run
> WsnTestClient 
> > 
> > I still get the following error:
> > 
> > INFO: [ID = 'LastPublishFailed'] The last notification published via
> > wsnt:Notify
> >  failed to reach its destination. The consumer may be unavailable.
> The
> > original
> > error was: null
> > 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> > run
> > INFO: Waiting 10 seconds before sending message...
> > 
> > Any ideas?
> > 
> > /Mattias
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: muse-user-help@ws.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
I'm using the official release and have performed step 2 and here are
the errors I'm getting.  Also could someone explain to me why I need to
run to web servlets (Wsn-Producer) and (Wsn-Consumer).  The
WsnTestClient should be the "Consumer".  

In my tomcat5 log file: 

 2007-02-07 08:34:31 StandardWrapperValve[ApacheMuseServlet]:
Servlet.service() for servlet ApacheMuseServlet threw exception
java.lang.NoSuchMethodError: javax.xml.namespace.QName: method
<init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V not
found
	at
org.apache.muse.ws.addressing.soap.SoapConstants.<clinit>(SoapConstants
.java:46)
	at
org.apache.muse.ws.addressing.soap.SoapFault.<init>(SoapFault.java:40)
	at
org.apache.muse.ws.addressing.soap.SoapUtils.convertToFault(SoapUtils.j
ava:32)
	at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(Abstrac
tIsolationLayer.java:183)
	at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(Min
iServlet.java:36)
	at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:
50)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
ationFilterChain.java:237)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terChain.java:157)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.java:214)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCo
ntextValve.java:198)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.java:152)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:137)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:118)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:102)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.java:109)
	at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveC
ontext.java:104)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
520)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
	at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
	at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:7
99)
	at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Connection(Http11Protocol.java:705)
	at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
77)
	at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.java:683)
	at java.lang.Thread.run(Thread.java:570)


Output from WsnTestClient:

CLIENT TRACE] SOAP envelope contents (outgoing):

<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://128.29.35.11:80
80/wsn-producer/services/WsResource</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:1c80b0af-b583-736
f-066b-ff60b581802c</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:A
ddress>
        </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://128.29.35.11:80
80/wsn-consumer/services/consumer</wsa:Address>
            </wsnt:ConsumerReference>
        </wsnt:Subscribe>
    </soap:Body>
</soap:Envelope>

org.apache.muse.ws.addressing.soap.SoapFault: Server returned HTTP
response code: 500 for URL:
http://128.29.35.11:8080/wsn-producer/services/WsResource
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:279)
        at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClie
nt.java:235)
        at
org.apache.muse.ws.notification.remote.NotificationProducerClient.subsc
ribe(NotificationProducerClient.java:96)
        at org.apache.muse.test.wsn.WsnTestClient.main(Unknown Source)

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Tuesday, February 06, 2007 4:14 AM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

Thank you for your support. I downloaded the nightly build and ran
update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for
Tomcat 
uses the one that's specified in the WsnTestClient.java client. The
port 
is part of the wsa:Address in the producer and consumer EPRs, so if
it's 
wrong, you need to change it (you can do this on the command line or by

modifying the test client code).

I'd also advise against building the source and trying to add the
latest 
bits incrementally - if you want to do a full build, follow the 
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those 
samples has changed in quite a while. You should be able to get them 
working by taking the official release and performing step 2 - let me
know 
if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that
> complicated.
> I seem to have no problem getting the producer/consumer example to
work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl
(wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to
your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer
WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match
your
> Tomcat setup? To me it sounds like it's looking for a consumer that's
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described
here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You
can
> then export each project as a jar-file and replace the ones found in
> your MUSE_HOME/modules subdirectories. This way you get the latest
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able
to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run
WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via
> wsnt:Notify
>  failed to reach its destination. The consumer may be unavailable.
The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




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


RE: wsn-producer/consumer example

Posted by Rosberg Mattias <Ma...@tetrapak.com>.
Thank you for your support. I downloaded the nightly build and ran update_install.bat. The wsn-producer/consumer example worked at once.

/Mattias


-----Original Message-----
From: Daniel Jemiolo [mailto:danjemiolo@us.ibm.com]
Sent: Mon 2/5/2007 3:18 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
Good catch on the port number - make sure the port you're using for Tomcat 
uses the one that's specified in the WsnTestClient.java client. The port 
is part of the wsa:Address in the producer and consumer EPRs, so if it's 
wrong, you need to change it (you can do this on the command line or by 
modifying the test client code).

I'd also advise against building the source and trying to add the latest 
bits incrementally - if you want to do a full build, follow the 
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those 
samples has changed in quite a while. You should be able to get them 
working by taking the official release and performing step 2 - let me know 
if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that
> complicated.
> I seem to have no problem getting the producer/consumer example to work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl (wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match your
> Tomcat setup? To me it sounds like it's looking for a consumer that's
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You can
> then export each project as a jar-file and replace the ones found in
> your MUSE_HOME/modules subdirectories. This way you get the latest
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via
> wsnt:Notify
>  failed to reach its destination. The consumer may be unavailable. The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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




RE: wsn-producer/consumer example

Posted by Daniel Jemiolo <da...@us.ibm.com>.
Good catch on the port number - make sure the port you're using for Tomcat 
uses the one that's specified in the WsnTestClient.java client. The port 
is part of the wsa:Address in the producer and consumer EPRs, so if it's 
wrong, you need to change it (you can do this on the command line or by 
modifying the test client code).

I'd also advise against building the source and trying to add the latest 
bits incrementally - if you want to do a full build, follow the 
instructions on:

        http://ws.apache.org/muse/source-code.html

If you want the latest nightly build, you can get it here:

        http://ws.apache.org/muse/nightly/latest

Of course, except for the "step 2" that was added, neither of those 
samples has changed in quite a while. You should be able to get them 
working by taking the official release and performing step 2 - let me know 
if the port number issue was indeed the problem.

Dan



<le...@bt.com> wrote on 02/05/2007 08:48:58 AM:

> I'm not sure why you would want to make the whole thing that
> complicated.
> I seem to have no problem getting the producer/consumer example to work
> with these simple steps.
> 
> 1) Download the nightly build (with the latest bug fixes) from
> http://ws.apache.org/muse/nightly/latest/bin/
> 
> 2) Run update-install
> 
> 3) Double-check the WsResourcePort in the WsResource.wsdl (wsn-producer)
> and the WsnTestClient portType properties (producer_port &
> consumer_port) are pointing to the right serviceport (according to your
> Tomcat specs).
> 
> 4) Use the ant build file to build both project-wars
> 
> 5) Deploy and enjoy
> 
> But that said did you have a look in the wsn-consumer WsnTestClient.java
> and the wsn-producer WsREsource.wsdl to see if the portTypes match your
> Tomcat setup? To me it sounds like it's looking for a consumer that's
> not listening on the given port. I could be wrong.
> 
> I know the portTypes have been a cause of some of my problems in the
> past.
> 
> /Lenni
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: 05 February 2007 12:59
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> If you follow the instructions for "Eclipse Development" described here 
> 
> http://ws.apache.org/muse/source-code.html
> 
> you get a separate project in Eclipse for every muse jar-file. You can
> then export each project as a jar-file and replace the ones found in
> your MUSE_HOME/modules subdirectories. This way you get the latest
> bugfixes and updates.
> 
> -----Original Message-----
> From: Callner, David A. [mailto:dcallner@mitre.org]
> Sent: Mon 2/5/2007 1:45 PM
> To: muse-user@ws.apache.org
> Subject: RE: wsn-producer/consumer example
> 
> You seemed to get farther than I did with the example.  I been able to
> find on the internet that you need to add (#2) below, but your #3.
> Created new snapshot from SVN.  Could you explain? 
> 
> -----Original Message-----
> From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
> Sent: Monday, February 05, 2007 2:40 AM
> To: muse-user@ws.apache.org
> Subject: wsn-producer/consumer example
> 
> I have tried to get the wsn-producer/consumer sample to work without
> success. I have done the following:
> 
> 1. Downloaded 2.1.0 distribution and ran update_install.
> 
> 2. Added row <resource-type use-router-persistence="true"> in
> wsn-consumer muse.xml
> 
> 3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
> (2.1.0) jars in modules folders with snapshot 2.2.0 jars.
> 
> 4. Rebuild wars for wsn-consumer and wsn-producer.
> 
> 5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 
> 
> I still get the following error:
> 
> INFO: [ID = 'LastPublishFailed'] The last notification published via
> wsnt:Notify
>  failed to reach its destination. The consumer may be unavailable. The
> original
> error was: null
> 2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
> run
> INFO: Waiting 10 seconds before sending message...
> 
> Any ideas?
> 
> /Mattias
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: muse-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: muse-user-help@ws.apache.org
> 


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


RE: wsn-producer/consumer example

Posted by le...@bt.com.
I'm not sure why you would want to make the whole thing that
complicated.
I seem to have no problem getting the producer/consumer example to work
with these simple steps.

1) Download the nightly build (with the latest bug fixes) from
http://ws.apache.org/muse/nightly/latest/bin/

2) Run update-install

3) Double-check the WsResourcePort in the WsResource.wsdl (wsn-producer)
and the WsnTestClient portType properties (producer_port &
consumer_port) are pointing to the right serviceport (according to your
Tomcat specs).

4) Use the ant build file to build both project-wars

5) Deploy and enjoy

But that said did you have a look in the wsn-consumer WsnTestClient.java
and the wsn-producer WsREsource.wsdl to see if the portTypes match your
Tomcat setup? To me it sounds like it's looking for a consumer that's
not listening on the given port. I could be wrong.

I know the portTypes have been a cause of some of my problems in the
past.

/Lenni

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: 05 February 2007 12:59
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example

If you follow the instructions for "Eclipse Development" described here 

http://ws.apache.org/muse/source-code.html

you get a separate project in Eclipse for every muse jar-file. You can
then export each project as a jar-file and replace the ones found in
your MUSE_HOME/modules subdirectories. This way you get the latest
bugfixes and updates.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Mon 2/5/2007 1:45 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
You seemed to get farther than I did with the example.  I been able to
find on the internet that you need to add (#2) below, but your #3.
Created new snapshot from SVN.  Could you explain? 

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Monday, February 05, 2007 2:40 AM
To: muse-user@ws.apache.org
Subject: wsn-producer/consumer example

I have tried to get the wsn-producer/consumer sample to work without
success. I have done the following:

1. Downloaded 2.1.0 distribution and ran update_install.

2. Added row <resource-type use-router-persistence="true"> in
wsn-consumer muse.xml

3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
(2.1.0) jars in modules folders with snapshot 2.2.0 jars.

4. Rebuild wars for wsn-consumer and wsn-producer.

5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 

I still get the following error:

INFO: [ID = 'LastPublishFailed'] The last notification published via
wsnt:Notify
 failed to reach its destination. The consumer may be unavailable. The
original
error was: null
2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
run
INFO: Waiting 10 seconds before sending message...

Any ideas?

/Mattias


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




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


RE: wsn-producer/consumer example

Posted by Rosberg Mattias <Ma...@tetrapak.com>.
If you follow the instructions for "Eclipse Development" described here 

http://ws.apache.org/muse/source-code.html

you get a separate project in Eclipse for every muse jar-file. You can then export each project as a jar-file and replace the ones found in your MUSE_HOME/modules subdirectories. This way you get the latest bugfixes and updates.

-----Original Message-----
From: Callner, David A. [mailto:dcallner@mitre.org]
Sent: Mon 2/5/2007 1:45 PM
To: muse-user@ws.apache.org
Subject: RE: wsn-producer/consumer example
 
You seemed to get farther than I did with the example.  I been able to
find on the internet that you need to add (#2) below, but your #3.
Created new snapshot from SVN.  Could you explain? 

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Monday, February 05, 2007 2:40 AM
To: muse-user@ws.apache.org
Subject: wsn-producer/consumer example

I have tried to get the wsn-producer/consumer sample to work without
success. I have done the following:

1. Downloaded 2.1.0 distribution and ran update_install.

2. Added row <resource-type use-router-persistence="true"> in
wsn-consumer muse.xml

3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
(2.1.0) jars in modules folders with snapshot 2.2.0 jars.

4. Rebuild wars for wsn-consumer and wsn-producer.

5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 

I still get the following error:

INFO: [ID = 'LastPublishFailed'] The last notification published via
wsnt:Notify
 failed to reach its destination. The consumer may be unavailable. The
original
error was: null
2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
run
INFO: Waiting 10 seconds before sending message...

Any ideas?

/Mattias


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




RE: wsn-producer/consumer example

Posted by "Callner, David A." <dc...@mitre.org>.
You seemed to get farther than I did with the example.  I been able to
find on the internet that you need to add (#2) below, but your #3.
Created new snapshot from SVN.  Could you explain? 

-----Original Message-----
From: Rosberg Mattias [mailto:Mattias.Rosberg@tetrapak.com] 
Sent: Monday, February 05, 2007 2:40 AM
To: muse-user@ws.apache.org
Subject: wsn-producer/consumer example

I have tried to get the wsn-producer/consumer sample to work without
success. I have done the following:

1. Downloaded 2.1.0 distribution and ran update_install.

2. Added row <resource-type use-router-persistence="true"> in
wsn-consumer muse.xml

3. Created new muse.xxx-snapshot-2.2.0.jars from SVN. Replaced old
(2.1.0) jars in modules folders with snapshot 2.2.0 jars.

4. Rebuild wars for wsn-consumer and wsn-producer.

5. Deploy wars on Tomcat without any error messages. Run WsnTestClient 

I still get the following error:

INFO: [ID = 'LastPublishFailed'] The last notification published via
wsnt:Notify
 failed to reach its destination. The consumer may be unavailable. The
original
error was: null
2007-feb-05 08:17:37 org.apache.ws.muse.test.wsrf.MyCapabilityImpl$1
run
INFO: Waiting 10 seconds before sending message...

Any ideas?

/Mattias


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