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
SevateSevate 

Compile Error: Invalid type: comFuzeqnaTest2.InternalSSO at line 4 column 9

Help Appreciated

I am getting this compile error when saving the following wrapper class

Compile Error: Invalid type: comFuzeqnaTest2.InternalSSO at line 4 column 9 

 

global class fuzecallout { Webservice static void InternalSSO(String auth,String username,String firstname,String lastname,String email,String specialPublic,String draft,String workIncidents,String specialPrivate,String groupName) { comFuzeqnaTest2.AuthServiceSOAP111 stub = new comFuzeqnaTest2.AuthServiceSOAP111(); comFuzeqnaTest2.InternalSSO[] hashcode1 = soap.InternalSSO(auth,username,firstname,lastname,email,specialPublic,draft,workIncidents,specialPrivate,groupName); return InternalSSO(auth,username,firstname,lastname,email,specialPublic,draft,workIncidents,specialPrivate,groupName); } }

 

 

This is my wsdl2apex

 

global class comFuzeqnaTest2 { public class ExternalSSO_element { public String auth; public String username; public String firstname; public String lastname; public String email; public String specialPublic; public String groupName; public String companyName; private String[] auth_type_info = new String[]{'auth','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] username_type_info = new String[]{'username','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] firstname_type_info = new String[]{'firstname','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] lastname_type_info = new String[]{'lastname','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] email_type_info = new String[]{'email','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] specialPublic_type_info = new String[]{'specialPublic','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] groupName_type_info = new String[]{'groupName','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] companyName_type_info = new String[]{'companyName','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] apex_schema_type_info = new String[]{'com.fuzeqna','true','false'}; private String[] field_order_type_info = new String[]{'auth','username','firstname','lastname','email','specialPublic','groupName','companyName'}; } global class InternalSSO_element { public String auth; public String username; public String firstname; public String lastname; public String email; public String specialPublic; public String draft; public String workIncidents; public String specialPrivate; public String groupName; private String[] auth_type_info = new String[]{'auth','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] username_type_info = new String[]{'username','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] firstname_type_info = new String[]{'firstname','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] lastname_type_info = new String[]{'lastname','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] email_type_info = new String[]{'email','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] specialPublic_type_info = new String[]{'specialPublic','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] draft_type_info = new String[]{'draft','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] workIncidents_type_info = new String[]{'workIncidents','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] specialPrivate_type_info = new String[]{'specialPrivate','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] groupName_type_info = new String[]{'groupName','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] apex_schema_type_info = new String[]{'com.fuzeqna','true','false'}; private String[] field_order_type_info = new String[]{'auth','username','firstname','lastname','email','specialPublic','draft','workIncidents','specialPrivate','groupName'}; } global class AuthServiceSOAP111 { public String endpoint_x = 'http://www.fuzeqna.com/samplecu/services/v1/auth.svc/SOAP11'; public Map<String,String> inputHttpHeaders_x; public Map<String,String> outputHttpHeaders_x; public String clientCert_x; public String clientCertPasswd_x; public Integer timeout_x; private String[] ns_map_type_info = new String[]{'com.fuzeqna', 'comFuzeqnaTest2'}; public String InternalSSO(String auth,String username,String firstname,String lastname,String email,String specialPublic,String draft,String workIncidents,String specialPrivate,String groupName) { comFuzeqnaTest2.InternalSSO_element request_x = new comFuzeqnaTest2.InternalSSO_element(); comFuzeqnaTest2.InternalSSOResponse_element response_x; request_x.auth = auth; request_x.username = username; request_x.firstname = firstname; request_x.lastname = lastname; request_x.email = email; request_x.specialPublic = specialPublic; request_x.draft = draft; request_x.workIncidents = workIncidents; request_x.specialPrivate = specialPrivate; request_x.groupName = groupName; Map<String, comFuzeqnaTest2.InternalSSOResponse_element> response_map_x = new Map<String, comFuzeqnaTest2.InternalSSOResponse_element>(); response_map_x.put('response_x', response_x); WebServiceCallout.invoke( this, request_x, response_map_x, new String[]{endpoint_x, 'com.fuzeqna/AuthServiceSOAP111/InternalSSO', 'com.fuzeqna', 'InternalSSO', 'com.fuzeqna', 'InternalSSOResponse', 'comFuzeqnaTest2.InternalSSOResponse_element'} ); response_x = response_map_x.get('response_x'); return response_x.InternalSSOResult; } global class InternalSSOResponse_element { public String InternalSSOResult; private String[] InternalSSOResult_type_info = new String[]{'InternalSSOResult','http://www.w3.org/2001/XMLSchema','string','0','1','true'}; private String[] apex_schema_type_info = new String[]{'com.fuzeqna','true','false'}; private String[] field_order_type_info = new String[]{'InternalSSOResult'}; }

 

Best Answer chosen by Admin (Salesforce Developers) 
SuperfellSuperfell

There is not InternalSSO type in the comFuzeqnaTest2 class, so this declaration is what its complaining about

 comFuzeqnaTest2.InternalSSO[] hashcode1

 

The InternalSSO function appears to return a string, so you'd want

String hashcode1 = soap.InternalSSO(....) 

All Answers

SuperfellSuperfell

There is not InternalSSO type in the comFuzeqnaTest2 class, so this declaration is what its complaining about

 comFuzeqnaTest2.InternalSSO[] hashcode1

 

The InternalSSO function appears to return a string, so you'd want

String hashcode1 = soap.InternalSSO(....) 

This was selected as the best answer
SevateSevate
SIMONF IS A GENIUS :smileyvery-happy: