Return-Path: X-Original-To: apmail-airavata-dev-archive@www.apache.org Delivered-To: apmail-airavata-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A3D0511D72 for ; Thu, 12 Jun 2014 15:58:03 +0000 (UTC) Received: (qmail 14262 invoked by uid 500); 12 Jun 2014 15:58:03 -0000 Delivered-To: apmail-airavata-dev-archive@airavata.apache.org Received: (qmail 14219 invoked by uid 500); 12 Jun 2014 15:58:03 -0000 Mailing-List: contact dev-help@airavata.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@airavata.apache.org Delivered-To: mailing list dev@airavata.apache.org Received: (qmail 14208 invoked by uid 99); 12 Jun 2014 15:58:03 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 15:58:03 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_QUOTING X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nadeem.cs.iit@gmail.com designates 209.85.212.171 as permitted sender) Received: from [209.85.212.171] (HELO mail-wi0-f171.google.com) (209.85.212.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Jun 2014 15:57:58 +0000 Received: by mail-wi0-f171.google.com with SMTP id n15so7116962wiw.4 for ; Thu, 12 Jun 2014 08:57:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6Vvfd8pBxam/qBfov6NPnVfMzlHsVPV+v9BXDDp7Yhg=; b=Ba3b8BktFURzKxVi6SUwh9/oU3qkIVpqsZ99x5u80k1zvqiEbJ5yRRAB6Ubpxz98VH hjfXhqWFcQLNMzciXVM7n4ATzk9H7/AlvS4hxdWiLjODs5UW/lmWu/y+wEqhlXcn5Knt cpGQsPEjReT8RicoWHAsFC9DsikVQrygEkRcCF4QZFVeMZciMymZ9O4izlqasfReIAHn X7Vjhehqy5m6jSRygvGoj403NWssgdL6I7K6ucXgOw1rXIZ+8UCe/DYYOHB8/6q5ZxK3 beAwXgHYLUUVUfG/hRKJDu8AgyMr2snRji9AFgsAmvwX8nvszbFqsz5WnN2SlZtZdXU8 7xdg== MIME-Version: 1.0 X-Received: by 10.180.75.75 with SMTP id a11mr7844939wiw.3.1402588656779; Thu, 12 Jun 2014 08:57:36 -0700 (PDT) Received: by 10.217.112.137 with HTTP; Thu, 12 Jun 2014 08:57:36 -0700 (PDT) Date: Thu, 12 Jun 2014 17:57:36 +0200 Message-ID: Subject: [GSoC] Passing a json string as input to an applciation in PHP-SDK From: Nadeem Anjum To: dev@airavata.apache.org Content-Type: multipart/alternative; boundary=f46d04388e95a74bcf04fba59e47 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04388e95a74bcf04fba59e47 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hello Everyone, I have registered an application (A Genapp Module) which takes a json string as input. I am using PHP client samples', createExperiment Method I use the follopwing code: $input->value =3D $json; where $json has value "{\"input1\\":\\"0\\",\\"input2\\":\\"1\\",\\"input3\\":\\"on\\",\\"_logon\= \":\\"\\",\\"_project\\":\\"\\",\\"_uuid\\":\\"c9894860-f236-11e3-8708-19a9= 8ecc24ae\\",\\"_base_directory\\":\\"/var/www/html/nadeemtest/results/5399a= d3f791f5\\",\\"_udphost\\":null,\\"_udpport\\":37779,\\"resourcedefault\\":= \\"local\\"}"; However, the in response received, $input->value gets changed to "{"input1":"0","input2":"1","input3":"on","_logon":"","_project":"","_uuid= ":"c9894860-f236-11e3-8708-19a98ecc24ae","_base_directory":"/var/www/html/n= adeemtest/results/5399ad3f791f5","_udphost":null,"_udpport":37779,"resource= default":"local"}" which being malformed, does not give me the expected output. The response is given below: object(Airavata\Model\Workspace\Experiment\Experiment)#12 (18) { ["experimentID"]=3D> string(21) "DO_NOT_SET_AT_CLIENTS" ["projectID"]=3D> string(42) "align_16b50043-1f92-491a-a276-d658e8b2018b" ["creationTime"]=3D> NULL ["userName"]=3D> string(6) "nadeem" ["name"]=3D> string(4) "exp1" ["description"]=3D> NULL ["applicationId"]=3D> string(5) "align" ["applicationVersion"]=3D> NULL ["workflowTemplateId"]=3D> NULL ["workflowTemplateVersion"]=3D> NULL ["userConfigurationData"]=3D> NULL ["workflowExecutionInstanceId"]=3D> NULL ["experimentInputs"]=3D> array(1) { [0]=3D> object(Airavata\Model\Workspace\Experiment\DataObjectType)#9 (4) { ["key"]=3D> string(3) "inp" ["value"]=3D> string(240) "{"input1":"0","input2":"1","input3":"on","_logon":"","_project":"","_uuid"= :"c9894860-f236-11e3-8708-19a98ecc24ae","_base_directory":"/var/www/html/na= deemtest/results/5399ad3f791f5","_udphost":null,"_udpport":37779,"resourced= efault":"local"}" ["type"]=3D> int(0) ["metaData"]=3D> NULL } } ["experimentOutputs"]=3D> array(1) { [0]=3D> object(Airavata\Model\Workspace\Experiment\DataObjectType)#11 (4) { ["key"]=3D> string(3) "out" ["value"]=3D> string(0) "" ["type"]=3D> int(0) ["metaData"]=3D> NULL } } ["experimentStatus"]=3D> NULL ["stateChangeList"]=3D> NULL ["workflowNodeDetailsList"]=3D> NULL ["errors"]=3D> NULL } Any ideas on how to deal with this situation will be appreciated. Thanks, Nadeem --f46d04388e95a74bcf04fba59e47 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Everyone,

I have registered an ap= plication (A Genapp Module) which takes a json string as input. I am using = PHP client samples', createExperiment Method

I use the follopwing code:

$input->value =3D $j= son;

where $json has value=A0

"{\"input1\\":\\"0\\",\\"input2\\&qu= ot;:\\"1\\",\\"input3\\":\\"on\\",\\"_lo= gon\\":\\"\\",\\"_project\\":\\"\\",\\&q= uot;_uuid\\":\\"c9894860-f236-11e3-8708-19a98ecc24ae\\",\\&q= uot;_base_directory\\":\\"/var/www/html/nadeemtest/results/5399ad= 3f791f5\\",\\"_udphost\\":null,\\"_udpport\\":3777= 9,\\"resourcedefault\\":\\"local\\"}";

However, the in response received, $input->value get= s changed to=A0

=A0"{"input1":"= ;0","input2":"1","input3":"on"= ,"_logon":"","_project":"","_u= uid":"c9894860-f236-11e3-8708-19a98ecc24ae","_base_dire= ctory":"/var/www/html/nadeemtest/results/5399ad3f791f5",&quo= t;_udphost":null,"_udpport":37779,"resourcedefault"= ;:"local"}"

