NishantJadhav
9 years agoOccasional Contributor
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.?
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.
- 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.
- 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.
- 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.