You need to sign in to do that
Don't have an account?

external web services through apex
Hi all-
I'm wondering if anybody knows a good place to start finding ways to access and execute an external web service using Apex. Any help is appreciated!!
BW
Thanks, Simon!
I found the documentation, and I followed it, but I'm running into some issues and I'm wondering if anybody can help.
I have a method I'm trying to consume
}
Here is the method inside the "DocSamplePort"...
csCallCenterWS.CreateNewAccountResponse_element response_x;
request_x.strUser = strUser;
request_x.strPin = strPin;
request_x.lngSiteID = lngSiteID;
request_x.strFirstName = strFirstName;
request_x.strLastName = strLastName;
request_x.strAccountName = strAccountName;
request_x.strAccountType = strAccountType;
request_x.strAddress1 = strAddress1;
request_x.strAddress2 = strAddress2;
request_x.strCity = strCity;
request_x.strState = strState;
request_x.strZip = strZip;
request_x.strEmail = strEmail;
request_x.strHomePhone = strHomePhone;
Map<String, csCallCenterWS.CreateNewAccountResponse_element> response_map_x = new Map<String, csCallCenterWS.CreateNewAccountResponse_element>();response_map_x.put('response_x', response_x);WebServiceCallout.invoke(
this,request_x,
response_map_x,
new String[]{endpoint_x,'http://example.com/csCallCenter/csCallCenterService/CreateNewAccount',
'http://example.com/csCallCenter/csCallCenterService','CreateNewAccount',
'http://example.com/csCallCenter/csCallCenterService','CreateNewAccountResponse',
'csCallCenterWS.CreateNewAccountResponse_element'});
response_x = response_map_x.get('response_x'); return response_x.CreateNewAccountResult;}
When I run the code I get this error...
"System.CalloutException: Web service callout failed: Unable to parse callout response. Apex type not found for element CreateNewAccount"
Does anybody know how I can find out what the issue might be?
Ok. That's what I thought. So, how do I ensure that the WSDL has the response defined correctly? There are two responses that come back. A success and an error with different nodes depending on the type. Is there any documentation that explains how to code this in the WSDL?
PS - I'm new to sales force programming so forgive me if I don't sound like I know what I'm doing....