I want to know how to consume external wcf restfull service in salesforce apex class ,so that i will call i class开发者_如何学运维 in the triggers for invoking service.
Two issues:
- Triggers don't allow http callouts
- If by "consume" you mean auto generate code, salesforce can't consume RESTfull services.
For (1), you can look at using asynchronous (@future annotation) methods or a scheduled batch processes (Database.Batchable and Schedulable interfaces) to callout to an external service based on a changes in the database.
For (2), Salesforce can consume WSDL based SOAP web services (note that the Salesforce WSDL parser is fairly limited), or you can use their HTTP classes to manually connect to your RESTfull service.
精彩评论