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
JacobusJacobus 

Wrapper class in @future class

Hi,

Please help with the following,

I have this @future class that calls a SOAP web service
 
global class UpliftmentRequestFutureWebService {
	
	@future (callout=true)
	public static void sendvehiclerequest (String dateofrequest, 
										   Integer insurer, 
										   String claimno, 
										   String dateofloss, 
										   Integer vehiclecondition, 
										   String customerlastname,
										   String customerfirstname,
										   String vehiclecommercialpassenger, 
										   String vehiclemake,
										   String vehiclemodel, 
										   String vehicleMMCode,
										   String vehicleyear, 
										   String vehicleregistrationno, 
										   String locationname, 
										   String locationcontactperson,
										   String locationcontactno,
										   String locationemailaddress, 
										   String locationstreetaddress, 
										   String locationsuburb, 
										   String locationpostalcode,
										   String locationcity,
										   String locationprovince, 								   
										   String salesforcecapturer, 
										   String salesforcerefno) {									   	
										   		   	
				//GetSalesforceInsurerDDL					   	
				FAMExternalWebservice.SumbitReleaseFromThirdParty stub = new FAMExternalWebservice.SumbitReleaseFromThirdParty();
				FAMExternalWebservice.ArrayOfGenericListItem insurers = stub.GetSalesForceInsurersDDL();
				
				
				system.debug ('List of vehicle insurers :' + insurers);
		

				//FAMExternalWebservice.ArrayOfString vehiclemakes = stub.GetVehicleMakesDDL();
				//system.debug('List of vehicle makes : ' + vehiclemakes);
				//stub.GetVehicleModelsByMakeDDL('');
				FAMExternalWebservice.ThirdPartyReleaseEntry tpr = new FAMExternalWebservice.ThirdPartyReleaseEntry();	

				tpr.DateOfRequest = dateofrequest;
				tpr.Insurer = Insurer;
				tpr.ClaimNumber = claimno;
				tpr.DateOfLoss = dateofloss;
				tpr.VehicleCondition = vehiclecondition;
				tpr.CustomerSurname = customerlastname;
				tpr.CustomerName = customerfirstname;
				tpr.VehicleCommercialPassenger = vehiclecommercialpassenger;				
				tpr.VehicleMake = vehiclemake;
				tpr.VehicleModel = vehiclemodel;
				tpr.VehicleMMCode = vehicleMMCode;
				tpr.VehicleYear = vehicleyear;
				tpr.VehicleRegistrationNumber = vehicleregistrationno;
				tpr.LocationName = locationname;
				tpr.LocationContactPerson = locationcontactperson;
				tpr.LocationContactNumber = locationcontactno;
				tpr.LocationEmailAddress = locationemailaddress;
				tpr.LocationStreetAddress = locationstreetaddress;
				tpr.LocationSuburb = locationsuburb;
				tpr.LocationPostalCode = locationpostalcode;
				tpr.LocationCity = locationcity;
				tpr.LocationProvince = locationprovince;
				tpr.SalesForceCapturer = salesforcecapturer;
				tpr.SalesForceReferenceNumber = salesforcerefno;	 
				
				system.debug('The vehicle salesforce object to be send to the web services : ' + tpr);						

			  	//stub.SumbitReleaseFromThirdParty(tpr);	
										   		
	}
}

This line of code retrieves an array of values
FAMExternalWebservice.ArrayOfGenericListItem insurers = stub.GetSalesForceInsurersDDL();
I was advised to you a wrapper class to add and retrieve values. 
All I want to do is put the results in a list/ map and use the values.
I am not very familiar with wrapper classes. 
Can I use this wrapper class within my @future class?
Please can someone provide sample code where this was done before?

Thanks,