Well...I have a workaround now....I change just the push of the PL, to add
the Container type as well

        push @{$c_dailyPL->{referenceList}}, {
                permittedGroups => [],
                value_dataType => 'null',
                value => undef,
                dataType => 1,
                type => 32785,
                label => '',
                description => ''
              };

        push @{$c_dailyPL->{referenceList}}, {
                dataType => 0,
                name => $pl_name,
                type => 6,
                description => "",
                label => "",
              };

this makes it so that the pl I'm adding is preceeded by the proper external
reference type...so it shows up in the admin tool properly, it really screws
up the references section of the container...but it works. 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Thilo Stapff
Sent: Thursday, September 18, 2008 12:13 PM
To: ARSperl User Discussion
Subject: Re: [Arsperl-users] ars_SetContainer

I didn't meant to say that we have a bug here. To me it just looks like the
order of the references does indeed matter.


LJ Longwing wrote:
> Just my luck....finding a bug on my first real use of an API tool.  So
does
> anyone know the procedure to submit a bug, or get confirmation of a bug
and
> then a fix? 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Thilo Stapff
> Sent: Thursday, September 18, 2008 12:03 PM
> To: ARSperl User Discussion
> Subject: Re: [Arsperl-users] ars_SetContainer
> 
> The order might indeed be important. This is just a guess, but it somehow
> looks like a method to tell the Admin Tool, which kind of container is
meant
> by the references.
> 
> Note that the reference to "20080527-CherylConversionFormChanges" has type
> => 6, which means only "container", so the Admin Tool doesn't know
>   that it should display the entry as a packing list.
> 
> Here's the constants from ar.h for the "dataType => 1" references:
> 
> 32783 => ARREF_PACKINGLIST_GUIDE
> 32784 => ARREF_PACKINGLIST_APP
> 32785 => ARREF_PACKINGLIST_PACK
> 32792 => ARREF_PACKINGLIST_DSOPOOL
> 32793 => ARREF_PACKINGLIST_FILTER_GUIDE
> 32801 => ARREF_PACKINGLIST_WEBSERVICE
> 
> To me it looks like packing lists have to be put directly after the "type
=>
> 32785" entry, filter guides after the "type => 32793" entry etc.
> This would mean that the Admin Tool mistakes the reference in the
> script-generated packing list for a web service.
> 
> As I said, just guessing ...
> 
> 
> Regards,
> Thilo
> 
> 
> 
> LJ Longwing wrote:
>> ARS 7.1 Patch 2
>> ARSPerl 1.90
>> ActivePerl-5.8.8.819
>> Windows 2003
>>
>> Ok...what I decided to do in this case was basically what the example 
>> showed...just take my existing PL and in all essence do a save as...so 
>> I got the create working the way I want...I even successfully took the 
>> contents of one PL and added it to another PL...but I'm having trouble 
>> manually adding one packing list (not the contents...just the PL) to 
>> another...here is my code
>>
>>      my $c_dailyPL = ars_GetContainer($c,$dailyPL);
>>
>>      push @{$c_dailyPL->{referenceList}}, {
>>              dataType => 0,
>>              name => $pl_name,
>>              type => 6,
>>              description => "",
>>              label => ""
>>            };
>>
>>      ars_SetContainer( $c, $dailyPL, $c_dailyPL ) || die $ars_errstr;
>>
>> This generates no errors....but when I look in the admin tool...the PL 
>> isn't in the PL....so I played around a bit with the Data dumper.  
>> Here is the output of the container when I add the PL through the 
>> admin tool
>>
>> $packingList = {
>>                  'owner' => 'longwing.lj',
>>                  'ownerObjList' => [],
>>                  'numReferences' => 6,
>>                  'name' => '20080918-DailyMaster',
>>                  'lastChanged' => 'longwing.lj',
>>                  'objPropList' => [
>>                                     {
>>                                       'prop' => 60020,
>>                                       'value' => '',
>>                                       'valueType' => 'char'
>>                                     }
>>                                   ],
>>                  'timestamp' => 1221755866,
>>                  'adminList' => [],
>>                  'type' => 'pack',
>>                  'groupList' => {},
>>                  'referenceList' => [
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32783,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32793,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32784,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32785,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'dataType' => 0,
>>                                         'name' => 
>> '20080527-CherylConversionFormChanges',
>>                                         'type' => 6,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32801,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       }
>>                                     ]
>>                };
>>
>> here is the output when I add the PL through my script
>>
>> $packingList = {
>>                  'owner' => 'longwing.lj',
>>                  'ownerObjList' => [],
>>                  'numReferences' => 6,
>>                  'name' => '20080918-DailyMaster',
>>                  'lastChanged' => 'Webservice',
>>                  'objPropList' => [
>>                                     {
>>                                       'prop' => 60020,
>>                                       'value' => '',
>>                                       'valueType' => 'char'
>>                                     }
>>                                   ],
>>                  'timestamp' => 1221756118,
>>                  'adminList' => [],
>>                  'type' => 'pack',
>>                  'groupList' => {},
>>                  'referenceList' => [
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32783,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32793,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32784,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32785,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'permittedGroups' => [],
>>                                         'value_dataType' => 'null',
>>                                         'value' => undef,
>>                                         'dataType' => 1,
>>                                         'type' => 32801,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       },
>>                                       {
>>                                         'dataType' => 0,
>>                                         'name' => 
>> '20080527-CherylConversionFormChanges',
>>                                         'type' => 6,
>>                                         'label' => '',
>>                                         'description' => ''
>>                                       }
>>                                     ]
>>                };
>>
>> The only difference I can see is the order of the last two 
>> elements...I don't see why that would be important, but it may be.  
>> Your assistance is appreciated.
>>
>>  
>>
>> -----Original Message-----
>> From: [EMAIL PROTECTED] 
>> [mailto:[EMAIL PROTECTED] On Behalf Of Thilo Stapff
>> Sent: Thursday, September 18, 2008 3:20 AM
>> To: ARSperl User Discussion
>> Subject: Re: [Arsperl-users] ars_CreateContainer
>>
>> You might try the following:
>>
>> - create a packing list in the Admin Tool
>> - read the Object via ars_GetContainer
>> - print the resulting data structure with Data::Dumper
>> - use the output as a template for your packing list
>>
>> This should work because usually the structure for the ars_Create... 
>> functions is the same as returned from the ars_Get... functions.
>>
>> Here's a code snippet:
>>
>>
>> my $packingList = ars_GetContainer( $ctrl, $packingListName );
>>
>> die "ars_GetContainer($packingListName): $ars_errstr\n" if 
>> $ars_errstr;
>>
>>
>> use Data::Dumper;
>> print Data::Dumper->Dump( [$packingList], ['packingList'] );
>>
>>
>>
>> Regards,
>> Thilo Stapff
>>
>>
>>
>> LJ Longwing wrote:
>>> Hey...I'm new to this list...so please go easy on me.
>>>
>>> ARS 7.1 Patch 2
>>> ARSPerl 1.90
>>> ActivePerl-5.8.8.819
>>> Windows 2003
>>>
>>> I've been using ARSPerl for quite some time, but mainly the client 
>>> functions.  I'm writing a script with the intention of taking 2 
>>> packing list names, determining if one of them exists, if not, create 
>>> it, if it does I want to add the contents of pl1 to pl2 and update to 
>>> the
>> server.
>>> I've been using the Java 7.1 API and have done this there...but I 
>>> don't want to write an entire program and hafta call it from my perl 
>>> script to get this done.  I have successfully used ars_GetContainer, 
>>> and determined if pl2 exists on the server, I'm at the point where 
>>> I'm trying to create a new container and can't find ANY good 
>>> documentation about how to create the hash in question.  Any and all 
>>> help is appreciated, most preferable of course would be a snippet of 
>>> code that would create a 'blank' packing list.
>>>
>>> Thanks for your time.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> --
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> --- This SF.Net email is sponsored by the Moblin Your Move 
>>> Developer's challenge Build the coolest Linux based applications with 
>>> Moblin SDK & win great prizes Grand prize is a trip for two to an 
>>> Open Source event anywhere in the world 
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>
>>>
>>> ---------------------------------------------------------------------
>>> -
>>> --
>>>
>>>
>>>
>>> --
>>> Arsperl-users mailing list
>>> Arsperl-users@arsperl.org
>>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>>
>> ----------------------------------------------------------------------
>> --- This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge Build the coolest Linux based applications with Moblin SDK & 
>> win great prizes Grand prize is a trip for two to an Open Source event 
>> anywhere in the world 
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>
>>
>> --
>> Arsperl-users mailing list
>> Arsperl-users@arsperl.org
>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>>
>>
>> ----------------------------------------------------------------------
>> --- This SF.Net email is sponsored by the Moblin Your Move Developer's 
>> challenge Build the coolest Linux based applications with Moblin SDK & 
>> win great prizes Grand prize is a trip for two to an Open Source event 
>> anywhere in the world 
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>
>>
>> --
>> Arsperl-users mailing list
>> Arsperl-users@arsperl.org
>> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>>
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes Grand prize is a trip for two to an Open Source event anywhere in
the
> world http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> --
> Arsperl-users mailing list
> Arsperl-users@arsperl.org
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
> 
> 
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
challenge
> Build the coolest Linux based applications with Moblin SDK & win great
prizes
> Grand prize is a trip for two to an Open Source event anywhere in the
world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> 
> 
> --
> Arsperl-users mailing list
> Arsperl-users@arsperl.org
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
> 


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great
prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


--
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/


--
Arsperl-users mailing list
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to