Forum Discussion

omrzljak's avatar
omrzljak
Occasional Contributor
15 years ago

More controle over JMS message type needed

Hello,

JMS support for JMS test cases and mock service (as described in http://www.eviware.com/forums/index.php?topic=3129.0 )  works well with JMS services using JMS Text message. You can easy switch between http and jms transport and all your test case are still useful.

Problem is when a (not soapui ) client or service use jms byte messages (such as IBM WCF Channel for MQ) as transport. The problem in soapui is that response soap message which is of type byte message is put in response attachment. That  makes it impossible for use with response assertions. Also when we call (from a soapui test case) a JMS service which requires jms byte message we have to make a test request with soap message in attachment which makes the usage of request validation and dynamic params impossible.

In http://www.soapui.org/tutorials/jms/jms-tutorial.html is described how soapui decides when to make byte message.

Why is JMSMessagType request param ignored in this case? That should be the way to control what type of message is made.

How can I prevent soapui to set soap response from byte message in a attachment (in response)?

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    thanks for your post.
    I put this in our backlog ,will look into this and let you know.

    Regards
    nebojsa
    eviware.com
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    you can check tomorrows nightly build , where we added support for BytesMessages from response.
    So, if BytesMessage payload is xml than its payload will be visible like response xml content ,not as attachment.
    Also receiving  MapMessage is visible in xml content.

    Hope this helps

    Regards
    Nebojsa
    eviware.com
  • Is there any way to convert text messages to Bytes?  We have to modify the contents of the attachment every execution, so wrapping it as a BytesMessage statically isn't feasible.

    Currently we are using Jython in HermesJMS to create a BytesMessage object and read the XML file in as a stream.  Is this something that can be reproduced in Groovy (we haven't looked into that at all). I've been looking for a more...elegant...solution and we enjoy the TestSuite features SoapUI has when we test WebServices. 
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,


    Thanks for your post. This is very good idea which will be available from tomorrow
    Use our nightly build http://www.eviware.com/nightly-builds/  tomorrow morning and check this new feature.
    So, just check Send As BytesMessage in JMS Header inspector, and your message will be converted and sent as BytesMessage. On the other way when you receive BytesMessage if its payload seem to be xml it will be converted back to xml and be visible in xml view , and available for assertion etc..

    Hope this helps

    regards
    Nebojsa
    eviware.com