Advertisement
vishnu3006

Submit create proj

Oct 12th, 2011
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.29 KB | None | 0 0
  1. function create_freeway_project_submit($form, &$form_state){
  2. //print_r('<pre>'. print_r($form_state['values']['title'], true) .'</pre>');
  3. $projDesc = ($form_state['values']['title']);
  4. $custRef = ($form_state['values']['custRef']);
  5. $poRef = ($form_state['values']['poRef']);
  6. $strtDate = ($form_state['values']['strtdate']);
  7. $endDate = ($form_state['values']['enddate']);
  8. $splInst = ($form_state['values']['splinst']);
  9. print_r($strtDate); // this prints 2011-10-20 00:00:00
  10.  
  11. echo("One");
  12.      $LoginClient = new SoapClient("wsdl", array("trace"=>1));
  13.      echo("Two");
  14.      $AddFile = new SoapClient("wsdl", array("trace"=>1));
  15.  echo("Three");
  16.             try
  17.             {
  18.              echo("Four");
  19.                 $arrResponse = $LoginClient->Logon(array ('Username'=>'username','Password'=>'passwrd'));
  20.                 echo("Five");
  21.                 $ticket = ($arrResponse->LogonResult);
  22.                 echo("Six");           
  23.                 $createProj = $AddFile->CreateProject(array('Ticket'=>$ticket,'Description'=>$projDesc,'SpecialInstructions'=> $splInst, 'CustomReference'=> $custRef,'POReference'=> $poRef,'ExpectedStartingDate'=>$strtDate,'ExpectedDeliveryDate'=>$endDate,'MetaData'=>null));
  24.                    
  25.  
  26.             print_r($createProj);                  
  27.             }
  28.            
  29.             catch(SoapFault $exception)
  30.             {      
  31.                 echo("In Exception");      
  32.                print_r($exception);
  33.                return $exception;
  34.             }
  35.  
  36.  
  37. }
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement