Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function create_freeway_project_submit($form, &$form_state){
- //print_r('<pre>'. print_r($form_state['values']['title'], true) .'</pre>');
- $projDesc = ($form_state['values']['title']);
- $custRef = ($form_state['values']['custRef']);
- $poRef = ($form_state['values']['poRef']);
- $strtDate = ($form_state['values']['strtdate']);
- $endDate = ($form_state['values']['enddate']);
- $splInst = ($form_state['values']['splinst']);
- print_r($strtDate); // this prints 2011-10-20 00:00:00
- echo("One");
- $LoginClient = new SoapClient("wsdl", array("trace"=>1));
- echo("Two");
- $AddFile = new SoapClient("wsdl", array("trace"=>1));
- echo("Three");
- try
- {
- echo("Four");
- $arrResponse = $LoginClient->Logon(array ('Username'=>'username','Password'=>'passwrd'));
- echo("Five");
- $ticket = ($arrResponse->LogonResult);
- echo("Six");
- $createProj = $AddFile->CreateProject(array('Ticket'=>$ticket,'Description'=>$projDesc,'SpecialInstructions'=> $splInst, 'CustomReference'=> $custRef,'POReference'=> $poRef,'ExpectedStartingDate'=>$strtDate,'ExpectedDeliveryDate'=>$endDate,'MetaData'=>null));
- print_r($createProj);
- }
- catch(SoapFault $exception)
- {
- echo("In Exception");
- print_r($exception);
- return $exception;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement