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
Gaurav AgnihotriGaurav Agnihotri 

Not able to call a method inside a class

Gurus, 
I have to call a method within a class. The problem is that this class is within a class. Please help with this. 
Below is the class:
//Methods Included: GetExcelFileURL
// Primary Port Class Name: ExportQuoteToExcelEndPoint	
public class tempuriOrg {
	public class ExportQuoteToExcelEndPoint {
		public String endpoint_x = 'https://pelcosales.schneider-electric.com/SalesForceServices/ExportQuoteToExcel/ExportQuoteToExcelService.svc';
		public Map<String,String> inputHttpHeaders_x;
		public Map<String,String> outputHttpHeaders_x;
		public String clientCertName_x;
		public String clientCert_x;
		public String clientCertPasswd_x;
		public Integer timeout_x;
		private String[] ns_map_type_info = new String[]{'http://tempuri.org/','tempuriOrg','http://schemas.microsoft.com/2003/10/Serialization/','schemasMicrosoftCom200310Serializat'};
		public String GetExcelFileURL(String username,String password,String quoteId) {
			tempuriOrg.GetExcelFileURL_element request_x = new tempuriOrg.GetExcelFileURL_element();
			tempuriOrg.GetExcelFileURLResponse_element response_x;
			request_x.username = username;
			request_x.password = password;
			request_x.quoteId = quoteId;
			Map<String, tempuriOrg.GetExcelFileURLResponse_element> response_map_x = new Map<String, tempuriOrg.GetExcelFileURLResponse_element>();
			response_map_x.put('response_x', response_x);
			WebServiceCallout.invoke(
				this,
				request_x,
				response_map_x,
				new String[]{endpoint_x,
				'http://tempuri.org/IExportQuoteToExcelService/GetExcelFileURL',
				'http://tempuri.org/',
				'GetExcelFileURL',
				'http://tempuri.org/',
				'GetExcelFileURLResponse',
				'tempuriOrg.GetExcelFileURLResponse_element'}
			);
			response_x = response_map_x.get('response_x');
			return response_x.GetExcelFileURLResult;
		}
	}
	public class GetExcelFileURL_element {
		public String username;
		public String password;
		public String quoteId;
		private String[] username_type_info = new String[]{'username','http://tempuri.org/','string','0','1','true'};
		private String[] password_type_info = new String[]{'password','http://tempuri.org/','string','0','1','true'};
		private String[] quoteId_type_info = new String[]{'quoteId','http://tempuri.org/','string','0','1','true'};
		private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
		private String[] field_order_type_info = new String[]{'username','password','quoteId'};
	}
	public class GetExcelFileURLResponse_element {
		public String GetExcelFileURLResult;
		private String[] GetExcelFileURLResult_type_info = new String[]{'GetExcelFileURLResult','http://tempuri.org/','string','0','1','true'};
		private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true','false'};
		private String[] field_order_type_info = new String[]{'GetExcelFileURLResult'};
	}
}

I am trying to invoke the method " GetExcelFileURL"
tempuriOrg NewTempUri= new tempuriOrg();
 NewTempUri.ExportQuoteToExcelEndpoint.GetExcelFileURL('SalesForceIntegration','vw4','0Q0g0000000ErDN');

However, I am getting an error message:
Variable does not exist: exportquotetoexcelendpoint

This class is created from WSDL. I would appreciate any help.
 
Best Answer chosen by Gaurav Agnihotri
Shashi PatowaryShashi Patowary
Hi Gaurav,

So you are trying to call a webservice class.Anyway you can call a method from inner class this way -

tempuriOrg.ExportQuoteToExcelEndpoint  exp = New tempuriOrg.ExportQuoteToExcelEndpoint();
exp.GetExcelFileURL('SalesForceIntegration','vw4','0Q0g0000000ErDN');

Please let me know if it helps.

Regards,
Shashi

 

All Answers

Shashi PatowaryShashi Patowary
Hi Gaurav,

So you are trying to call a webservice class.Anyway you can call a method from inner class this way -

tempuriOrg.ExportQuoteToExcelEndpoint  exp = New tempuriOrg.ExportQuoteToExcelEndpoint();
exp.GetExcelFileURL('SalesForceIntegration','vw4','0Q0g0000000ErDN');

Please let me know if it helps.

Regards,
Shashi

 
This was selected as the best answer
Gaurav AgnihotriGaurav Agnihotri
Thanks, Shashi. It did resolve the issue.