Files
luos/workflow/engine/methods/services/wso2.php

48 lines
1.4 KiB
PHP
Raw Normal View History

2010-12-02 23:34:41 +00:00
<?php
function wsBaseLogin ($username, $password)
{
G::LoadClass( 'wsBase' );
$ws = new wsBase();
2010-12-02 23:34:41 +00:00
$res = $ws->login( $username, $password );
return $res->getPayloadArray();
}
function wsBaseProcessList ($studentName)
{
G::LoadClass( 'wsBase' );
$ws = new wsBase();
$result = $ws->processList();
//$result[] = array ( 'guid' => 'a' . $studentName , 'name' => 'bc' );
//$result[] = array ( 'guid' => '2a' , 'name' => '2bc' . $studentName );
//$result[] = array ( 'guid' => '2a' , 'name' => '2bc' . $studentName );
return array ("processes" => $result
);
2010-12-02 23:34:41 +00:00
//return array ( "status_code" => 12, "message" => 'abx', "timestamp" => 'aa' );
}
2010-12-02 23:34:41 +00:00
/* Map of the service operation "ExamResult" to php function "ExamResult" */
$operations = array ("processesList" => "wsBaseProcessList","login" => "wsBaseLogin"
);
2010-12-02 23:34:41 +00:00
/* just tell your function parameters should be in mixed format,
2010-12-02 23:34:41 +00:00
that is here parameter will be the string with the name in it*/
$opParams = array ("wsBaseProcessList" => "MIXED","wsBaseLogin" => "MIXED"
);
2010-12-02 23:34:41 +00:00
//$wsdl = PATH_METHODS . "services" . PATH_SEP . "pmos.wsdl";
$wsdl = "/home/fernando/processmaker/trunk/workflow/engine/methods/services/pmos.wsdl";
echo $wsdl;
echo file_get_contents( $wsdl );
2010-12-02 23:34:41 +00:00
die();
/* Created the WSService */
$svr = new WSService( array ("wsdl" => $wsdl,"operations" => $operations,"opParams" => $opParams
) );
2010-12-02 23:34:41 +00:00
/* Reply the client */
$svr->reply();
die();