<div dir="ltr">Hello Yavuz,<div><br></div><div><br></div><div style>thanks for trying the branch.   Your CURL seems to be correct (the one with the developmentCertificate and developmentPassphrase).</div><div style><br></div>
<div style><br></div><div style>However, since we changed the model, I think you need to erase your local database :-) I remember running into that as well, when testing the things.</div><div style><br></div><div style>the DB is stored on the filesystem.  Please try the following steps:</div>
<div style>* stop the JBoss</div><div style>* Kill the DB: do &quot;rm ~/pushee.*&quot;</div><div style>* start JBoss again</div><div style><br></div><div style>Now, you need to login, and create a PushApp and than, use the above CURL for adding the developmentCert...</div>
<div style><br></div><div style><br></div><div style><br></div><div style>BTW. a PRODUCTION :) cert is added like this:</div><div style>curl -v -b cookies.txt -c cookies.txt -i -H &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; -F &quot;productionCertificate=@/Users/matzew/Desktop/PushCerts/PushTest.p12&quot; -F &quot;productionPassphrase=TopSecret&quot; -X POST <a href="http://localhost:8080/ag-push/rest/applications/{pushApplicationID}/iOS">http://localhost:8080/ag-push/rest/applications/{pushApplicationID}/iOS</a><br>
</div><div style><br></div><div style><br></div><div style>AND :)  You can also upload both certs, initially:</div><div style><br></div><div style>curl -v -b cookies.txt -c cookies.txt -i -H &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; <span style="font-size:13px;font-family:arial,sans-serif">-F &quot;developmentCertificate=@/</span><span style="font-size:13px;font-family:arial,sans-serif">Users/yavuz/Documents/</span><span style="font-size:13px;font-family:arial,sans-serif">Certificates.p12&quot; -F &quot;developmentPassphrase=pass&quot; </span>-F &quot;productionCertificate=@/Users/matzew/Desktop/PushCerts/PushTest.p12&quot; -F &quot;productionPassphrase=TopSecret&quot; -X POST <a href="http://localhost:8080/ag-push/rest/applications/{pushApplicationID}/iOS">http://localhost:8080/ag-push/rest/applications/{pushApplicationID}/iOS</a></div>
<div style><br></div><div style><br></div><div style><br></div><div style>Hope that helps</div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div><div style><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 10, 2013 at 6:24 PM, Yavuz Selim YILMAZ <span dir="ltr">&lt;<a href="mailto:yavuzsel@buffalo.edu" target="_blank">yavuzsel@buffalo.edu</a>&gt;</span> 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&#39;m trying out the ProdCerts branch on aerogear-unified-push-server to enable AeroGear powered push notifications on my production iOS application.</div>
<div><br></div><div>When I am trying to add an iOS variant, I am getting:</div><div><br></div><div>HTTP/1.1 400 Bad Request</div><div>…</div><div>The request sent by the client was syntactically incorrect ().</div><div>…</div>
<div><br></div><div>The curl command I am using is here:</div><div><br></div><div>$curl -i -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; -F &quot;developmentCertificate=@/Users/yavuz/Documents/Certificates.p12&quot; -F &quot;developmentPassphrase=pass&quot; -X POST <a href="http://localhost:8080/ag-push/rest/applications/8055d0a9-ed30-463c-9ac3-baf8cee39ebc/iOS" target="_blank">http://localhost:8080/ag-push/rest/applications/8055d0a9-ed30-463c-9ac3-baf8cee39ebc/iOS</a></div>
<div><br></div><div>As far as I could see, Bad Request is returned if developmentCertificate and/or developmentPassphrase is null (in my case, productionCertificate/Passphrase are already null). Therefore, in order to make sure my Certificates.p12 does not read null , I switched to master branch, and executed the following command successfully and add my variant:</div>
<div><br></div><div>$curl -i -b cookies.txt -c cookies.txt -H &quot;Accept: application/json&quot; -H &quot;Content-type: multipart/form-data&quot; -F &quot;certificate=@/Users/yavuz/Documents/Certificates.p12&quot; -F &quot;passphrase=pass&quot; -X POST <a href="http://localhost:8080/ag-push/rest/applications/688d0fe1-4cc2-4606-ab10-09660620b483/iOS" target="_blank">http://localhost:8080/ag-push/rest/applications/688d0fe1-4cc2-4606-ab10-09660620b483/iOS</a></div>
<div><br></div><div>Any ideas why I might be getting this error, or any suggestions/directions are most appreciated.</div><div><br></div><div>Kind regards,</div><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">
<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><br>_______________________________________________<br>
aerogear-dev mailing list<br>
<a href="mailto:aerogear-dev@lists.jboss.org">aerogear-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/aerogear-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/aerogear-dev</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <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>
</div>