Forum Discussion
jj24_43946
Nimbostratus
Jun 13, 2011Help with LocalLB::VirtualServer/Create
Hi again, I'm trying to create a VirtualServer, but I'm gettting the following error: SOAP-ENV:Server Could not find element by name: profile_context Here's my profile part of the datastructure: ...
Jun 14, 2011
I'm not sure how you are passing the values into the actual create method so it's hard to predict what the exact problem is. Here's how I've done it in the past
sub createVirtual()
{
$VirtualServerDefinition =
{
name => "Sitename_VS",
address => "10.10.10.254",
port => "0", "80",
protocol => "PROTOCOL_TCP"
};
$wildmask = "255.255.255.255";
$VirtualServerResource =
{
type => "RESOURCE_TYPE_POOL",
default_pool_name => "Sitecode_B2C_http"
};
$VirtualServerProfile =
{
profile_context => "PROFILE_CONTEXT_TYPE_ALL",
profile_name => "Sitecode_prod_http_VS"
};
$soapResponse = $VirtualServer->create
(
SOAP::Data->name(definitions => [$VirtualServerDefinition]),
SOAP::Data->name(wildmasks => [$wildmask]),
SOAP::Data->name(resources => [$VirtualServerResource]),
SOAP::Data->name(profiles => [[$VirtualServerProfile]])
);
&checkResponse($soapResponse);
print "Virtual Server Created!\n"
}Hope that helps...
-Joe