Forum Discussion
Ian_McKenna_113
Nimbostratus
May 18, 2006why is ProfilePersistence- create not working?
Hi it's me again,
I am trying to create a Persistence Profile, using:
--------------------------------------------
my $ProfileCreate = SOAP::Lite
-> uri('urn:iControl:Loc...
May 18, 2006
I'll have to look into that message as I agree it's not very intuitive.
As for your code, you are close. You'll need to pass the string literal value for the PersistenceMode parameter. In 4.x, enums were represented by their numeric values. In 9.x we moved to the string values as we found it more intuitive.
In your code, you were passing in the mode of value 0 or (PERSISTENCE_MODE_NONE). Are you sure that is what you wanted to do? If so, this should work:
my $sName = "testprof";
my $sMode = "PERSISTENCE_MODE_NONE";
my $soapResponse = $ProfileCreate->create(
SOAP::Data->name( profile_names => [$sName] ),
SOAP::Data->name( modes => [$sMode])
);
Not sure why you'd want to create a persistence profile of type none, but that's how it's done. To create a cookie persistence profile, use this:
my $sName = "testprof";
my $sMode = "PERSISTENCE_MODE_COOKIE";
my $soapResponse = $ProfileCreate->create(
SOAP::Data->name( profile_names => [$sName] ),
SOAP::Data->name( modes => [$sMode])
);
-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