[ 
https://issues.apache.org/jira/browse/AIRAVATA-779?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13741819#comment-13741819
 ] 

Kenno Vanommeslaeghe commented on AIRAVATA-779:
-----------------------------------------------

I don't fully understand the options you are proposing - could you provide some 
examples?

Either way, I don't think there exists a generic solution. There are a lot of 
UNIX tools and programs that accept a variable-length argument list. No matter 
whether you go with a quoted or a comma-separated list, it will break services 
that directly call such applications (without a wrapper script) because both 
list types will be passed as a single argument. So either you have to break the 
possibility of calling these UNIX tools and programs without a wrapper script, 
or you have to specify that no Xbaya service should ever receive more than one 
array (of a different type).

The big advantage of my proposal is that space-separated lists are the native 
list format in UNIX, making the required wrapper script extremely simple:
{code:language=bash}
#!/bin/sh
# Wrapper script to pass 2 arrays to the program "ls"
arglist1="$1"
arglist2="$2"

# In this example, all the elements are passed individually to ls because we 
don't quote "$arglist"
ls $arglist1 $arglist2
{code}
Or, an even simpler solution:
{code:language=bash}
#!/bin/sh
# The quotes are lost (unless we explicitly repeat them)
ls $1 $2
{code}
To further illustrate the ease of handling space-separated lists in the shell, 
here's a script to perform an operation on each element of an array:
{code:language=bash}
#!/bin/sh
arglist1="$1"

for i in $arglist1 ; do
  cp -p $i $i.bak
 done
{code}
                
> Xbaya: handling of StringArray is not consistent with URIArray
> --------------------------------------------------------------
>
>                 Key: AIRAVATA-779
>                 URL: https://issues.apache.org/jira/browse/AIRAVATA-779
>             Project: Airavata
>          Issue Type: Bug
>          Components: GFac, XBaya
>            Reporter: Suresh Marru
>             Fix For: 0.9
>
>
> Reported by Airavata user at - 
> https://gateways.atlassian.net/browse/PARAMCHEM-115

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to