Re: [Dev] API Manager always returns back errors in XML

2015-02-26 Thread Prabath Siriwardena
Thanks.. But its should respect the Accept: application/json header..

Thanks  regards,
-Prabath

On Thu, Feb 26, 2015 at 3:06 PM, Ajith Vitharana aji...@wso2.com wrote:

 By default application/xml, you can change that
 in _auth_failure_handler_.xml file under
 wso2am-1.8.0/repository/deployment/server/synapse-configs/default/sequences

 sequence name=_auth_failure_handler_ xmlns=
 http://ws.apache.org/ns/synapse;
 property name=error_message_type value=application/xml/
 /sequence

 -Ajith


 On Thu, Feb 26, 2015 at 5:45 PM, Prabath Siriwardena prab...@wso2.com
 wrote:

 I tried to call an API with an invalid access token - and following in
 the the response I get..  Shouldn't I get a JSON response here..?

 curl -H Authorization: Bearer 227f7e7119361b31f873b1b6b3abfdff  -k  -H
 Accept: application/json
 https://localhost:8243/mywso2/1.0.0/employee/4

 ams:fault 
 xmlns:ams=http://wso2.org/apimanager/security;ams:code900901/ams:codeams:messageInvalid
 Credentials/ams:messageams:descriptionAccess failure for API: /mywso2,
 version: 1.0.0 with key:
 227f7e7119361b31f873b1b6b3abfdff/ams:description/ams:fault


 Thanks  Regards,
 Prabath

 Twitter : @prabath
 LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

 Mobile : +1 650 625 7950

 http://blog.facilelogin.com
 http://blog.api-security.org

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Ajith Vitharana.
 WSO2 Inc. - http://wso2.org
 Email  :  aji...@wso2.com
 Mobile : +1-812-360-5335




-- 
Thanks  Regards,
Prabath

Twitter : @prabath
LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

Mobile : +1 650 625 7950

http://blog.facilelogin.com
http://blog.api-security.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] API Manager always returns back errors in XML

2015-02-26 Thread Ajith Vitharana
By default application/xml, you can change that
in _auth_failure_handler_.xml file under
wso2am-1.8.0/repository/deployment/server/synapse-configs/default/sequences

sequence name=_auth_failure_handler_ xmlns=
http://ws.apache.org/ns/synapse;
property name=error_message_type value=application/xml/
/sequence

-Ajith


On Thu, Feb 26, 2015 at 5:45 PM, Prabath Siriwardena prab...@wso2.com
wrote:

 I tried to call an API with an invalid access token - and following in the
 the response I get..  Shouldn't I get a JSON response here..?

 curl -H Authorization: Bearer 227f7e7119361b31f873b1b6b3abfdff  -k  -H
 Accept: application/json  https://localhost:8243/mywso2/1.0.0/employee/4

 ams:fault 
 xmlns:ams=http://wso2.org/apimanager/security;ams:code900901/ams:codeams:messageInvalid
 Credentials/ams:messageams:descriptionAccess failure for API: /mywso2,
 version: 1.0.0 with key:
 227f7e7119361b31f873b1b6b3abfdff/ams:description/ams:fault


 Thanks  Regards,
 Prabath

 Twitter : @prabath
 LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

 Mobile : +1 650 625 7950

 http://blog.facilelogin.com
 http://blog.api-security.org

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Ajith Vitharana.
WSO2 Inc. - http://wso2.org
Email  :  aji...@wso2.com
Mobile : +1-812-360-5335
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] API Manager always returns back errors in XML

2015-02-26 Thread Prabath Siriwardena
I tried to call an API with an invalid access token - and following in the
the response I get..  Shouldn't I get a JSON response here..?

curl -H Authorization: Bearer 227f7e7119361b31f873b1b6b3abfdff  -k  -H
Accept: application/json  https://localhost:8243/mywso2/1.0.0/employee/4

ams:fault 
xmlns:ams=http://wso2.org/apimanager/security;ams:code900901/ams:codeams:messageInvalid
Credentials/ams:messageams:descriptionAccess failure for API: /mywso2,
version: 1.0.0 with key:
227f7e7119361b31f873b1b6b3abfdff/ams:description/ams:fault


Thanks  Regards,
Prabath

Twitter : @prabath
LinkedIn : http://www.linkedin.com/in/prabathsiriwardena

Mobile : +1 650 625 7950

http://blog.facilelogin.com
http://blog.api-security.org
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev