Ask a Question

SoapUI Pro (Automate JSon payload)

SOLVED
KBTokzan
Occasional Contributor

SoapUI Pro (Automate JSon payload)

Hi Guys,

 

I am new on SoapUI pro, here is the scenario.

 

I have four methods namely (create, update, delete, and get) for the event service, so from my update json I need to pass the eventCode which is generated from the create Method.

 

I am able to connect to the DB and I am also aware of the datasource and JDBC Request.

 

Can you please suggest a way or a link on how I can achieve this.

 

Thanks in advance,

KB Tokzan

8 REPLIES 8
Lucian
Community Hero

Hi,

 

Can you please share a sample response from the jdbc request?



If my answer helped please click on the 'Accept as Solution' button.
KBTokzan
Occasional Contributor

Hi Lucian,

 

Thanks for the reply, please see the screen for from my jdbc response,

 

To update the very same results I need to pass the event code in my json (below)

 

{
"unitOfMeasureDescription": "RedesignUpdate",
"unitOfMeasureBusinessDescription": "RedesignUpdate",
"unitOfMeasureCode": "UOM-Rede",
"unitOfMeasureUnit": "cm",
"dataType": {
"dataTypeCode": "DECIMAL"
},
"effectiveFromDate": "2018-09-03",
"effectiveToDate": "2999-12-31"
}

 

I can update any parameter aslong as I am passing the correct/existing code.

 

As I mentioned I need to find a way that I can be able to read the code from the DB and pass it to my json without doing it manually, bacause we have to intergrate this with jenkins

 

Thanks,

KB Tokzan 

 

 

KBTokzan
Occasional Contributor

Sorry forgot to attached the picture

I am sorry. I don't get what that event code is. Can you help me out here?



If my answer helped please click on the 'Accept as Solution' button.
KBTokzan
Occasional Contributor

I am referring to "unitOfMeasureCode" by eventCode .. the code is is also stored on the DB if you can refer to my screenshot attachment

Ok, I am sorry but I still don't know exactly what you are trying to extract. Smiley Happy Nevertheless there is a Property Trasnfer step in SoapUI. So you could:

 

1. Create a TestCase property (see more about properties here);

2. Add a Property Transfer step 

2018-09-06_15h52_59.png

3. Reference the property wherever you need. (info about referencing properties are also in the link I provided)



If my answer helped please click on the 'Accept as Solution' button.
Olga_T
SmartBear Alumni (Retired)

Hi all,

 

@Lucian, thanks for trying to figure it out Smiley Very Happy

@KBTokzan, was the assumption above correct? Do the steps help you?

 


Olga Terentieva
SmartBear Assistant Community Manager

KBTokzan
Occasional Contributor

Hi @Olga_T,

 

Yes it did .. I managed to solve my problem by using the property transfer ..

 

Thanks,

KB Tokzan

 

cancel
Showing results for 
Search instead for 
Did you mean: