I want to know how can I change the value of field in the header of the backend service dynamically
Thank you
You can use header mediator to manipulate the headers[1] in mediation extension[2]
[1] https://docs.wso2.com/display/ESB500/Header+Mediator
[2] https://docs.wso2.com/display/AM200/Adding+Mediation+Extensions
Related
The Shodan filter reference only shows a way to search using the hash of all the HTTP headers (http.headers_hash) in a banner. Is there some way to search for specific header fields or values?
You can just search for them directly as they're contained in the main data property of the banner. You don't need to use search filters. For example: https://www.shodan.io/search?query=%22X-Recruiting%3A%22
Scenario : I need to verify the logs response on server on the basis of Tracking-Id.
I had passed the tracking-id using 'header.js' file, here i define metod which get the unique UUID for every request and passed in header.
Now I need that header value to passed in some method to get logs only for specific Tracking-Id
Is there any way to achieve this in karate?
Yes, you can use karate.set('someVarName', uuidValue) in JS and then back in the feature you will be able to: * print someVarName.
EDIT: please see this commit for an example: link
I want to select two properties using thingworx, I was able to select one property (first name) using this request:
https://example.com/Thingworx/Things/navigation/Properties/firstname?appKey=xxx
now I want to select first name and last name (both in the same use case : navigation)
Thank you
You should look onto services instead of Properties, for instance Service "GetNamedPropertyValues" or "GetNamedProperties" and pass as parameter the list of properties values to recover
You can also refer ThingWorx REST API Cheat Sheet on
https://community.ptc.com/t5/ThingWorx-Developers/ThingWorx-REST-API-Cheat-Sheet/td-p/532533
Basically you can send a GET Request to
https://<host>:<port>/Thingworx/Things/<thingName>/Properties/*?appKey=<appKey>
to fetch all properties related to that thing. You can also update multiple Properties using a PUT request.
I'm using JMeters to automate API testing to/from our database using basic CRUD methodology. After the record creation, I'm trying to perform 3 different types of Reads (think CRRRUD). :)
Read 1 - Retrieve by ID
HTTP (GET) the base URL is appended with the saved record ID.
http..../crud/tableName/${newRecordId}
This returns
Read 2 - Retrieve by field type with no defined value
HTTP (POST) the base URL is extended with a "search" as the end. A Key is defined ("name") with no value.
http..../crud/tableName/search
Parameter Name = name
Value = {undefined}
This returns all records within the table whose field ("name") is not null.
Read 3 - Retrieve by field type with a defined value
HTTP (POST) the base URL is extended with a "search" as the end. A Key is defined ("name") with the value generated during the creation request.
http..../crud/tableName/search
Parameter Name = name
Value = Metropolis
This, too, returns ALL of the records within the table instead of just the record(s) whose name = Metropolis.
This 3rd Retrieve works properly when using a REST client, (e.g., Postman, Advanced REST Client, etc.) when defining the Key|Value pair as "name|Metropolis". So it must be something within JMeter that I'm missing.
Any insight is appreciated!
There is only one correct answer: compare what's being sent by REST Client and JMeter using sniffer tool (i.e. Wireshark), detect the differences and configure JMeter accordingly.
Just a guess: given you mentioned "API" an "REST" words maybe you need to pass it as JSON like:
{"name":"Metropolis"}
as a single parameter value
or in formatted way (in case if server checks Content-Length and/or wants the request to be properly formatted)
You may also need to add HTTP Header Manager in order to send Content-Type header with the value of application/json. See Testing SOAP/REST Web Services Using JMeter guide for more details.
I need the value in input variable to be added to soap header, using Dataweave - I was using datamapper earlier, but since it's no more supported, want to do through Dataweave.
I'm not able to map between the data variable and outbound property in Anypoint studio. I even tried with multiple variables but no use.
Does anyone has an example?
I was able to set an outbound property from a flow variable using the 'Output' drop down in DW, choose 'Outbound Property'. This feature is described here, see section 'Handling Multiple Outputs'.