Forum Discussion
Brian_O_Kelley_
Nimbostratus
Jan 01, 2008No fault on VirtualServer.create but nothing happens
I saw this on a number of commands, usually when I had an incorrect parameter. This worries me - I'm making the assumption that if no SOAPFault occurs, my command completed successfully. I see the com...
Jan 02, 2008
The issue you are having is that the wildmasks parameter you are passing in converting to an zero length array. The server side logic will parse loop over the input arrays and expects that all the arrays are of equal size and will ignore entries where the sizes don't match.
$soapResponse = $VirtualServer->create(SOAP::Data->name(definitions => [$virt_def]),
SOAP::Data->name(wildmasks => []),
SOAP::Data->name(resources => [$virt_res]),
SOAP::Data->name(profiles => [@virt_profs]));If you look at the trace, the definitions, resources, and profiles parameters are all array sized one, while the wildmasks parameter is array sized zero.
This get's to a philosophical question on how we designed the APIs in handling zero sized arrays. This is really the same behavior as if you would call a method with a single array and the size is 0. Should we throw an exception or just ignore the call as a noop? I can see the argument either way but in your case it probably would have been best to toss back a fault to warn you. But, the thing with this type of error is that it will never work so you should find it out in your development process before you move it to production. If you feel strongly about us adding exceptions in the case of incorrect sized input arrays, please submit a support case and it can get passed on to dev to look at.
In the mean time, this should work for you.
$soapResponse = $VirtualServer->create(SOAP::Data->name(definitions => [$virt_def]),
SOAP::Data->name(wildmasks => [""]),
SOAP::Data->name(resources => [$virt_res]),
SOAP::Data->name(profiles => [@virt_profs]));An empty string is how you should pass in the no wildmask option.
I haven't tested this out but everything else looks ok from first glance.
-Joe
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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