I have created a custom Rest Service in SFDC . There is a external java program who is calling this service getting the error "Peer not Authenthicated". However, it work fine when make a call to standard rest service.
Java program makes login call with username and password , and then make the further calls with access token . If Java program makes standard REST Call (like QUERY,Create ) it's working fine, however if it try to access the Custom Rest resource, it throws an "Peer not authenciated"
Below the login call to get access token,
https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9OI03e************pxp1sWHLb6Q3zDATvehioTlzDi5MenWhgq2DwXdqGkkj1KbSHjbrZR7D6_J4w9IN" -d "client_secret=48033*******810169" -d "username=*****al@*****.com" -d "password=test2345"
Please help with this. Why java program is throwing this error when calling custom Rest service. Thanks.