[Users] JMS to SOAP problem
veraniego
franki.verano at gmail.com
Wed Mar 16 10:40:35 CET 2011
Hello,
I'm using Petals 3.0.3 and ActiveMQ...
And this is my scenary: Java client --> ActiveMQ --> JMS BC Consumer Queue (Petals) --> SOAP BC Provider --> External Web Service
I receive this Warning and monitoring with TCPMon I watch that I don't receive any message in my SOAP endpoint....
WARNING 2010-03-08 12:11:15,656 [Petals.Container.Components.petals-bc-soap]
Catch an exception on the WS invocation : null
<jbi:consumes
interface-name="generatedNs:Contador"
service-name="generatedNs:ContadorService"
endpoint-name="Contador">
<!-- CDK specific elements -->
<petalsCDK:mep>InOnly</petalsCDK:mep>
<!-- Component specific elements -->
<jms:jndi-provider-url>tcp://localhost:61616</jms:jndi-provider-url>
<jms:jndi-initial-context-factory>org.apache.activemq.jndi.ActiveMQInitialContextFactory</jms:jndi-initial-context-factory>
<jms:jndi-destination-name>dynamicQueues/PEtALSQueue</jms:jndi-destination-name>
<jms:jndi-connection-factory>ConnectionFactory</jms:jndi-connection-factory>
<jms:transacted>false</jms:transacted>
</jbi:consumes>
<jbi:provides
interface-name="generatedNs:Contador"
service-name="generatedNs:ContadorService"
endpoint-name="Contador">
<!-- CDK specific elements -->
<petalsCDK:wsdl>wsdl.wsdl</petalsCDK:wsdl>
<!-- Component specific elements -->
<soap:address>http://localhost:8082/ContadorWS/services/Contador</soap:address>
<soap:soap-version>1.1</soap:soap-version>
<soap:add-root>false</soap:add-root>
<soap:chunked-mode>false</soap:chunked-mode>
<soap:cleanup-transport>true</soap:cleanup-transport>
<soap:mode>SOAP</soap:mode>
</jbi:provides>
Client:
String username = "root";
String password = "root";
String queueName = "dynamicQueues/PEtALSQueue";
Properties env = new Properties( );
env.put(Context.SECURITY_PRINCIPAL, username);
env.put(Context.SECURITY_CREDENTIALS, password);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.activemq.jndi.ActiveMQInitialContextFactory");
env.put(Context.PROVIDER_URL,
"tcp://localhost:61616");
InitialContext jndi = new InitialContext(env);
QueueConnectionFactory connectionFactory = (QueueConnectionFactory)jndi.lookup("QueueConnectionFactory");
// Create a JMS connection
QueueConnection queueConnection = connectionFactory.createQueueConnection(username,password);
QueueSession queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
Queue requestQueue = (Queue)jndi.lookup(queueName);
QueueSender queueSender = queueSession.createSender(requestQueue);
Destination tempResponseQueue = queueSession.createTemporaryQueue();
MessageConsumer responseMessageConsumer = queueSession.createConsumer(tempResponseQueue);
// Set up JMS requestMessage
TextMessage msg = queueSession.createTextMessage();
msg.setText(body);
msg.setJMSReplyTo(tempResponseQueue);
// Start connection, send the message and wait for a response
queueConnection.start();
queueSender.send(msg);
Message responseMessage = (Message) responseMessageConsumer.receive();
...
Some help pease!! thanks!!
-------------------- m2f --------------------
Subscribe/Unsubscribe emails notifications.
Response to this email will be posted on the Petals forum.
Please delete the existing text before responding :)
Read the topic online:
http://forum.petalslink.com/viewtopic.php?p=30529#30529
-------------------- m2f --------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://forum-list.petalslink.org/pipermail/users/attachments/20110316/7191668a/attachment.htm>
More information about the Users
mailing list