You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michele Mazzucco <Mi...@ncl.ac.uk> on 2007/08/10 14:04:06 UTC

Re: {Disarmed} Re: soap over jms

ok, but it does not work :(

./synapse.sh
Starting Synapse/Java ...
Using SYNAPSE_HOME:    /home/nmm42/devel/apps/synapse-1.0
Using JAVA_HOME:       /usr/java/jdk1.6.0_01
Using SYNAPSE_XML:
-Dsynapse.xml=/home/nmm42/devel/apps/synapse-1.0/repository/conf/synapse.xml
[SynapseServer] Using the Axis2
Repository /home/nmm42/devel/apps/synapse-1.0/repository
[main] INFO  SynapseModule - Initializing the Synapse configuration ...
[main] INFO  XMLConfigurationBuilder - Generating the Synapse
configuration model by parsing the XML configuration
[main] INFO  SynapseConfigurationBuilder - Loaded Synapse configuration
from : /home/nmm42/devel/apps/synapse-1.0/repository/conf/synapse.xml
[main] INFO  SynapseModule - Deploying the Synapse service..
[main] INFO  SynapseModule - Initializing Sandesha 2...
[main] INFO  SynapseModule - Deploying Proxy services...
[main] INFO  SynapseModule - Synapse initialized successfully...!
[main] INFO  HttpCoreNIOSender - HTTPS Sender starting
[main] INFO  HttpCoreNIOSender - HTTP Sender starting
[main] INFO  HttpCoreNIOListener - HTTPS Listener starting on port :
8443
[SynapseServer] Starting transport https on port 8443
[main] INFO  HttpCoreNIOListener - HTTP Listener starting on port : 8080
[SynapseServer] Starting transport http on port 8080
[main] ERROR JMSConnectionFactory - Error creating a JMS connection
using the factory : QueueConnectionFactory
javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection
refused
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:280)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:214)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:161)
        at
org.apache.axis2.transport.jms.JMSConnectionFactory.listen(JMSConnectionFactory.java:308)
        at
org.apache.axis2.transport.jms.JMSListener.start(JMSListener.java:300)
        at
org.apache.axis2.engine.ListenerManager.addListener(ListenerManager.java:209)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:78)
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:335)
        at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:303)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:49)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:66)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
        ... 6 more
org.apache.axis2.transport.jms.AxisJMSException: Error creating a JMS
connection using the factory : QueueConnectionFactory
        at
org.apache.axis2.transport.jms.JMSConnectionFactory.handleException(JMSConnectionFactory.java:449)
        at
org.apache.axis2.transport.jms.JMSConnectionFactory.listen(JMSConnectionFactory.java:310)
        at
org.apache.axis2.transport.jms.JMSListener.start(JMSListener.java:300)
        at
org.apache.axis2.engine.ListenerManager.addListener(ListenerManager.java:209)
        at org.apache.synapse.SynapseServer.main(SynapseServer.java:78)
Caused by: javax.jms.JMSException: Could not connect to broker URL:
tcp://localhost:61616. Reason: java.net.ConnectException: Connection
refused
        at
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:33)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:280)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:214)
        at
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:161)
        at
org.apache.axis2.transport.jms.JMSConnectionFactory.listen(JMSConnectionFactory.java:308)
        ... 3 more
Caused by: java.net.ConnectException: Connection refused
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at
org.apache.activemq.transport.tcp.TcpTransport.connect(TcpTransport.java:335)
        at
org.apache.activemq.transport.tcp.TcpTransport.doStart(TcpTransport.java:303)
        at
org.apache.activemq.util.ServiceSupport.start(ServiceSupport.java:49)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.WireFormatNegotiator.start(WireFormatNegotiator.java:66)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.transport.TransportFilter.start(TransportFilter.java:54)
        at
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
        ... 6 more
[SynapseServer] Startup failed...
                                                                   
synapse.xml is the default one, while in axis2.xml I've enabled the jms
listener with this parameter

<parameter name="default" locked="false">
        	<parameter name="java.naming.factory.initial"
locked="false">org.apache.activemq.jndi.ActiveMQInitialContextFactory</parameter>
        	<parameter name="java.naming.provider.url"
locked="false">tcp://localhost:61616</parameter>
        	<parameter name="transport.jms.ConnectionFactoryJNDIName"
locked="false">QueueConnectionFactory</parameter>
        </parameter>

Any idea?

Michele

