JMETER firing multiple soap request stored in one file - soap

I make a jmeter project that allows to test performance for a web service. I extract from my bdd the soap request and i store all the data in a file (xml). I created the project jmeter and specify the file. I noticed that the project jmeter send all the data and the web service execute just one soap request. So, i want to know if it is possible and how to specify to jmeter to send one by one the data from the file.
EDIT
Exemple in the file:
<soapenv:Envelope xmlns:soapenv="" xmlns:typ="">
<soapenv:Header/>
<soapenv:Body>
<typ:annonce>
data
</typ:annonce>
</soapenv:Body>
</soapenv:Envelope>
<soapenv:Envelope xmlns:soapenv="" xmlns:typ="">
<soapenv:Header/>
<soapenv:Body>
<typ:annonce>
data
</typ:annonce>
</soapenv:Body>
</soapenv:Envelope>
So, in my file i have two soap requests. JMETER sends the entire file, so my web service execute only the first soap request.
I want that JMETER sends the first soap and after the second.
It is possible to do this ?

You can use __FileToString() function like:
${__FileToString(/path/to/your/file.xml,,)}
Directly in your HTTP Request sampler body like:
The function will be evaluated when the sampler will be executed so JMeter will pick up the file and send it as the request body.
See Apache JMeter Functions - An Introduction article for more information on JMeter Functions concept.

Related

Create custom headers in zend soap server WSDL

Is there a way of creating an WSDL custom header with the auto-discovery function zend-soap server? Or an other alternative way of managing such a request on the soap server?
I need to process a request coming from an ESB proxy containing a soapenv:header like this one:
<soapenv:Header>
<esb:header>
<esb:message_type>AddNewOrder</esb:message_type>
<esb:version>01.80</esb:version>
<esb:source_entity>LPRO</esb:source_entity>
<esb:source_application>NOLS</esb:source_application>
<esb:destination_entity>LPRO</esb:destination_entity>
<esb:destination_application>TIRE</esb:destination_application><esb:message_id>414d51204750455342333332202020201581675c22c0e127</esb:message_id><esb:correl_message_id>414d51204750455342333332202020201581675c22c13403</esb:correl_message_id><esb:message_id>X&apos;414d51204750455342333332202020201581675c22c13403&apos;</esb:message_id>
</esb:header>

How to generate a swagger file for the header "Content-Type: application/x-www-form-urlencoded" in Informatica cloud?

I want to generate a swagger file for rest v2 connector in informatica cloud with these details.
POST CALL:
Accept: application/json
Content-Type: application/x-www-form-urlencoded
Raw Body:
token=XXXXXXX&content=record&format=csv
But informatica cloud does not have an option of application/x-www-form-urlencoded.
I am able to do the same request in POSTMAN as POSTMAN has all the functionalities.
I even tried to put the Content-Type separately in the headers section while generating the swagger file in Informatica-cloud, but still didn't work.
Someone told me to use this website: http://specgen.apistudio.io for creating the swagger file, but the site does not seem secure and thus I cannot enter any sensitive data
Is there any way I could generate the file through a website or through informatica itself?
Swagger file cannot be generated for the header “Content-Type: application/x-www-form-urlencoded” in Informatica cloud.
What can be done instead is to use 'Curl' for the rest api call in the pre/post processing command in the Mapping Task/Data Synchronization Task. You can take a look at the curl commands in here:
https://www.baeldung.com/curl-rest
Other way if you want to avoid using Curl then, you can create a 'service connector' for the REST call in the application integration.
It is also possible to run data integration tasks from application integration if you want to run them after using the service connector.
The way it works is:
Create a service connector
Create the connection for the service connector
Create a process.
Inside the process, use various services. First service can run your API connection that you just made, then you can use other service to run a data integration task which is available inside 'System service: -> Run cloud task'.
This way you can make the work done without creating a swagger file as it does not accept “Content-Type: application/x-www-form-urlencoded”.

VSTS connection with SOAPui via ReSTapi

I am trying to make connection to Azure VSTS with SOAPui through vsts rest api's, but the response I am getting is: HTTP/1.1 203 Non-Authoritative information
Though when I hit the same request from POSTMAN it's giving successful response for every operation(Get, Post, Delete).
As I have a framework for API automation in SOAPUI I need to have this connection to post the test results in VSTS against respective test case.
Any idea how to resolve this would be much appreciated!!
Thanks
This is due to the incorrect authentication headers (Authorization header) that you send in the request. I have experienced this issue when you are trying to send empty username in SoapUI - Basic Authorization tab.
This can be handled by generating the header offline (using some online utilities - https://www.blitter.se/utils/basic-authentication-header-generator/) and sending in a separate header like below,
Authorization: Basic Onl1eWl1eWl5aXlpeWl5aXk=
Hope this helps.

REST: soapUI groovy script not running on tomcat server

I have a problem about executing groovy script of my rest mock service project on tomcat server.
Actually i'm using soapUI pro 5.1.0 to create a complete REST web services with the mock service.
Indeed, after resources creation (/api/1/mobile/users), I create a method POST that contains several requests and I generate the corresponding REST responses under (/api/1/mobile/users) resource. Then to have the corresponding response for each request I develop a groovy script that check the request content and send the right response. The script is well performed locally in the soapUI tool, but when I deploy the project on tomcat server, and try to send request with the client. I noticed that the default response is sent for all requests instead of targeted response. It seems that the script is not performed, and no log info is received.

Connect to Epic Medical System via Interconnect

I am trying to connect an Epic medical system using its Interconnect Web Service offering which exposes some simple SOAP endpoints. http://userweb.epic.com gives very little information other than a list of services and some sample XML.
I managed to get at a test wsdl and using SoapUI made a test call with no luck.
The Interconnect status page says all is well and that the service is available.
So my questions are
(i) How do I get to dynamically generated wsdls for services?
(ii) What is the URL endpoint for services. Sending the SOAP XML request to http://xxxxxxxxx/Interconnect-Test/ fails.
Here is my test XML request which should just add 2 numbers on the server.
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:epicsystems-com:Interconnect.2004-05.Services.Diagnostics">
<soapenv:Header/>
<soapenv:Body>
<urn:AddRemote>
<urn:int1>1</urn:int1>
<urn:int2>2</urn:int2>
</urn:AddRemote>
</soapenv:Body>
</soapenv:Envelope>
So the magic seems to be that you need to have "Config Editor" installed on the Interconnect server and then enable "Developer View".
The status view now has a developer link on the top right side. Clicking on that gives the Web Services info and access to wsdl's. Some services also offer REST as well as SOAP.
The wsdl's are badly formed and you will need to add a service tag to get it to work in something like java's wsimport.