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

Converting a SOAP WS to REST in APEX



I am wondering if we can convert the SOAP WS written in APEX to REST based? What are steps in doing it? Do I need to change the Integration logic also written in .NET? 


Here is my APEX Class - 



global class putLocationId {
  webservice String City;
  webservice String State;
  global class LocationInput {
    webservice String GUID; 
    webservice String locationinfo;
    webservice String LocationId;
 global class LocationOutput {
    webservice String errorMessage; 
    webservice boolean Success;
    // webservice List<LocationInput> vlocationinfo;    
  webservice static LocationOutput createLocationws(List<LocationInput> vlocationinfo) {
     integer newcount = 0;
     List<Location__c> newloc = new List<Location__c>();
     for (integer i = 0; i < vlocationinfo.size() ; i++) {
     Location__c l = new Location__c();
     l.Location_ID__c = vlocationinfo[i].GUID;
     l.Name__c = vlocationinfo[i].locationinfo;
     l.LocationIntStatusLastChanged__c =;
     l.Current_Backlog_Minutes__c = 100;
     l.Postal_Code__c = '03801';
     newcount = newcount + 1;
     insert newloc;
     system.debug(' the locations added:'  + newcount);   
     LocationOutput ops = new LocationOutput();
     ops.errorMessage = 'No Errors from this API';
     ops.success = true;
     return ops;



Not currently.


Hi Quinton- Do you know if it is in the roadmap? Can you tell me when it is LIKELY to be available?




We're piloting an Apex REST API soon.  No ETA on when we'll GA it, though.