Forum Discussion
mfreeman451_606
Nimbostratus
Apr 15, 2009Question on KeyCertificate / Perl API (SOAP)
I'm trying to do stuff with KeyCertificate, specifically certificate_delete. It is supposed to take two options, mode and cert_ids
I'm getting this error:
...
Apr 15, 2009
The prototype for the certificate_delete method is the following:
Management::KeyCertificate::certificate_delete(
in ManagementModeType mode,
in String [] cert_ids
);
You are passing in a literal for the cert_ids parameter but the iControl portal is expecting a string array. The default processing is to treat string literals as zero sized arrays (not sure why this is, but it is) so your method invocation is being treated like a no-op.
You'll want to coerce your literal into an array by surrounding it with brackets.
my $soapResponse = $keyCert->certificate_delete(
SOAP::Data->name( mode => $args{'mode'} ),
SOAP::Data->name( cert_ids => [$args{'cert_ids'}] )
);
And that should take care of it for you.
As for your previous question about using a single SOAP::Data to pass in your $args variable, the SOAP::Lite client toolkit requires you to use a separate SOAP::Data parameter for each inbound parameter. I'm not a big perl guru but if you can dig through the Lite.pm module and see why that is and report back here, we'd appreciate it!
Anyways, hope this helps and let us know if anything else comes up.
-Joe
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects