No subject


Fri Apr 16 10:15:54 EDT 2010


of =93open-ils=94  which I=92ll use in next request



*Next Request*





curl -H "X-OpenSRF-service: open-ils.auth" --data 'osrf-msg=3D


[

  {

     "__c" : "osrfMessage",

     "__p" : {

        "threadTrace" : 0,

        "payload" : {

           "__c" : "osrfMethod",


           "__p" : {

              "params" : {

                       =93username=94: "admin"

                       =93Password=94: 92df31e9869a256203560124ea5319ec

                       "type": "opac"



              },"method" : " open-ils.auth.authenticate.complete"


           }

        },

        "locale" : "en-US",

        "type" : "REQUEST"

     }

  }

]





And then the response...

please help me with this.







*Chirag Ahuja

(irc name :chirag)*

--20cf300faee331677b049f5c358d
Content-Type: text/html; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

<b>Forgot to put my information over previous mail..</b><br><br><br><div cl=
ass=3D"gmail_quote"><pre>I want to login through a java application</pre><p=
re>=A0</pre><pre>Is my Approach correct??</pre><pre>=A0</pre><pre>First I w=
ill create json object in java which is like this</pre>

<pre>=A0</pre><pre>(</pre><pre>but I don=92t know how to use curl =96H over=
 here as it is a command line tool</pre>
<pre>)</pre><pre>=A0</pre><pre>curl -H &quot;X-<span>OpenSRF</span>-service=
: open-ils.auth&quot; --data &#39;osrf-msg=3D<br><br>[ <br><br>=A0 { =A0&qu=
ot;__c&quot; : &quot;osrfMessage&quot;,<br><br>=A0 =A0 =A0&quot;__p&quot; :=
 { <br>
<br>=A0 =A0 =A0 =A0 &quot;threadTrace&quot; : 0, <br><br>=A0 =A0 =A0 =A0 &q=
uot;payload&quot; : { <br><br>=A0 =A0 =A0 =A0 =A0 =A0&quot;__c&quot; : &quo=
t;osrfMethod&quot;,&quot;__p&quot; : { &quot;params&quot; : [&quot;admin&qu=
ot;],<br><br>=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;method&quot; : &quot;<span s=
tyle=3D"color: black;">open-ils.auth.authenticate.init</span>&quot; <br>


<br>=A0 =A0 =A0 =A0 =A0 =A0} <br><br>=A0 =A0 =A0 =A0 }, <br><br>=A0 =A0 =A0=
 =A0 &quot;locale&quot; : &quot;en-US&quot;, <br><br>=A0 =A0 =A0 =A0 &quot;=
type&quot; : &quot;REQUEST&quot; <br><br>=A0 =A0 =A0} <br><br>=A0 } <br><br=
>] </pre><pre>=A0</pre><pre>and then send it to url=3D<span><u><span style=
=3D"color: blue;"><a href=3D"http://192.168.56.102/osrf-http-translator" ta=
rget=3D"_blank">http://192.168.56.102/osrf-http-translator</a> </span></u><=
/span>(192.168.56.102 is the ip address of virtual machine because I=92m ac=
cessing virtual machine services from host machine in which java applicatio=
n is running)</pre>


<pre>=A0</pre><pre>=A0</pre><pre>=A0</pre><pre><b><span style=3D"font-size:=
 20pt;">Response</span></b></pre><pre>=A0</pre><pre>[<br><br>=A0 {<br><br>=
