- Sat Mar 28, 2009 7:25 am
#2151
Try the below code:
This is a bug, and I hope that you guys can fix it fast.
Code: Select all
The program will enter into the workflow\engine\methods\services\soap.php, inside the function NewCase($params), at this particular sub-routine:
$wsdl = ""; //your wsdl
$client = new SoapClient($wsdl);
$dwer= $client->login(array('userid'=>$usr, 'password'=>$pass));
$sessionId = $dwer->message;
$aVariables = array('CaseTitle'=>'big case',);
$aVariables = array();
foreach ( $variables as $key => $val ) {
$obj = new stdClass();
$obj->name = $key;
$obj->value = $val;
$aVariables[] = $obj;
}
$params = array('sessionId'=>$sessionId, 'processId'=> $proUid, 'taskId'=> $taskUid,
'variables'=>$aVariables );
echo serialize($aVariables).'<br/>';
$result = $client->__SoapCall('NewCase', array($params));
Code: Select all
with the serialized array for $variables
else {
if ( is_object ($variables) ) {
foreach ( $variables as $key=>$val ) {
$name = $val->name;
$value = $val->value;
$Fields[ $val->name ]= $val->value ;
}
//$Fields[ $variables->name ]= $variables->value ;
}
Code: Select all
Note that the above code in NewCase doesn't handle the $variables properly. a:1:{i:0;O:8:"stdClass":2:{s:4:"name";s:9:"CaseTitle";s:5:"value";s:8:"big case";}}
This is a bug, and I hope that you guys can fix it fast.