function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ReksReks 

REST API

How to perform testing in SOAP UI through REST API ?

Vinita_SFDCVinita_SFDC

Hello,

 

Following document explains step by step how to test REST API in SOAP UI:

 

http://www.soapui.org/REST-Testing/getting-started.html

 

Hope it helps!

ReksReks

Hi,

 

Can you please suggest what  file has to be imported in IMPORT WADL ?

 

Vinita_SFDCVinita_SFDC

In import WSDL you will provide the REST api URL, please refer the first screenshot in the above link.

ReksReks

After you click on Import WSDL then it navigates to the Initial WADL. Kindly let us know how to proceed with it as I am not understanding what file need to be browsed !

gbu.varungbu.varun

Hi 

If you want to perform testing for Rest API you should not use SOAP UI tool. Soap UI generally test SOAP based web service which will need WSDL file. You should use some another tool to test Rest API. 

You can use chrome extension to test the Rest API. A lot of extensions are available for it. There is a link for a powerfull extension:

https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo

 

 

 

 

 

ReksReks

Can I get more details on this ? As I need to perform testing in REST API but struck up as mentioned earlier ! 

gbu.varungbu.varun

Add this plugin to your chrome and launch it. 

Put the url of the web application and post the authentication variable. You will find various option like get,put,post option. You have to choose these options like your rest based web service.

Sreenivas Angara 7Sreenivas Angara 7
Actual URL would have helped answer this question. 
Zafar KhanZafar Khan
I don't have the perfect solution about this discussion but for the REST API, I have found an Excellent tutorial where we learn how to automate REST API/Web API/SOAP/OAuth/OData Service integration in SSIS. It includes JSON Source Connector, XML Source Connector and REST API Task.
Check it out..Hope it Helps:)
Evgenia ZanevaEvgenia Zaneva
Hello, 

I am a beginner in Apex and I am trying to test Rest method. I have been stuck with this for a week. I need your help. Thanks.
 
​public static HttpResponse processCommunityUser(String action, String contactId, String profileName, Credential__mdt credentials) { String sessionId = Login.login(credentials.Username__c, credentials.Password__c); String instanceURL = System.Url.getSalesforceBaseURL().toExternalForm(); String remoteURL = instanceURL + '/services/apexrest/communityUserCreation?_HttpMethod=PATCH'; HTTPRequest httpRequest = new HTTPRequest(); httpRequest.setMethod('POST'); httpRequest.setBody('{"action": "' + action + '", "contactId": "' + contactId + '", "profileName": "' + profileName + '"}'); httpRequest.setEndpoint(remoteURL); httpRequest.setHeader('Authorization', 'OAuth ' + SessionId); httpRequest.setHeader('Content-Type', 'application/json'); HTTPResponse httpResponse = new Http().send(httpRequest); if (httpResponse.getStatusCode()!= 201) { System.debug('The status code returned was not expected: ' + httpResponse.getStatusCode() + ' ' + httpResponse.getStatus()); } else { System.debug(httpResponse.getBody()); } return httpResponse; }