Forum Discussion

AlexDa's avatar
AlexDa
Occasional Contributor
9 years ago

How do I retrieve a JMS Security exception object in SoapUI?

How do I retrieve a JMS Security exception object in SoapUI, to extract and parse the message in groovy script? The default JMS Status assertion is not suitable, as I would like to test a negative scenario, such as having the wrong username/password when reading/writing on a queue. I want the custom assertion to pass, by parsing the message from the exception object and validating it.

10 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Are you using jms to send a soap message? which vendor?
  • AlexDa's avatar
    AlexDa
    Occasional Contributor

    I am sending a trying to read from a JMS queue ( Apache ActiveMQ), but I have invalid username/password combo. The broker responds with a JMSSecurityExceptions object, that is processed by the SoapUI source code and I get the message body form the exception object in the JMS Status assertion, but the assertion fails. I want to create a script assertion, that retrieves the object and parses the message from the object, and if it contains something like "user/pass invalid", the assertion should pass.

    • nmrao's avatar
      nmrao
      Champion Level 3
      I meant Is it a soap request type test step?
      • AlexDa's avatar
        AlexDa
        Occasional Contributor

        Yes, it is a SOAP type request