You need to sign in to do that
Don't have an account?
Anto Hotelbeds
Invoking a webservice with Apex
Hi,
I have to call to an external webservice everytime a new account is created. My question is, what is the best way to do so?
I thougt about creating an after create trigger that will invoke the method in the class that was generated from the WSDL import. Would that make sense?
If so, how can I import a class into a trigger to use its methods?
Thanks a lot. Regards,
Antonio
You can define a method in a class which can be invoked from a triggger. If you have a WSDL, you can populate the data as per the XSD and it will be delivered to the endpoint.
Note - You can always use the out of the box 'Outbound Messaging' in this case.