Skip to content

Unable to get stream uri because of soap validation constraint violation #5

Description

@tozman51

On a PTZ camera, I can get Presets, send presets etc, but I didn't manage to get the stream URI unfortunately, despite spending hours tinkering with the library and checking the ONVIF specs...

Here is how I ask for streams :

$o = new Rockyjvec\Onvif\Onvif("http://192.168.1.47:81/onvif/device_service", "admin", "password");
$o->media->GetProfiles();

$params = [
			'StreamSetup'=>
				[	
					'Stream'=>'RTP-Unicast',
					'Transport'=>
						[
							'Protocol'=>'RTSP'
						]
				],
				'ProfileToken' => 'profile_cam1_stream1'
		  ];
		  
print_r($o->media->GetStreamUri($params));

And here is the output :

PHP Fatal error: Uncaught SoapFault exception: [s:Client] Validation constraint violation: empty value provided where a value is required in element 'SOAP-ENC:Struct' in /home/nicolas/Projets/onphp/vendor/rockyjvec/onvif/src/Rockyjvec/Onvif/Soap/SoapClient.php:75

If someone passes by and succesfully cot their camera stream uri :) any help is welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions