Callout is a ASynchronous process where as Trigger is Dynamic / Synchrinous.
That means it is not directly possible to do a webservice callout from a triiger.
But using @Future annotation we can convert the Trigger into a Asynchrinous Class and we can use a Callout method.
See the links below for some more information ,
You can invoke callouts from triggers by encapsulating the callouts in @future methods: http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm?SearchType=Stem
Mentioned in the idea: https://success.salesforce.com/ideaview?id=087300000007LfiAAE
A related thread,
Callout from triggers are currently not supported.
An Apex trigger can execute a callout when the callout is invoked within a method defined as asynchronous: that is, defined with the @future keyword. The @future annotation signifies that the Apex method executes asynchronously. For more information on the @future annotation, please read the documentation.
Main Doc: Apex Web Services and Callouts https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
Callout is a ASynchronous process where as Trigger is Dynamic / Synchrinous.
That means it is not directly possible to do a webservice callout from a triiger.
But using @Future annotation we can convert the Trigger into a Asynchrinous Class and we can use a Callout method.
See the links below for some more information ,
You can invoke callouts from triggers by encapsulating the callouts in @future methods:
http://www.salesforce.com/us/developer/docs/apexcode/index_Left.htm#StartTopic=Content/apex_classes_annotation.htm?SearchType=Stem
Mentioned in the idea: https://success.salesforce.com/ideaview?id=087300000007LfiAAE
A related thread,
Callout from triggers are currently not supported.
https://developer.salesforce.com/forums?id=906F00000008wVrIAI
An Apex trigger can execute a callout when the callout is invoked within a method defined as asynchronous: that is, defined with the @future keyword. The @future annotation signifies that the Apex method executes asynchronously. For more information on the @future annotation, please read the documentation.
Main Doc: Apex Web Services and Callouts
https://developer.salesforce.com/page/Apex_Web_Services_and_Callouts
Regards,
Ashish