Forum Discussion

NishantJadhav's avatar
NishantJadhav
Occasional Contributor
9 years ago

Can we combine multiple soap request in single WSDL

We've single WSDL with one operation, however we want to hit multiple SOAP over JMS steps and TIBCO steps,

in single suite.

 

Is this possible?

 

Also

Will common JMS headers/properties work for both.?

 

commune  admin

  • nmrao's avatar
    nmrao
    9 years ago

    Here are the assumptions I have based on your reply. Correct / Add more details otherwise.

     

    • As you mentioned, you got one wsdl with an operation. So you want to test this single operation using both http, jms.
    • I believe that you need to include JMS headers like JMSReplyTo or correlationId etc(or something else) when it is jms communication, and these aren't needed when it is http transport.
    • Considering first point, the soap request is same in both the transports.
    • You mentioned TIBCO earlier without much details. Hoping that you mean TIBCO EMS as jms is pointed.
    1. Yes, it is possible to achieve this. SoapUI uses HermesJMS to connect to different JMS vendors. So, you need to configure it so that it can connect to targetted JMS server.
    2. In the service interface, add the endpoint, say, ${#Project#SERVICE1_ENDPOINT}, assign it to test steps and remove other endpoint which might have fixed value.
    3. Add the following project properties

     

    • HTTP_SERVICE1_ENDPOINT, say its value http://<hostname>:<port>/<rest of endpoint url>  - replace the actual value
    • JMS_SERVICE1_ENDPOINT, say its value jms://JMS_SESSION_ID::queue_<send queue name>::queue_<receiver queue name> - replace values
    • SOAP_PROTOCOL, say its possible values - http or jms that you can decide just before running the tests. Based on this, we have to set the value for SERVICE1_ENDPOINT  as either HTTP_SERVICE1_ENDPOINT or JMS_SERVICE1_ENDPOINT dynamically. This you can decide when you want to set like on Project Load script / Test Suite setup script / Test Case setup script. Here hoping that you know how to set a project property conditionally. This will avoid changing endpoint each time in each test step.

    Here JMS_SESSION_ID is the same value that is provided in the hermes-config.xml file.

     

    4. Regarding headers:

    You can use events  - test step before run - add needed headers to the request based on SOAP_PROTOCOL value. Since you are checking condition here, you can set only required headers dynamically.

     

    Hope this helps.

  • nmrao's avatar
    nmrao
    Champion Level 3
    Do you mean to say that you want to run the test over HTTP and JMS? clarify otherwise?
    Also what you mean by TIBCO steps?
    • NishantJadhav's avatar
      NishantJadhav
      Occasional Contributor

      Thank you for your reply nmrao

       

       

      We have SOAP over JMS and SOAP over HTTP, where SOAP headers are diffrent for each.

      So can we invoke both services using same common headers, since headers we are passing through JMS properties and SOAP request only has envelop body.

       

      Please help.

       

      Thanks once again

      Nishant

      • nmrao's avatar
        nmrao
        Champion Level 3

        Here are the assumptions I have based on your reply. Correct / Add more details otherwise.

         

        • As you mentioned, you got one wsdl with an operation. So you want to test this single operation using both http, jms.
        • I believe that you need to include JMS headers like JMSReplyTo or correlationId etc(or something else) when it is jms communication, and these aren't needed when it is http transport.
        • Considering first point, the soap request is same in both the transports.
        • You mentioned TIBCO earlier without much details. Hoping that you mean TIBCO EMS as jms is pointed.
        1. Yes, it is possible to achieve this. SoapUI uses HermesJMS to connect to different JMS vendors. So, you need to configure it so that it can connect to targetted JMS server.
        2. In the service interface, add the endpoint, say, ${#Project#SERVICE1_ENDPOINT}, assign it to test steps and remove other endpoint which might have fixed value.
        3. Add the following project properties

         

        • HTTP_SERVICE1_ENDPOINT, say its value http://<hostname>:<port>/<rest of endpoint url>  - replace the actual value
        • JMS_SERVICE1_ENDPOINT, say its value jms://JMS_SESSION_ID::queue_<send queue name>::queue_<receiver queue name> - replace values
        • SOAP_PROTOCOL, say its possible values - http or jms that you can decide just before running the tests. Based on this, we have to set the value for SERVICE1_ENDPOINT  as either HTTP_SERVICE1_ENDPOINT or JMS_SERVICE1_ENDPOINT dynamically. This you can decide when you want to set like on Project Load script / Test Suite setup script / Test Case setup script. Here hoping that you know how to set a project property conditionally. This will avoid changing endpoint each time in each test step.

        Here JMS_SESSION_ID is the same value that is provided in the hermes-config.xml file.

         

        4. Regarding headers:

        You can use events  - test step before run - add needed headers to the request based on SOAP_PROTOCOL value. Since you are checking condition here, you can set only required headers dynamically.

         

        Hope this helps.