=A0 =A0 =A0&quot;__c&quot; : &quot;osrfMessage&quot;,<br><br>=A0 =A0 =A0&qu=
ot;__p&quot; : {<br>


<br>=A0 =A0 =A0 =A0 &quot;threadTrace&quot; : 0,<br><br>=A0 =A0 =A0 =A0 &qu=
ot;payload&quot; : {<br><br>=A0 =A0 =A0 =A0 =A0 =A0&quot;__c&quot; : &quot;=
osrfResult&quot;,<br><br>=A0 =A0 =A0 =A0 =A0 =A0&quot;__p&quot; : {<br><br>=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;status&quot; : &quot;OK&quot;,<br>


<br>=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;content&quot; : =936ba0510ab42e028e57=
755bf0151655ed=94</pre><pre>=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;statusCode&qu=
ot; : 200<br><br>=A0 =A0 =A0 =A0 =A0 =A0}<br><br>=A0 =A0 =A0 =A0 },<br><br>=
=A0 =A0 =A0 =A0 &quot;locale&quot; : &quot;en-US&quot;,<br>


<br>=A0 =A0 =A0 =A0 &quot;type&quot; : &quot;RESULT&quot;<br><br>=A0 =A0 =
=A0}<br><br>=A0 },<br><br>=A0 {<br><br>=A0 =A0 =A0&quot;__c&quot; : &quot;o=
srfMessage&quot;,<br><br>=A0 =A0 =A0&quot;__p&quot; : {<br><br>=A0 =A0 =A0 =
=A0 &quot;threadTrace&quot; : 0,<br>


<br>=A0 =A0 =A0 =A0 &quot;payload&quot; : {<br><br>=A0 =A0 =A0 =A0 =A0 =A0&=
quot;__c&quot; : &quot;osrfConnectStatus&quot;,<br><br>=A0 =A0 =A0 =A0 =A0 =
=A0&quot;__p&quot; : {<br><br>=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;status&quot=
; : &quot;Request Complete&quot;,<br><br>

=A0 =A0 =A0 =A0 =A0 =A0 =A0 &quot;statusCode&quot; : 205<br>
<br>=A0 =A0 =A0 =A0 =A0 =A0}<br><br>=A0 =A0 =A0 =A0 },<br><br>=A0 =A0 =A0 =
=A0 &quot;locale&quot; : &quot;en-US&quot;,<br><br>=A0 =A0 =A0 =A0 &quot;ty=
pe&quot; : &quot;STATUS&quot;<br><br>=A0 =A0 =A0}<br><br>=A0 }<br><br>]</pr=
e><pre>=A0</pre><pre>From response I take out 6ba0510ab42e028e57755bf015165=
5ed and md5hash of =93open-ils=94<span>=A0 </span>which I=92ll use in next =
request</pre>


<pre>=A0</pre><pre><b><span style=3D"font-size: 18pt;">Next Request</span><=
/b></pre><pre>=A0</pre><pre>=A0</pre><pre>curl -H &quot;X-<span>OpenSRF</sp=
an>-service: open-ils.auth&quot; --data &#39;osrf-msg=3D<br><br>
[ <br><br>=A0 { <br><br>=A0 =A0 =A0&quot;__c&quot; : &quot;osrfMessage&quot=
;,<br><br>=A0 =A0 =A0&quot;__p&quot; : { <br><br>=A0 =A0 =A0 =A0 &quot;thre=
adTrace&quot; : 0,<br><br>=A0 =A0 =A0 =A0 &quot;payload&quot; : { <br><br>=
=A0 =A0 =A0 =A0 =A0 =A0&quot;__c&quot; : &quot;osrfMethod&quot;, <br>


<br>=A0 =A0 =A0 =A0 =A0 =A0&quot;__p&quot; : { <br><br>=A0 =A0 =A0 =A0 =A0 =
=A0 =A0 &quot;params&quot; : {</pre><pre>=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 <s=
pan>=A0=A0=A0=A0=A0=A0 </span>=93username=94:=A0&quot;admin&quot;</pre><pre=
><span>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 <=
/span>=93Password=94: 92df31e9869a256203560124ea5319ec</pre>


<pre><span>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0 </span><tt><span style=3D"color: black;">&quot;type&quot;: &quot;opac&q=
uot;</span></tt><span style=3D"color: black;"></span></pre><pre> <br><br>=
=A0 =A0 =A0 =A0 =A0 =A0 =A0 },&quot;method&quot; : &quot;<span style=3D"col=
or: red;"> </span><tt><span style=3D"color: black;">open-ils.auth.authentic=
ate.complete</span></tt>&quot; <br>


<br>=A0 =A0 =A0 =A0 =A0 =A0} <br><br>=A0 =A0 =A0 =A0 }, <br><br>=A0 =A0 =A0=
 =A0 &quot;locale&quot; : &quot;en-US&quot;, <br><br>=A0 =A0 =A0 =A0 &quot;=
type&quot; : &quot;REQUEST&quot; <br><br>=A0 =A0 =A0} <br><br>=A0 } <br><br=
>] <br><br><br><br></pre>
<pre>=A0</pre><pre>And then the response...<br><br>please help me with this=
.<br><br><br><br><br><br><br><br><b>Chirag Ahuja<br><br>(irc name :chirag)<=
/b><br></pre><pre>=A0</pre>
</div><br>

--20cf300faee331677b049f5c358d--


More information about the Open-ils-dev mailing list