function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
manuel.garciamanuel.garcia 

Connect to external webservice from salesforce (open socket or send SOAP message from salesforce)

Hi,

I'm a developer from a project. This project is being integrated with salesforce, and I need synchronize some things about contacts in salesforce and my application.

 

My application have a webservice, listening SOAP messages. One of these SOAP message is 'call to number'. So the thing is I want to send a SOAP message from salesforce to my webservice, this SOAP message contain a phone number from a specific contact, when my webservice receive this message with the number, call the number.

 

 

Actually, I already have:

 

The apex page listing the contacts. Near phone number of each contact I have a button to call an action method;

<apex:commandButton value="LLamar" action="{!clickToCall}" rerender="all">
      <apex:param name="numToCall" value="{!a.phone}" assignTo="{!numToCall}"/>
 </apex:commandButton>

 

In my extensionClass (extensions="myContactExtension") I have;

 

public class myContactExtension

{

static public final String MY_SERVER_IP = ''xxxxxxxxxxx";

public String numToCall {get; set;}

public PageReference clickToCall()
    {

         //HERE I WANT TO SEND A SOAP MESSAGE TO MY_SERVER_IP

        //or open a socket to my SERVER_IP


    }

}

 

 

 

 Any solutions for this? Or any different method to connect to my webservice from salesforce?