which being malformed, does not give me the expec= ted output.

The response is given below:

object(Airavata\Model\Workspace\Experiment\Experiment)= #12 (18) {
=A0 ["experimentID"]=3D>
=A0 string(21) "D= O_NOT_SET_AT_CLIENTS"
=A0 ["projectID"]=3D>
=A0 string(42) "align_16b50043-1f92-491a-a276-d658e8b2018b"= ;
=A0 ["creationTime"]=3D>
=A0 NULL
=A0 [&qu= ot;userName"]=3D>
=A0 string(6) "nadeem"
<= div>=A0 ["name"]=3D>
=A0 string(4) "exp1"<= /div>
=A0 ["description"]=3D>
=A0 NULL
=A0 ["applicationId"]=3D>
= =A0 string(5) "align"
=A0 ["applicationVersion&quo= t;]=3D>
=A0 NULL
=A0 ["workflowTemplateId"= ]=3D>
=A0 NULL
=A0 ["workflowTemplateVersion"]=3D>
=A0 NULL
=A0 ["userConfigurationData"]=3D>
<= div>=A0 NULL
=A0 ["workflowExecutionInstanceId"]=3D>=
=A0 NULL
=A0 ["experimentInputs"]=3D>
=A0 array(1) {
=A0 =A0 [0]=3D>
=A0 =A0 object(Airavata\Model\Workspace= \Experiment\DataObjectType)#9 (4) {
=A0 =A0 =A0 ["key"]= =3D>
=A0 =A0 =A0 string(3) "inp"
=A0 =A0 =A0 ["value"]=3D>
=A0 =A0 =A0 string(24= 0) "{"input1":"0","input2":"1"= ,"input3":"on","_logon":"","_p= roject":"","_uuid":"c9894860-f236-11e3-8708-1= 9a98ecc24ae","_base_directory":"/var/www/html/nadeemtes= t/results/5399ad3f791f5","_udphost":null,"_udpport"= ;:37779,"resourcedefault":"local"}"
=A0 =A0 =A0 ["type"]=3D>
=A0 =A0 =A0 int(0)
=A0 =A0 =A0 ["metaData"]=3D>
=A0 =A0 =A0 NULL=
=A0 =A0 }
=A0 }
=A0 ["experimentOutputs= "]=3D>
=A0 array(1) {
=A0 =A0 [0]=3D>
=A0 =A0 object(Airavata\Model\Workspace\E= xperiment\DataObjectType)#11 (4) {
=A0 =A0 =A0 ["key"]= =3D>
=A0 =A0 =A0 string(3) "out"
=A0 =A0 = =A0 ["value"]=3D>
=A0 =A0 =A0 string(0) ""
=A0 =A0 =A0 ["type&q= uot;]=3D>
=A0 =A0 =A0 int(0)
=A0 =A0 =A0 ["meta= Data"]=3D>
=A0 =A0 =A0 NULL
=A0 =A0 }
=A0 }
=A0 ["experimentStatus"]=3D>
=A0 NULL
=A0 ["stateChangeList"]=3D>
= =A0 NULL
=A0 ["workflowNodeDetailsList"]=3D>
=A0 NULL
=A0 ["errors"]=3D>
=A0 NULL
}


Any ideas on how to deal with this situa= tion will be appreciated.

Thanks,
Nadeem=
--f46d04388e95a74bcf04fba59e47--