Issue with "group-set-options" api.


I'm using Oncommand version: 5.1

I'm trying to set the options for a existing group via perl script and end up in following error.

"Extra content at the end of the document".

I tried the same thing with ZEDI and apitest and it works perfectly fine.

Here is the code snip.

  my $group_opt_elem = NaElement->new("group-set-options");

  $group_opt_elem->child_add_string("group-name-or-id", "s_test5");

  my $group_info_elem = NaElement->new("group-option-info");


  $group_info_elem->child_add_string("chargeback-rate", "10");

  print $group_opt_elem->sprintf();

  my $group_opt_out = $self->{dfm}->invoke($group_opt_elem);

  print $group_opt_out->sprintf();

$group_opt_elem->sprintf() and $group_opt_out->sprintf() gave the following XML








<results reason="Extra content at the end of the document " errno="13001" status="failed"></results>

XML generated by ZEDI (Works fine)










What am i doing wrong? Appreciate your help on this.



Re: Issue with "group-set-options" api.

Got it working. I have to replace "invoke" with "invoke_elem"

my $group_opt_out = $self->{dfm}->invoke($group_opt_elem);  This should be replaced by

my $group_opt_out = $self->{dfm}->invoke_elem($group_opt_elem);