On Fri, 2007-08-10 at 17:24 +0530, Asankha C. Perera wrote:
> Michele
> 
> Yes, you could. But we haven't done it since it would increase the
> size of the Synapse core download. 
> 
> asankha
> 
> Michele Mazzucco wrote: 
> > Paul,
> > 
> > thanks very much for your explanation. 
> > Just a quick question now. Can I embed ActiveMQ into Synapse?
> > 
> > 
> > Thanks,
> > Michele
> > 
> > On Thu, 2007-08-09 at 18:35 +0100, Paul Fremantle wrote:
> >   
> > > Michele
> > > 
> > > So the JMS transport supports SOAP/JMS, I believe this uses the
> > > standard (which was posted to axis-dev a while back by Glen Daniels),
> > > also XML/JMS, text and binary too.
> > > 
> > > Synapse can switch between these. Basically it represents text and
> > > binary using special wrapper elements in the message <binary
> > > xmlns=MailScanner has detected a possible fraud attempt from "ws.apache.org" claiming to be "http://ws.apache.org/commons/ns/payload">.
> > > 
> > > The samples show how to switch from a SOAP/HTTP to XML/JMS message.
> > > http://ws.apache.org/synapse/Synapse_Samples.html#Transport
> > > 
> > > Paul
> > > 
> > > On 8/9/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > >     
> > > > Ok, sorry Paul :).
> > > > I simply meant if there's anything special I should know in order to use
> > > > pure JMS inside my web service running on top of axis2/synapse, i.e. I
> > > > guess I should use a TextMessage if I want to forward a message
> > > > somewhere. What shall the it include?, just the SOAP body or the full
> > > > envelope?
> > > > Does it make sense to mix pure JMS and SOAP or it's better to split
> > > > these tasks? If I split them, what about inter-leavings and other time
> > > > related problems?
> > > > 
> > > > Thanks,
> > > > Michele
> > > > 
> > > > On Thu, 2007-08-09 at 14:55 +0100, Paul Fremantle wrote:
> > > >       
> > > > > I didn't understand part two of question #1!!!!
> > > > > 
> > > > > Synapse can also do load-balancing based on Axis2 sessions with
> > > > > affinity, so each request goes to the server that initiated the
> > > > > session.
> > > > > 
> > > > > Paul
> > > > > 
> > > > > On 8/9/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > >         
> > > > > > Paul,
> > > > > > 
> > > > > > thanks very much for the quick answer. However my idea about the proxy
> > > > > > was a bit different, that is the proxy is used to address fault
> > > > > > tolerance issues (at least at this stage), not for performance reasons.
> > > > > > The rationale is that my web service is statefull and it looks to me
> > > > > > that keeping the replica in sync would be very messy as the load
> > > > > > increases (and beyond a certain point it would be infeasible).
> > > > > > I've notice you didn't reply to the second part of question #1, so I
> > > > > > guess I can do it the usual way (i.e. via MessageListener on the
> > > > > > receiver side for async processing).
> > > > > > 
> > > > > > Thanks,
> > > > > > Michele
> > > > > > 
> > > > > > 
> > > > > > On Thu, 2007-08-09 at 13:47 +0100, Paul Fremantle wrote:
> > > > > >           
> > > > > > > Michele
> > > > > > > 
> > > > > > > You could use Apache Synapse (ws.apache.org/synapse). It can take
> > > > > > > XML/SOAP over HTTP requests and forward them to JMS. No coding
> > > > > > > required. It can also perform load-balancing. You could do round-robin
> > > > > > > DNS to Synapse to spread the load to a pair of Synapse servers or just
> > > > > > > have one. It can handle fairly high loads on its own.
> > > > > > > 
> > > > > > > Paul
> > > > > > > 
> > > > > > > On 8/9/07, Michele Mazzucco <Mi...@ncl.ac.uk> wrote:
> > > > > > >             
> > > > > > > > Hi all,
> > > > > > > > 
> > > > > > > > I want use both SOAP over HTTP and SOAP over JMS (topic with multiple
> > > > > > > > subscribers) but it's not very clear how to achieve my goal.
> > > > > > > > I want to put a sort of proxy/load balancer in front of my distributed
> > > > > > > > app to receive HTTP requests and forward them via JMS to a replicated
> > > > > > > > web service.
> > > > > > > > Here are my questions:
> > > > > > > > 1 - How do I configure axis2 assuming it runs inside tomcat? I guess the
> > > > > > > > transport is completely transparent to my app, but what about if I want
> > > > > > > > to use JMS to accomplish other tasks?
> > > > > > > > 2 - What do you suggest to use as proxy (I'll eventually need to modify
> > > > > > > > it in order to detect and react to node crashes).
> > > > > > > > 
> > > > > > > > 
> > > > > > > > Thanks,
> > > > > > > > Michele
> > > > > > > > 
> > > > > > > > 
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > > > 
> > > > > > > > 
> > > > > > > >               
> > > > > > >             
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > > > 
> > > > > > 
> > > > > >           
> > > > >         
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: axis-user-help@ws.apache.org
> > > > 
> > > > 
> > > >       
> > >     
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> > 
> > 
> >   
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For
> additional commands, e-mail: axis-user-help@ws.apache.org


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


Re: {Disarmed} Re: soap over jms

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Asankha,

maybe I didn't get your point. I've added the needed libs and configured
the embedded axis engine. What else shall I do?

Michele

On Fri, 2007-08-10 at 17:55 +0530, Asankha C. Perera wrote:
> Michele
> > ok, but it does not work :(
> >   
> Yes.. not with a default SVN download or with the 1.0 release.. thats
> why I said that:
> 
> > > Yes, you could. But we haven't done it since it would increase the
> > > size of the Synapse core download. 
> > >     
> asankha
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For
> additional commands, e-mail: axis-user-help@ws.apache.org


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