NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

Software Development Kit (SDK) and API Discussions

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

TYNOVPET_TIETO
2,814 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,814 Views

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

View solution in original post

1 REPLY 1

TYNOVPET_TIETO
2,815 Views

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

Public