cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to fetch Raw request for further changes in Soap Ui Pro

SOLVED
Highlighted
Occasional Contributor

Unable to fetch Raw request for further changes in Soap Ui Pro

My Solution involves below steps

Load external Data Source

Create some dynamic properties using groovy and update them in properties container

In Rest request 1 update all the values either from external data source or properties container

BY using customized groovy which take updated Rest request, remove all the empty properties and make your request Json compatible

Set updated Raw request in rest request 1

Trigger rest Request1

 

Structure is this

vpnkumar_0-1597086107389.png

 

I tried RequestFilter.filterRequest even in Rest request but it always return base request which do not have updated data value from data source/properties container

The problem is I am not able to get Raw request which is input of customized groovy for removing empty values.

 

Can some one please help me in how this can be achieved

Tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Community Leader

@vpnkumar :

 

Have you tried with context :

 

log.info "This is from events :: "+context.rawRequest

 

Hope it will help you out. 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

Highlighted
Occasional Contributor

Thanks Himanshu, along with the listed method this could be achieved using below code in RequestFilter.filterRequest event def requestContent = (String) context.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT)
log.info("Request Body BEFORE " + requestContent)

View solution in original post

3 REPLIES 3
Highlighted
Community Leader

@vpnkumar :

 

Have you tried with context :

 

log.info "This is from events :: "+context.rawRequest

 

Hope it will help you out. 


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal

View solution in original post

Highlighted
Occasional Contributor

Thanks Himanshu, along with the listed method this could be achieved using below code in RequestFilter.filterRequest event def requestContent = (String) context.getProperty(BaseHttpRequestTransport.REQUEST_CONTENT)
log.info("Request Body BEFORE " + requestContent)

View solution in original post

Highlighted
Community Leader

Hi @vpnkumar :

 

Can you please mark this post as resolved so that it will help other help seekers 🙂


Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓



Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Get a full Raw JMS request

Participate!

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors