Forum Discussion
Yes, it is a SOAP type request
Just going thru your previous messages once again.
For now, disable JMS Status assertion, and do script assertion. Does it sound good?
- AlexDa9 years agoOccasional Contributor
The JMS Status assertion is deactivated. A script assertion was my intention, but I have no idea how to catch the JMSSecurity exception object that is thrown by the AMQ server. If you take a look at the SoapUI source code, you will see that the JMS Status assertion treats the exception (name is jmse), by printing the message inside the exception object to the log. I would want to somehow take that message and to perform some kind of parsing on it (like if the message is: "Username/password used is not valid" than the custom assertion should pass)
- nmrao9 years agoChampion Level 3Hmm.
Can you please show the raw response? Please make sure the jms status assertion is disabled before hitting the ws call.- AlexDa9 years agoOccasional Contributor
"vThere is no raw response. The AMQ doesn't return any kind of message, except by sending, somehow, a serialised exception object to SoapUI. SoapUI ,then, treats the exception by printing the error message in the error log and in the JMS status assertion.
The stack trace in the SoapUI error log prints:
Wed Feb 24 15:11:01 EET 2016:ERROR:javax.jms.JMSException: User application1 is not authorized to create: queue://TestReadWriteQueue.test10
javax.jms.JMSException: User application1 is not authorized to create: queue://TestReadWriteQueue.test10
at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:49)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1377)
at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1305)
at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1795)
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:277)
at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:212)
at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:269)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.send(HermesJmsRequestTransport.java:239)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.messageSend(HermesJmsRequestTransport.java:226)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestSendTransport.execute(HermesJmsRequestSendTransport.java:44)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.sendRequest(HermesJmsRequestTransport.java:77)
at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.SecurityException: User application1 is not authorized to create: queue://TestReadWriteQueue.test10
at org.apache.activemq.security.AuthorizationBroker.addDestination(AuthorizationBroker.java:115)
at org.apache.activemq.broker.MutableBrokerFilter.addDestination(MutableBrokerFilter.java:178)
at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:462)
at org.apache.activemq.broker.jmx.ManagedRegionBroker.send(ManagedRegionBroker.java:296)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:153)
at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:293)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:153)
at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:153)
at org.apache.activemq.security.AuthorizationBroker.send(AuthorizationBroker.java:223)
at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:158)
at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:547)
at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:768)
at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:339)
at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:188)
at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:125)
at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:300)
at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)
at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
at java.lang.Thread.run(Thread.java:722)Don't get me wrong, it's good that I get no response, as I am doing negative testing ( verifiying that wrong username/password combo doesn't work). My issue is that I have no way of validating the result, as the default JMS Status assertion fails ( and if I insert these tests into Jenkins I will have bad statistics). I want a custom script assertion that doesn't fail when AMQ responds with "User application1 is not authorized to create: queue://TestReadWriteQueue.test10"
Related Content
Recent Discussions
- 5 days agoemoya