stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iago Alonso Alonso <infia...@udc.es>
Subject Re: Apache Stratos not works as expected
Date Tue, 19 Jul 2016 16:44:52 GMT
Hi, I was going to send you the log and when I want to copy and paste I saw the error. I was
sending a GET petition instead a POST. 

Sorry for the noob mistake. 

P.D: If I can make a second question without open another "email thread". Why in the docs
I can see how do the login ( https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Session+Authentication+via+REST+API
) but then I can't see anything of how do the the logout neither how use the sessionId instead
pass always user:pass on all cURL commands? Where it's indicated on the documentation? 

Thanks and regards. 

----- Mensaje original -----

De: "Isuru Haththotuwa" <isuruh@apache.org> 
Para: "dev" <dev@stratos.apache.org> 
Enviados: Martes, 19 de Julio 2016 18:15:35 
Asunto: Re: Apache Stratos not works as expected 

Hi Iago, 

Can you please attach the complete server side error log, wso2carbon.log, which is at <STRATOS_HOME>/repository/logs/
directory. 

On Tue, Jul 19, 2016 at 7:30 PM, Iago Alonso Alonso < infiaa00@udc.es > wrote: 


I'm trying to send orders to Apache Stratos via API REST but I'm unnable to make it works.


According to the Deploy Doc ( https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Deploying+an+Application+via+REST+API
) and the Undeploy Doc ( https://cwiki.apache.org/confluence/display/STRATOS/4.1.x+Undeploying+an+Application+via+REST+API
) you can do the process via API REST. When I try to send the orders I'm getting an 500 ERROR
as response. 

If I go to .....:9443/console/ I can do the both procces with the same credentials that I
send on the code. For example, to deploy process: 

policy = form.cleaned_data['Application Policy ID:'] 
applicationID = form.cleaned_data['Application ID:'] 
headers = {'Content-Type': 'application/json'} 
deployApp = apacheStratosAPI + applications + '/' + applicationID + '/' + deploy + '/' + policy

req = requests.get(deployApp, headers=headers, auth=HTTPBasicAuth(request.session['stratosUser'],
request.session['stratosPass']), verify=False) 

Where apacheStratosAPI, applications, deploy are constants to use in other calls. 

So, why I can do it via web console and nor with the API REST calls? 

Regards. 

-- 
Thanks and Regards, 

Isuru H. 
+94 716 358 048 










Mime
View raw message