The EditProgram SOAP method allows you to programmatically edit a content record on your TelVue Princeton™ server.
You need to have installed:
http://myserver/program_service/wsdl
Substitute the hostname, domain, or IP Address of your server instead of myserver.
myserver
ID
Integer
program_code
String
program
episode
episode_code
description
delete_datetime
DateTime
2009-12-31 14:39:23-04:00
import_datetime
expected_duration
expected_filename
contributor
location
username
Copy the Ruby script below to your system. Substitute the IP address of your server instead of 192.168.1.150.
########################### # Example Ruby script to call the EditProgram() method of TelVue Corporation # SOAP Web Service. ########################### require 'soap/wsdlDriver' begin service=SOAP::WSDLDriverFactory.new( "http://192.168.1.150/program_service/wsdl" ).create_rpc_driver response_message = service.EditProgram( 15, "M8", "Example TBD Program", "S8", "8", "This is an example TBD program added via SOAP.", "2009-12-31T14:39:23-04:00", "2002-12-01T14:39:23-04:00", 80, "example_tbd.mpg", "WEBUS Promo", "Mt. Laurel, NJ", "psgadmin" ) puts response_message rescue StandardError => e puts e.class puts e.message puts e.backtrace end
You must have the PHP-Soap library installed. PHP-Soap is bundled by default with most PHP installations, including popular all-in-one installers like XAMPP for Windows and Linux. To find out if PHP-Soap in installed, create a file in your web project called info.php with these 3 lines in it:
Browse it in a web browser. Perform a Find (Ctrl-F) for the word “soap”. You should see the PHP-Soap extensions installed.
If you do not have PHP-Soap installed, outlining how to do so is beyond the scope of this article. There are plenty of instructions online.
Change the IP Address and data in these example accordingly.
' . $result[1] . ' '); } } catch (SoapFault $fault) { trigger_error( "SOAP Fault: ( faultcode: {$fault->faultcode}, faultstring: {$fault->faultstring} )", E_USER_ERROR ); } ?>
Note that Delete Date, in the above example, shows how to insert a NULL into the database for that column.
200
SUCCEEDED
FAILED
User is not authorized: username
Content file not found for ID: id
Invalid import datetime entered: import_datetime
Invalid delete datetime entered: delete_datetime