-
Soap Server with Workflow rules
Here is the challenge. I'm trying to return a notification message to the workflow rules systme in salesforce.
But, I got this message : SOAP response was a nack
My code for php5 - Soap Server is :
// première étape : désactiver le cache lors de la phase de test
ini_set("soap.wsdl_cache_enabled", "0");
// on indique au serveur à quel fichier de description il est lié
$serveurSOAP = new SoapServer('workflow.wsdl');
// ajouter la fonction getHello au serveur
$serveurSOAP->addFunction('notifications');
// lancer le serveur
if ($_SERVER['REQUEST_METHOD'] == 'POST')
{
$serveurSOAP->handle();
}
else
{
echo 'désolé, je ne comprends pas les requêtes GET, veuillez seulement utiliser POST';
}
function notifications()
{
return 0;
}
Who know how to manipulate data coming from outbound message coming from salesforce ?
-
Patrick
thanks for posting your problem but I do not connect to Salesforce this way and I am not familiar with the WSDL file that you are referring to in your post. Have you checked the API documentation to see if this is even a can do? Maybe it would be better to post this over at the Salesforce developers forum
Sorry if this is not the response you were looking for
~Mike
-
After 6 hours of searching
there is the way to accept the soap files from the workflow rules with outbound message for php5 and is soap web service.
<?php
function bar($param)
{
/* Connect to the db */
$link = mysql_connect('localhost', 'webservice', '18067311')
or die('Could not connect : ' . mysql_error($link));
mysql_select_db('webservice', $link)
or die('Could not select database');
// Extract param from the xml file
while (list($key, $val) = each($param)) {
$Soap_Result .= "$key => $val\n";
}
$query = "INSERT INTO `webservice`.`log` (`Id` ,`Soap_Original` ,`Soap_Result`) VALUES (NULL , '".$Soap_Original."', '".$Soap_Result."');";
$result = mysql_query($query, $link) or die('Query failed : ' . mysql_error($link));
/* Mysql connection close */
mysql_close($link);
}
function notifications($param)
{
// Update the db
$result = bar($param);
// Return the result to salesforce Workflow
return array('Ack'=>true);
}
/* Create the Web service - SOAP server */
$server = new SoapServer("workflow.wsdl", array('encoding'=>'UTF-8'));
# Add the action call
$server->addFunction('notifications');
$server->handle();
?>
-
The WSDL files come from your workflow interface in salesforce
You'll find you file inside the details of an outbound action message
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Bookmarks