Software Development Kit (SDK) and API Discussions

"storage-service-dataset-modify" Error: Extra content at the end of the document

TYNOVPET_TIETO
2,312 Views

I am getting error : Error: Extra content at the end of the document  when I am trying to attach storage policy to dataset. What I am doing wrong?

sub storage_policy {

        # Reading the server object

        my $server = $_[0];

        my $input = NaElement->new("storage-service-dataset-modify");

        $input->child_add_string("dataset-name-or-id", $dfmval);

        $input->child_add_string("operation-type", attach);

        $input->child_add_string("storage-service-name-or-id", $storage_policy);

        # invoking the api and printing the xml ouput

        my $output =  $server->invoke($input);

        print "\n$output\n";

        print( "Error : " . $output->results_reason() . "\n" ) and exit(-2)

          if ( $output->results_status() eq "failed" );

        print "\nResult: " . result( $output->results_status() ) . "\n";

}

Thanks, Petr

1 ACCEPTED SOLUTION

TYNOVPET_TIETO
2,312 Views

my $output =  $server->invoke_elem($input);

View solution in original post

1 REPLY 1

TYNOVPET_TIETO
2,313 Views

my $output =  $server->invoke_elem($input);

Public