AnsweredAssumed Answered

Sugar 7.5 : How do i call an external SOAP Webservice ?

Question asked by Gaelle Fernandez on Aug 20, 2015
Latest reply on Sep 9, 2015 by Emil Maran
Hello everyone !

I've come to the big point on my project, and i need a little help on this.

What i want to do : 

In Leads module, on record view i have set a new button called "Send lead to X".
X is a software used by my clients.

This button should get the current Lead's informations, and call an external Soap Webservice.

What i have :
- no knowledges of how a WS works. (in fact, yes I have, but little, kind of messy and gathered online)
- i have the external WS' endpoint
- i have its WSDL file.
- I know the informations should be sent in XML (but do i send a file or just a string?)
- I know which of this WS' methods i should call.

I am totally new to WS vocabulary, and really new in the basic operations of Webservices. 

I've found many ways to call a Sugar WS (like calling the rest method to get the accounts), but not so many saying how to send informations to an external Soap WS...

So please, could you describe me the process my code should follow ?
(like : when clicking on the button, in record.js do an ajax call, which sends lead's informations via xml to that new cool address of WS.)

And please, tell me which files i have to create/modify ?

I know my question will be considered as dumb, because Webservices are really trendy but i'm rally new to this, and all i ask is to learn.

So thanks a lot for helping a little dummy in this gigantic world, thank you for your time :)

Outcomes