public void CreateNewAccount() { csCallCenterWS.csCallCenterSoap csWebHost = new csCallCenterWS.csCallCenterSoap(); csCallCenterWS.CreateNewAccountResult_element result = csWebHost.CreateNewAccount('CEISAxis41', 's4axis', 310201, 'FRANK', 'SINATRA', 'SINATRA, FRANK', '295', '123', '123', 'SPRINGFIELD', 'UT', '84121', 'TEST@EXAMPLE.COM', '111-111-1111');
}
The way you make the ws call looks good.
Fortunately, one can also generate Apex code stubs for a given WSDL i.e. force.com platform gives you an option to do “WSDL > Apex” compilation.
Code to invoke the external service looks like:
dbappsMywebservice1Wsdl.MyWebService1SoapHttpPort stub =
new dbappsMywebservice1Wsdl.MyWebService1SoapHttpPort();
String result = stub.placeOrder(1, 2, 3);
Quick advice! i have a WSDL2Apex class on my sandbox which i want to deploy to prod. My question is, do i need to write a test class for it before it can be successfully loaded to salesforce?
Setting Up Your Salesforce.com Web Services API Applications
This method is used to log in to salesforce and set the |
03 | * private class variables for the wrapper, including the |
04 | * session ID. |
For example, you can use the future annotation when making an asynchronous Web service callout to an external service
The getContent and getContentAsPDFPageReference methods cannot be used in methods with the future annotation.
WebService provides exchange rate and currency conversion information.
Hopefully Everything to make this easier
http://webservices.gama-system.com/exchangerates.asmx
xsd:anyType Can be ID, Boolean, double, integer, string, date, or dateTime.
no char... use string?
How Webservice ties to HttpRequest
Contact sObject based on incoming parameters: