Hi Madushanka, Please check if the user credentials are present by logging in directly to the IS Admin Panel. Also try recreating another set of credentials with admin privileges and testing. Check document [1] for more information on how to securing the rest service using the ESB OAuth Mediator.
[1] - https://docs.wso2.com/display/IS500/2-legged+OAuth+for+Securing+a+RESTful+Service Thank you. Regards, On Wed, Feb 11, 2015 at 3:08 PM, Madusanka Premaratne <madusan...@wso2.com> wrote: > Hi Shiva, > Thanks for the response. > When I debug the code, it points me that I use wrong credentials, but I > provided the credentials given by IS. > I am still confused why this goes wrong. > > Thanks, > > On Wed, Feb 11, 2015 at 2:00 PM, Shiva Balachandran <sh...@wso2.com> > wrote: > >> Hi, >> >> Please check the credentials again, might be an errornous credentials. >> >> Thank you. >> >> Regards, >> >> On Tue, Feb 10, 2015 at 2:39 PM, Madusanka Premaratne < >> madusan...@wso2.com> wrote: >> >>> Hi all, >>> I am trying to secure a rest service using ESB OAuth Mediator[1] with >>> the help of WSO2 Identity Server. I created a service provider in WSO2 IS >>> and used the OAuth credentials as username and password in ESB's OAuth >>> mediator. When I call the proxy service it gives me an error saying >>> "Connection Refused" >>> >>> Can somebody tell me What I am missing here? >>> >>> My proxy service looks like below, >>> <?xml version="1.0" encoding="UTF-8"?> >>> <proxy xmlns="http://ws.apache.org/ns/synapse" >>> name="App" >>> transports="https,http" >>> statistics="disable" >>> trace="disable" >>> startOnLoad="true"> >>> <target> >>> <inSequence> >>> <oauthService remoteServiceUrl=" >>> https://10.100.5.179:9444/services/" >>> username="erbO9h_cBgwQQ45fGmQ88RqpbMAa" >>> password="JU_G6DayJpYMBn8vVU7JGNab0Fga"/> >>> </inSequence> >>> <outSequence> >>> <send /> >>> </outSequence> >>> <endpoint> >>> <address uri=" >>> http://10.100.5.179:9763/services/Version/getVersion"/> >>> </endpoint> >>> </target> >>> <description/> >>> </proxy> >>> >>> [1] - https://docs.wso2.com/display/ESB480/OAuth+Mediator >>> >>> Thank You, >>> >>> -- >>> *Madusanka Premaratne* | Associate Software Engineer >>> WSO2, Inc | lean. enterprise. middleware. >>> #20, Palm Grove, Colombo 03, Sri Lanka >>> Mobile: +94 71 835 70 73| Work: +94 112 145 345 >>> Email: madusan...@wso2.com | Web: www.wso2.com >>> >>> [image: Facebook] <https://www.facebook.com/rmmpremaratne> [image: >>> Twitter] <https://twitter.com/rmmpremaratne> [image: Google Plus] >>> <https://plus.google.com/u/0/+MadusankaPremaratnemaduz/about/p/pub> [image: >>> Linkedin] <http://lk.linkedin.com/in/madusanka/> [image: Instagram] >>> <http://instagram.com/madusankapremaratne> [image: Skype] >>> <http://@rmmpremaratne> >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Shiva Balachandran >> Software Engineer >> WSO2 Inc. >> >> Mobile - +94 774445788 >> Blog - https://shivabalachandran.wordpress.com/ >> > > > > -- > *Madusanka Premaratne* | Associate Software Engineer > WSO2, Inc | lean. enterprise. middleware. > #20, Palm Grove, Colombo 03, Sri Lanka > Mobile: +94 71 835 70 73| Work: +94 112 145 345 > Email: madusan...@wso2.com | Web: www.wso2.com > > [image: Facebook] <https://www.facebook.com/rmmpremaratne> [image: > Twitter] <https://twitter.com/rmmpremaratne> [image: Google Plus] > <https://plus.google.com/u/0/+MadusankaPremaratnemaduz/about/p/pub> [image: > Linkedin] <http://lk.linkedin.com/in/madusanka/> [image: Instagram] > <http://instagram.com/madusankapremaratne> [image: Skype] > <http://@rmmpremaratne> > > -- Shiva Balachandran Software Engineer WSO2 Inc. Mobile - +94 774445788 Blog - https://shivabalachandran.wordpress.com/
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev