Forum Discussion
Conrad_Link_166
Nimbostratus
Oct 29, 2004problem using add_string_class_member
I'm having trouble using the new v9 add_string_class_member.
Here's the code snippet:
use SOAP::Lite;
import SOAP::Data 'name';
$soap = SOAP::Lite
...
Oct 29, 2004
Try this code out
$soap = SOAP::Lite
-> uri('urn:iControl:LocalLB/Class')
-> readable(1)
-> proxy("https://$sHost:$sPort/iControl/iControlPortal.cgi");
$class_members = { name => $sClass, members => [$sString] };
$soap_response =
$soap->add_string_class_member
(
SOAP::Data->name(class_members => [$class_members)])
);
At one point I think I tried putting single quotes around the member names in like you have in your sample and I think that caused problems because the single quotes were being sent with as part of the name itself. In our server code we reference elements by name so an exact string match is important. The message that the server couldn't find the element 'name' implies the parameter names aren't getting sent up properly. You can also enable debugging tracing by setting your "use" line to the following
use SOAP::Lite + trace => qw(method debug);
This way the full SOAP messages will be spit to stdout and you will be able to see what SOAP::Lite is serializing the request as.
-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