I'm having an issue with the Address Verification method available through StrikeIron. I imported the following WSDL and am using the generated wsdl2apex code.
The WSDL I'm using is here: http://wsparam.strikeiron.com/USAddressVerification5?WSDL
I'm calling the VerifyAddressUSA method like this(took out my real credentails):
StrikeIron.USAddressVerificationSoap stub= new StrikeIron.USAddressVerificationSoap();
StrikeIron.VerifyAddressUSAResponse_element response = new StrikeIron.VerifyAddressUSAResponse_element();
response=stub.VerifyAddressUSA('','MYEMAIL@MYDOMAIN.COM', 'PASSWORD', '1600 Pennsylvania Avenue', '', ' Washington, DC 20500', '', '', 'PROPER');
The error I'm getting is:
System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element http://www.strikeiron.com=AddressLine1
Any ideas on how to solve this? I'm not sure where the problem is.
Thanks!
EDIT(code for VerifyAddressUSA):
public StrikeIron.VerifyAddressUSAResponse_element VerifyAddressUSA(String UnregisteredUserEmail,String UserID,String Password,String AddressLine1,String AddressLine2,String CityStateZIPCode,String Firm,String Urbanization,String Casing) {
StrikeIron.VerifyAddressUSA_element request_x = new StrikeIron.VerifyAddressUSA_element();
StrikeIron.VerifyAddressUSAResponse_element response_x;
request_x.UnregisteredUserEmail = UnregisteredUserEmail;
request_x.UserID = UserID;
request_x.Password = Password;
request_x.AddressLine1 = AddressLine1;
request_x.AddressLine2 = AddressLine2;
request_x.CityStateZIPCode = CityStateZIPCode;
request_x.Firm = Firm;
request_x.Urbanization = Urbanization;
request_x.Casing = Casing;
Map<String, StrikeIron.VerifyAddressUSAResponse_element> response_map_x = new Map<String, StrikeIron.VerifyAddressUSAResponse_element>();
response_map_x.put('response_x', response_x);
WebServiceCallout.invoke(
this,
request_x,
response_map_x,
new String[]{endpoint_x,
'http://www.strikeiron.com/VerifyAddressUSA',
'http://www.strikeiron.com',
'VerifyAddressUSA',
'http://www.strikeiron.com',
'VerifyAddressUSAResponse',
'StrikeIron.VerifyAddressUSAResponse_element'}
);
response_x = response_map_x.get('response_x');
return response_x;
}
VerifyAddressUSAResonse_element
public class VerifyAddressUSAResponse_element {
public StrikeIron.SIWsOutputOfUSAddress VerifyAddressUSAResult;
public StrikeIron.SISubscriptionInfo SISubscriptionInfo;
private String[] VerifyAddressUSAResult_type_info = new String[]{'VerifyAddressUSAResult','http://www.strikeiron.com','SIWsOutputOfUSAddress','0','1','false'};
private String[] SISubscriptionInfo_type_info = new String[]{'SISubscriptionInfo','http://www.strikeiron.com','SISubscriptionInfo','1','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.strikeiron.com','true','false'};
private String[] field_order_type_info = new String[]{'VerifyAddressUSAResult','SISubscriptionInfo'};
}
VerifyAddressUSA_element
public class VerifyAddressUSA_element {
public String UnregisteredUserEmail;
public String UserID;
public String Password;
public String AddressLine1;
public String AddressLine2;
public String CityStateZIPCode;
public String Firm;
public String Urbanization;
public String Casing;
private String[] UnregisteredUserEmail_type_info = new String[]{'UnregisteredUserEmail','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] UserID_type_info = new String[]{'UserID','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Password_type_info = new String[]{'Password','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] AddressLine1_type_info = new String[]{'AddressLine1','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] AddressLine2_type_info = new String[]{'AddressLine2','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] CityStateZIPCode_type_info = new String[]{'CityStateZIPCode','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Firm_type_info = new String[]{'Firm','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Urbanization_type_info = new String[]{'Urbanization','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
private String[] Casing_type_info = new String[]{'Casing','http://www.strikeiron.com','CasingEnum','0','1','false'};
private String[] apex_schema_type_info = new String[]{'http://www.strikeiron.com','true','false'};
private String[] field_order_type_info = new String[]{'UnregisteredUserEmail','UserID','Password','AddressLine1','AddressLine2','CityStateZIPCode','Firm','Urbanization','Casing'};
}
VerifyAddressUSAResult
andSISubscriptionInfo
, in my mindVerifyAddressUSAResult
is the type that the APEX can't properly be deserialized into...check the types onAddressLine1
to make sure it is of the typestring
and that it exists! – jordan.baucke Oct 10 '12 at 15:45VerifyAddressUSAResult
is really what we're looking for --VerifyAddressUSA_element
is like a deserlialization go between. You didn't modify any of the classes after you created them? And have you reviewed the debug logs and examined the SOAP message that is being returned? – jordan.baucke Oct 10 '12 at 16:08