• Bhupesh Kumar 14
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 1
    Replies
Hi folks,

Is it posible to have a dynamic SOAP call in APEX (using HttpRequest or WebServiceCallout.invoke? as we will not be having WSDL and can provide the sObject fields values that can be passed in the XML /SOAP call in order to call the webservice? 

please suggest in case we have any better way for doing this. 

Thanks & regards,
Bhupesh Kumar 
Hi,
I'm facing one issue while executing tests for Queueable future method. When I runing my code using debugging tool on developer console then my code is running successfully. however test is failing. After analysins this it is found that the test class is not able to execute the future method which is being called in Queueable class. Anyone have any idea? 
 
public class CustomClass {
    
    public static void calloutServiceMethod(List<InputParams> inputParams) {      
        cuatomConfig__c configObject = getConfig(inputParams[0].configName);
        System.enqueueJob(new QueueableCall(configObject, inputParams[0].Ids));
    }
    
   
    @Future(callout=true)
    private static void postCall(String configName, List<Id> ids) {
        //some code here that is not being called
    }  
    
    class QueueableCall implements System.Queueable, Database.AllowsCallouts {
        private cuatomConfig__c configuration;
        private List<id> IDS;
        public QueueableCall(cuatomConfig__c Configuration, List<Id> ids){
          this.configuration = Configuration;
          this.IDS = ids;
        }
        public void execute(QueueableContext context) {
            String CName = configuration.Name__c;
            postCall(CName, IDS);
        }
    }
    
     public class InputParams {   
        
        public List<Id> Ids;
        public String configName;
    }
    
}

 
Hi,
I'm facing one issue while executing tests for Queueable future method. When I runing my code using debugging tool on developer console then my code is running successfully. however test is failing. After analysins this it is found that the test class is not able to execute the future method which is being called in Queueable class. Anyone have any idea? 
 
public class CustomClass {
    
    public static void calloutServiceMethod(List<InputParams> inputParams) {      
        cuatomConfig__c configObject = getConfig(inputParams[0].configName);
        System.enqueueJob(new QueueableCall(configObject, inputParams[0].Ids));
    }
    
   
    @Future(callout=true)
    private static void postCall(String configName, List<Id> ids) {
        //some code here that is not being called
    }  
    
    class QueueableCall implements System.Queueable, Database.AllowsCallouts {
        private cuatomConfig__c configuration;
        private List<id> IDS;
        public QueueableCall(cuatomConfig__c Configuration, List<Id> ids){
          this.configuration = Configuration;
          this.IDS = ids;
        }
        public void execute(QueueableContext context) {
            String CName = configuration.Name__c;
            postCall(CName, IDS);
        }
    }
    
     public class InputParams {   
        
        public List<Id> Ids;
        public String configName;
    }
    
}