Re: Explanation of EXEC calls in Openca

View: New views
3 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: Explanation of EXEC calls in Openca

by Massimiliano Pala-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

sorry not being more involved in the discussions on the ML.. it is a very
intense period for me.. :D But I am always here to help..

Coming to the problem..

The code that performs the evaluation of the EXEC:: is located in the
lib/request-utils.lib at line 169 - you are trying to execute
code passing parameters that are really variables.. this is not supported
in the EXEC code..you may need to modify the eval expression there...

Have you tried to pass the $VAR_NAME directly instead of using a function
to concatenate the values ? I am not sure it would work.. but something
like:
...
<value>$ADDITIONAL_ATTRIBUTE_FIRSTNAME $ADDITIONAL_ATTRIBUTE_MIDDLEINITIAL \
$ADDITIONAL_ATTRIBUTE_LASTNAME,$ADDITIONAL_ATTRIBUTE_SUFFIX</value>
...

I do not know if those values are actually exported as variables...

For this to work, you might need to change the code (lines 186-192) to
something like:

} else {
        my $newVal = undef;
        my $origVal = undef;

        $origVal = $tmpVal;
        foreach my $l ( $origVal =~ /\$([^\s]+)/g ) {
          $newVal = $query->param("$l");
                if( $newVal eq "" ) {
                        $newVal = (eval $$l);
                }

          $value[$t] =~ s/(\$$l)/$newVal/;
        }
}

Let me know if this works... :D

Ciao,
Max


blainedw@... wrote:
>
> Hi Max,
>
> Not sure how much you look at the openca mailing lists (especially the
> user one) but I have a question about how the EXEC calls work in
> browser_req.xml. I would like to call a custom function I wrote and pass
> some parameters to it but it doesn't seem to like paramters being
> passed. Really appreciate any feedback...

--

Best Regards,

        Massimiliano Pala

--o------------------------------------------------------------------------
Massimiliano Pala [OpenCA Project Manager]  Massimiliano.Pala@...
                                                  project.manager@...

Dartmouth Computer Science Dept               Home Phone: +1 (603) 369-9332
PKI/Trust Laboratory                          Work Phone: +1 (603) 646-9179
--o------------------------------------------------------------------------

People who think they know everything are a great annoyance to those of us
who do.
                                                           -- Isaac Asimov


------------------------------------------------------------------------------

_______________________________________________
Openca-Users mailing list
Openca-Users@...
https://lists.sourceforge.net/lists/listinfo/openca-users

smime.p7s (4K) Download Attachment

Parent Message unknown Re: Explanation of EXEC calls in Openca

by blainedw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks for the response!

I already tried just a concat of the variables but of course I got extra spaces if I didn't have a middle initial. I also strangely got a / at the end if I didn't have a suffix. So that's why I was investigating using a function call to clean that up.

I will investigate the portion of the lib code you provided.

Dave
>From David Blaine's blackberry


----- Original Message -----
From: Massimiliano Pala [Massimiliano.Pala@...]
Sent: 06/25/2009 02:11 PM AST
To: David Blaine
Cc: Openca Users <openca-users@...>
Subject: Re: [Openca-Users] Explanation of EXEC calls in Openca



Hi,

sorry not being more involved in the discussions on the ML.. it is a very
intense period for me.. :D But I am always here to help..

Coming to the problem..

The code that performs the evaluation of the EXEC:: is located in the
lib/request-utils.lib at line 169 - you are trying to execute
code passing parameters that are really variables.. this is not supported
in the EXEC code..you may need to modify the eval expression there...

Have you tried to pass the $VAR_NAME directly instead of using a function
to concatenate the values ? I am not sure it would work.. but something
like:
...
<value>$ADDITIONAL_ATTRIBUTE_FIRSTNAME $ADDITIONAL_ATTRIBUTE_MIDDLEINITIAL \
$ADDITIONAL_ATTRIBUTE_LASTNAME,$ADDITIONAL_ATTRIBUTE_SUFFIX</value>
...

I do not know if those values are actually exported as variables...

For this to work, you might need to change the code (lines 186-192) to
something like:

} else {
        my $newVal = undef;
        my $origVal = undef;

        $origVal = $tmpVal;
        foreach my $l ( $origVal =~ /\$([^\s]+)/g ) {
          $newVal = $query->param("$l");
                if( $newVal eq "" ) {
                        $newVal = (eval $$l);
                }

          $value[$t] =~ s/(\$$l)/$newVal/;
        }
}

Let me know if this works... :D

Ciao,
Max


blainedw@... wrote:
>
> Hi Max,
>
> Not sure how much you look at the openca mailing lists (especially the
> user one) but I have a question about how the EXEC calls work in
> browser_req.xml. I would like to call a custom function I wrote and pass
> some parameters to it but it doesn't seem to like paramters being
> passed. Really appreciate any feedback...

--

Best Regards,

        Massimiliano Pala

--o------------------------------------------------------------------------
Massimiliano Pala [OpenCA Project Manager]  Massimiliano.Pala@...
                                                  project.manager@...

Dartmouth Computer Science Dept               Home Phone: +1 (603) 369-9332
PKI/Trust Laboratory                          Work Phone: +1 (603) 646-9179
--o------------------------------------------------------------------------

People who think they know everything are a great annoyance to those of us
who do.
                                                           -- Isaac Asimov



This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information.  No one else may read, print, store, copy, forward or act in reliance on it or its attachments.  If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.


------------------------------------------------------------------------------

_______________________________________________
Openca-Users mailing list
Openca-Users@...
https://lists.sourceforge.net/lists/listinfo/openca-users

------------------------------------------------------------------------------

_______________________________________________
Openca-Users mailing list
Openca-Users@...
https://lists.sourceforge.net/lists/listinfo/openca-users

Re: Explanation of EXEC calls in Openca

by blainedw :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi Max,


I did try your suggestion to use the variables but some variables might be null and therefore leave an extra blank space that is unnecessary. So I'm still hoping that you will support calling params in an EXEC call. Someone else said they had this same problem and resolved it by adjusting the perl code. I tried repeatedly contacting them but too no avail. My perl skills aren't that good either. I made some adjustments to what I thought would fix it and it didn't work too well so I reverted back to the original code.

Help!!!

Dave This is an e-mail from General Dynamics Land Systems. It is for the intended recipient only and may contain confidential and privileged information. No one else may read, print, store, copy, forward or act in reliance on it or its attachments. If you are not the intended recipient, please return this message to the sender and delete the message and any attachments from your computer. Your cooperation is appreciated.
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Openca-Users mailing list
Openca-Users@...
https://lists.sourceforge.net/lists/listinfo/openca-users