<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">here is my response object from log:<div><br></div><div><div>&nbsp;({</div><div>&nbsp; &nbsp; &nbsp; &nbsp; id = 1;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; mail = "<a href="mailto:yavuzsel@buffalo.edu">yavuzsel@buffalo.edu</a>";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; name = "yavuz";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; telephone = "&lt;null&gt;";</div><div>&nbsp; &nbsp; },</div><div>&nbsp; &nbsp; {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; id = 2;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; mail = "<a href="mailto:yavuzsel@buffalo.edu">yavuzsel@buffalo.edu</a>";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; name = "yavuzsel";</div><div>&nbsp; &nbsp; &nbsp; &nbsp; telephone = "001234";</div><div>&nbsp; &nbsp; }</div><div>)</div><div><br></div><div>thanks,</div><div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><br class="Apple-interchange-newline">---</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Yavuz Selim Yilmaz</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">SUNY at Buffalo</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">Computer Science and Engineering</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">PhD Candidate</div>
</div>
<br><div><div>On Jun 12, 2013, at 1:49 PM, Matthias Wessendorf &lt;<a href="mailto:matzew@apache.org">matzew@apache.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">can u NSLog the '<font><span style="line-height:normal;background-color:rgba(255,255,255,0)">responseObject'?</span></font><br><br>Is that a NSDictionary or NSArray?<div><br></div><div><span></span><br><br>On Wednesday, June 12, 2013, Yavuz Selim YILMAZ  wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all,<div><br></div><div>I am getting error while saving my response object to my store. Here are my codes:</div>
<div><br></div><div><br></div><div><div>AGPipeline *pipeline = [AGPipeline pipelineWithBaseURL:[NSURL URLWithString:@"localhost"]];</div><div><br></div><div>id&lt;AGPipe&gt; dataPipe = [pipeline pipe:^(id&lt;AGPipeConfig&gt; config) {</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [config setName:@"persons"];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [config setEndpoint:@"get_persons.php"];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; }];</div><div>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>AGDataManager *dm = [AGDataManager manager];</div>
<div><br></div><div>id&lt;AGStore&gt; dataStore = [dm store:^(id&lt;AGStoreConfig&gt; config) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; [config setName:@"persons"];</div><div>&nbsp; &nbsp; &nbsp; &nbsp; [config setType:@"PLIST"];</div><div>&nbsp; &nbsp; }];</div>
<div>&nbsp; &nbsp;&nbsp;</div><div>[dataPipe read:^(id responseObject) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; NSError *error;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; if (![dataStore save:responseObject error:&amp;error])</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; NSLog(@"Save: An error occured during save! \n%@", error);</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp; } failure:^(NSError *error) {</div><div>&nbsp; &nbsp; &nbsp; &nbsp; NSLog(@"An error has occured during read! \n%@", error);</div><div>&nbsp; &nbsp; }];</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; &nbsp;&nbsp;</div><div>And I am getting this log output:</div>
<div><br></div><div>Save: An error occured during save!&nbsp;</div><div>Error Domain=org.aerogear.stores.save Code=0 "error on save" UserInfo=0x727a6e0 {NSLocalizedDescription=error on save}</div><div><br></div><div>
<br></div><div>here is my "get_persons.php"</div><div><br></div><div>&lt;?php<span style="white-space:pre-wrap">        </span></div><div>&nbsp; &nbsp; $result_array = array(array(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "id" =&gt; 1,</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "name" =&gt; "yavuz",</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "mail" =&gt; "<a href="javascript:_e({}, 'cvml', 'yavuzsel@buffalo.edu');" target="_blank">yavuzsel@buffalo.edu</a>",</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "telephone" =&gt; NULL</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ),</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; array(</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "id" =&gt; 2,</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "name" =&gt; "yavuzsel",</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "mail" =&gt; "<a href="javascript:_e({}, 'cvml', 'yavuzsel@buffalo.edu');" target="_blank">yavuzsel@buffalo.edu</a>",</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "telephone" =&gt; "001234"</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ));</div><div>&nbsp; &nbsp; header('HTTP/1.1 200 OK');</div><div>&nbsp; &nbsp; header('content-type: application/json');</div><div>&nbsp; &nbsp; echo json_encode($result_array);</div><div>?&gt;</div><div><br></div>
<div><br></div><div>
<div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Any help or direction is appreciated.</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<br></div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Cheers,</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
<br>---</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Yavuz Selim Yilmaz</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
SUNY at Buffalo</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
Computer Science and Engineering</div><div style="text-indent:0px;letter-spacing:normal;font-variant:normal;text-align:-webkit-auto;font-style:normal;font-weight:normal;line-height:normal;text-transform:none;font-size:medium;white-space:normal;font-family:Helvetica;word-spacing:0px">
PhD Candidate</div>
</div>
<br></div></div></blockquote></div><br><br>-- <br>Matthias Wessendorf <br><br>blog: <a href="http://matthiaswessendorf.wordpress.com/" target="_blank">http://matthiaswessendorf.wordpress.com/</a><br>sessions: <a href="http://www.slideshare.net/mwessendorf" target="_blank">http://www.slideshare.net/mwessendorf</a><br>
twitter: <a href="http://twitter.com/mwessendorf" target="_blank">http://twitter.com/mwessendorf</a><br>
_______________________________________________<br>aerogear-dev mailing list<br><a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/aerogear-dev</blockquote></div><br></div></body></html>