You need to sign in to do that
Don't have an account?
srinu namani 12
How to write test class when URLs are included in it
//Generated by wsdl2apex
public class InformaticaAddressBulkVerification {
public class NEWOUTPUT_element {
public String ID;
public String AddressLine1;
public String AddressLine2;
public String AddressLine3;
public String City;
public String State;
public String PostalCode;
public String PostalCodeSuffix;
public String Country;
public String County;
public String AddressHashID;
public String MailabilityScore;
public String MatchCode;
public String Latitude;
public String Longitude;
public String GeoCodeStatus;
private String[] ID_type_info = new String[]{'ID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine1_type_info = new String[]{'AddressLine1','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine2_type_info = new String[]{'AddressLine2','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine3_type_info = new String[]{'AddressLine3','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] City_type_info = new String[]{'City','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] State_type_info = new String[]{'State','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCode_type_info = new String[]{'PostalCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCodeSuffix_type_info = new String[]{'PostalCodeSuffix','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Country_type_info = new String[]{'Country','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] County_type_info = new String[]{'County','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressHashID_type_info = new String[]{'AddressHashID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] MailabilityScore_type_info = new String[]{'MailabilityScore','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] MatchCode_type_info = new String[]{'MatchCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Latitude_type_info = new String[]{'Latitude','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Longitude_type_info = new String[]{'Longitude','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] GeoCodeStatus_type_info = new String[]{'GeoCodeStatus','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'ID','AddressLine1','AddressLine2','AddressLine3','City','State','PostalCode','PostalCodeSuffix','Country','County','AddressHashID','MailabilityScore','MatchCode','Latitude','Longitude','GeoCodeStatus'};
}
public class Group_element {
public String ID;
public String AddressLine1;
public String AddressLine2;
public String AddressLine3;
public String City;
public String State;
public String PostalCode;
public String Country;
private String[] ID_type_info = new String[]{'ID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine1_type_info = new String[]{'AddressLine1','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine2_type_info = new String[]{'AddressLine2','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine3_type_info = new String[]{'AddressLine3','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] City_type_info = new String[]{'City','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] State_type_info = new String[]{'State','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCode_type_info = new String[]{'PostalCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Country_type_info = new String[]{'Country','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'ID','AddressLine1','AddressLine2','AddressLine3','City','State','PostalCode','Country'};
}
public class mplt_AddressValidation_OperationResponse_element {
public InformaticaAddressBulkVerification.NEWOUTPUT_element[] NEWOUTPUT;
private String[] NEWOUTPUT_type_info = new String[]{'NEWOUTPUT','http://www.informatica.com/dis/ws/',null,'0','-1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'NEWOUTPUT'};
}
public class mplt_AddressValidation_Operation_element {
public InformaticaAddressBulkVerification.Group_element[] Group_x;
private String[] Group_x_type_info = new String[]{'Group','http://www.informatica.com/dis/ws/',null,'0','-1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'Group_x'};
}
public class ws_AddressValidation {
//public String endpoint_x = 'http://DEVINFOMAPP01:9095/DataIntegrationService/WebService/ws_AddressValidation';
public String endpoint_x = Label.Informatica_Bulk_Verification;
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://www.informatica.com/dis/ws/', 'InformaticaAddressBulkVerification'};
public InformaticaAddressBulkVerification.NEWOUTPUT_element[] mplt_AddressValidation_Operation(InformaticaAddressBulkVerification.Group_element[] Group_x) {
InformaticaAddressBulkVerification.mplt_AddressValidation_Operation_element request_x = new InformaticaAddressBulkVerification.mplt_AddressValidation_Operation_element();
request_x.Group_x = Group_x;
InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element response_x;
Map<String, InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element> response_map_x = new Map<String, InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'',
'http://www.informatica.com/dis/ws/',
'mplt_AddressValidation_Operation',
'http://www.informatica.com/dis/ws/',
'mplt_AddressValidation_OperationResponse',
'InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.NEWOUTPUT;
}
}
}
public class InformaticaAddressBulkVerification {
public class NEWOUTPUT_element {
public String ID;
public String AddressLine1;
public String AddressLine2;
public String AddressLine3;
public String City;
public String State;
public String PostalCode;
public String PostalCodeSuffix;
public String Country;
public String County;
public String AddressHashID;
public String MailabilityScore;
public String MatchCode;
public String Latitude;
public String Longitude;
public String GeoCodeStatus;
private String[] ID_type_info = new String[]{'ID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine1_type_info = new String[]{'AddressLine1','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine2_type_info = new String[]{'AddressLine2','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine3_type_info = new String[]{'AddressLine3','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] City_type_info = new String[]{'City','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] State_type_info = new String[]{'State','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCode_type_info = new String[]{'PostalCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCodeSuffix_type_info = new String[]{'PostalCodeSuffix','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Country_type_info = new String[]{'Country','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] County_type_info = new String[]{'County','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressHashID_type_info = new String[]{'AddressHashID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] MailabilityScore_type_info = new String[]{'MailabilityScore','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] MatchCode_type_info = new String[]{'MatchCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Latitude_type_info = new String[]{'Latitude','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Longitude_type_info = new String[]{'Longitude','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] GeoCodeStatus_type_info = new String[]{'GeoCodeStatus','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'ID','AddressLine1','AddressLine2','AddressLine3','City','State','PostalCode','PostalCodeSuffix','Country','County','AddressHashID','MailabilityScore','MatchCode','Latitude','Longitude','GeoCodeStatus'};
}
public class Group_element {
public String ID;
public String AddressLine1;
public String AddressLine2;
public String AddressLine3;
public String City;
public String State;
public String PostalCode;
public String Country;
private String[] ID_type_info = new String[]{'ID','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine1_type_info = new String[]{'AddressLine1','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine2_type_info = new String[]{'AddressLine2','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] AddressLine3_type_info = new String[]{'AddressLine3','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] City_type_info = new String[]{'City','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] State_type_info = new String[]{'State','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] PostalCode_type_info = new String[]{'PostalCode','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] Country_type_info = new String[]{'Country','http://www.informatica.com/dis/ws/',null,'0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'ID','AddressLine1','AddressLine2','AddressLine3','City','State','PostalCode','Country'};
}
public class mplt_AddressValidation_OperationResponse_element {
public InformaticaAddressBulkVerification.NEWOUTPUT_element[] NEWOUTPUT;
private String[] NEWOUTPUT_type_info = new String[]{'NEWOUTPUT','http://www.informatica.com/dis/ws/',null,'0','-1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'NEWOUTPUT'};
}
public class mplt_AddressValidation_Operation_element {
public InformaticaAddressBulkVerification.Group_element[] Group_x;
private String[] Group_x_type_info = new String[]{'Group','http://www.informatica.com/dis/ws/',null,'0','-1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.informatica.com/dis/ws/','true','false'};
private String[] field_order_type_info = new String[]{'Group_x'};
}
public class ws_AddressValidation {
//public String endpoint_x = 'http://DEVINFOMAPP01:9095/DataIntegrationService/WebService/ws_AddressValidation';
public String endpoint_x = Label.Informatica_Bulk_Verification;
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://www.informatica.com/dis/ws/', 'InformaticaAddressBulkVerification'};
public InformaticaAddressBulkVerification.NEWOUTPUT_element[] mplt_AddressValidation_Operation(InformaticaAddressBulkVerification.Group_element[] Group_x) {
InformaticaAddressBulkVerification.mplt_AddressValidation_Operation_element request_x = new InformaticaAddressBulkVerification.mplt_AddressValidation_Operation_element();
request_x.Group_x = Group_x;
InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element response_x;
Map<String, InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element> response_map_x = new Map<String, InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'',
'http://www.informatica.com/dis/ws/',
'mplt_AddressValidation_Operation',
'http://www.informatica.com/dis/ws/',
'mplt_AddressValidation_OperationResponse',
'InformaticaAddressBulkVerification.mplt_AddressValidation_OperationResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x.NEWOUTPUT;
}
}
}
Try with below cod eit will help !
How ever you should not do callout from test class .
Thanks
Manoj
All Answers
Try with below cod eit will help !
How ever you should not do callout from test class .
Thanks
Manoj