Making a REST webservice call. Error code: 401 Access to the requested resource is not allowed
Hi All,
I’m having a hard time figuring out how to make Rest WebService calls.
I tried executing this directly through browser and I get an error.
http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password
13:18:20,613 ERROR [RestSecurityServlet] Error code: 401
Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
atg.rest.RestException: Access to the requested resource is not allowed: /atg/userprofiling/ProfileServices
at atg.rest.processor.RestSecurityProcessor.checkAccess(RestSecurityProcessor.java:546)
at atg.rest.processor.RestSecurityProcessor.handleGetRequest(RestSecurityProcessor.java:313)
at atg.rest.processor.RestSecurityProcessor.doRESTGet(RestSecurityProcessor.java:199)
at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:417)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:260)
at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:157)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:320)
at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:264)
at atg.rest.servlet.HeadRestServlet.service(HeadRestServlet.java:130)
at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:267)
From the documentation I understand that I need to create a session, is the session only necessary to access secured components since this
particular method “ProfileServices.loginUser “ has been declared as not secure in restSecurityConfiguration.xml
Also, are there two different ways in which I can log in
1. Using RestSession.createSession providing the username and password.
2. Or using ProfileServices.loginUser or ProfileFormHandler
Can someone please clarify
If you are invoking the REST web-service from a Java client then you can create a RestSession object using the createSession method. But in your case you seem to be invoking it with a HTTP request which by default would be treated as a GET request by ATG's REST implementation. Therefore being a GET, it would try to fetch a property "loginUser" from /atg/userprofiling/ProfileServices component (based on your URL) which would always fail.
To invoke loginUser() method of ProfileServices with your passed argument you need to tell ATG's REST system to treat your incoming request not as GET but as a POST request which you can do using atg-rest-http-method control parameter in your request like this
http:localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser?arg1=[email protected]&arg2=Password&atg-rest-http-method=POST
It should work this way provided your restSecurityConfiguration.xml is proper.
Similar Messages
-
Atg.rest.RestException: Access to the requested resource is not allowed
Hi,
While testing REST services, I have created a file in my localconfig directory at atg/rest/security named restSecurityConfiguration.xml and added the following lines to the file,replacing #username# with admin ( for testing purpose).
<programlisting>
<rest-security>
<default-acl value="Profile$login$#admin#:read,write,execute"/>
</rest-security>
</programlisting>
Still while accessing the REST service through code, I am getting "atg.rest.RestException: Access to the requested resource is not allowed".
Can anyone please throw some light if I have missed anything here?
Thanks in advance!Hi,
I am facing an InvalidPersonaException , when I try to use the following in my restSecurityConfiguration.xml, any idea of the error? Still, I am able to login through admin credentials in BCC, and it is a valid Internal user.
<resource component="/heb/store/service/RestContactUsManager">
<method name="restContactUsStatus" secure="false">
<acl value="Profile$login$admin:read,write,execute" />
</method>
</resource> -
Error after Installing PDK - (404 The requested resource is not available)
Hi
I recently installed my PDK over my existing Portal 6.0 using SDM Tool. I downloaded PDK_6.0.14.0_BusinessPackage from SDN. I deployed pdkcontent6.0.14.0.SCA file using the SDM Tool. It installed successfully. But when i go and check the links under 'Portal Content Development ' , it gives me a 404 - The requested resource is not available.
Please help out.
Regards,
Murali.Hi All,
I am also unable to deploy pdkcontent6.0.14.0.sca completely. I get the exception below
===========================================================================
Deployment started Thu Jun 22 11:01:34 IST 2006
===========================================================================
Starting Deployment of TutWD_KMBrowser
Finished with warnings: development component 'TutWD_KMBrowser'/'local'/'LOKAL'/'0.2005.11.09.09.51.44', grouped by software component 'pdk-content'/'com.sap'/'SAP AG'/'1000.630.0.1.0.20051130181343':
Caught exception during application startup from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application local/TutWD_KMBrowser and wait. Reason: Clusterwide exception: server ID 309660150:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Application local/TutWD_KMBrowser cannot be started. Reason: it has hard reference to resource com.sap.km.application with type application, which is not active on the server.
at com.sap.engine.services.deploy.server.ReferenceResolver.processReferenceToApplication(ReferenceResolver.java:596)
at com.sap.engine.services.deploy.server.ReferenceResolver.processMakeReference(ReferenceResolver.java:399)
at com.sap.engine.services.deploy.server.ReferenceResolver.beforeStartingApplication(ReferenceResolver.java:328)
at com.sap.engine.services.deploy.server.application.StartTransaction.beginCommon(StartTransaction.java:178)
at com.sap.engine.services.deploy.server.application.StartTransaction.begin(StartTransaction.java:147)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:292)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4705)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4610)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4583)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1163)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: com.sap.engine.services.deploy.container.DeploymentException: <Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Exception while starting: sap.com/com.sap.km.application', Arguments: []> : Can't find resource for bundle java.util.PropertyResourceBundle, key Exception while starting: sap.com/com.sap.km.application
at com.sap.portal.prt.sapj2ee.PortalRuntimeContainer.prepareStart(PortalRuntimeContainer.java:527)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationLocalAndWait(DeployServiceImpl.java:4359)
at com.sap.engine.services.deploy.server.ReferenceResolver.processReferenceToApplication(ReferenceResolver.java:588)
... 21 more
Caused by: com.sap.engine.services.deploy.container.DeploymentException: <Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='Exception while starting: SAPJ2EE::local/TutWD_KMBrowser', Arguments: []> : Can't find resource for bundle java.util.PropertyResourceBundle, key Exception while starting: SAPJ2EE::local/TutWD_KMBrowser
at com.sap.portal.prt.sapj2ee.SAPJ2EEPortalRuntime.getAndStartSAPJ2EEApplicationItem(SAPJ2EEPortalRuntime.java:886)
at com.sap.portal.prt.sapj2ee.PortalRuntimeContainer.prepareStart(PortalRuntimeContainer.java:511)
... 23 more
Caused by: com.sapportals.portal.prt.runtime.PortalRuntimeException: [ExternalApplicationItem.prepare]: SAPJ2EE::local/TutWD_KMBrowser
at com.sapportals.portal.prt.core.broker.ExternalApplicationItem.prepare(ExternalApplicationItem.java:188)
at com.sapportals.portal.prt.core.broker.SAPJ2EEApplicationItem.prepare(SAPJ2EEApplicationItem.java:232)
at com.sapportals.portal.prt.core.broker.SAPJ2EEApplicationItem.start(SAPJ2EEApplicationItem.java:192)
at com.sapportals.portal.prt.service.sapj2ee.Mediator.getAndStartExternalApplication(Mediator.java:132)
at com.sap.portal.prt.sapj2ee.StartPortalApplication.coreRun(StartPortalApplication.java:59)
at com.sap.portal.prt.sapj2ee.SAPJ2EEPortalRuntime.getAndStartSAPJ2EEApplicationItem(SAPJ2EEPortalRuntime.java:882)
... 24 more
Caused by: com.sapportals.portal.prt.core.broker.PortalApplicationNotFoundException: Could not find portal application com.sap.km.application
at com.sapportals.portal.prt.core.broker.PortalApplicationItem.prepare(PortalApplicationItem.java:415)
at com.sapportals.portal.prt.core.broker.ExternalApplicationItem.prepare(ExternalApplicationItem.java:180)
... 29 more
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
Deployment of TutWD_KMBrowser finished with Warning (Duration 9504 ms)
Starting Deployment of pdk-content
Finished with warnings: software component 'pdk-content'/'com.sap'/'SAP AG'/'1000.630.0.1.0.20051130181343':
No further description found.
Deployment of pdk-content finished with Warning (Duration 1152 ms)
===========================================================================
Deployment ended Thu Jun 22 11:01:47 IST 2006
===========================================================================
Please resolve this issue.
Regards,
Amjad -
I log onto the following URL:
>http://15thcircuit.co.palm-beach.fl.us/web/guest/adminorders/series1<
I click on a link whose URL is:
>/15thcircuit.co.palm-beach.fl.us/c/document_library/get_file?folderId=149&name=DLFE-1775.pdf<
The screen opens with the error message shown in my question above.put your biplab folder inside root folder under tomcat\webapps\root
http://localhost:8080/biplab/hello.jsp -
When trying to run an Adobe Form webdynpro app, I am receiving the following error:
<b>Invalid Response Code: (401) Unauthorized. The requested URL was:"http://localhost:50000/AdobeDocumentServices/Config?style=document"</b>
I have checked the ADS test at <server:port>/AdobeDocumentServices/Config; the test did return the version number.
<i><b>Does anyone have any other ideas of what I should check?</b></i>
Also, why is it running a url with "localhost" in it? If this is running on the java was server, then I guess that could make sense. But if the url request is requesting something from localhost, isn't that my computer? I guess it depends on if this is a server request or a client request. I hope this is a server request.Sumit -
First, I think config is okay. I can run the web service under my id okay.
Second, I am not sure what the impact is having the build done locally.
I am building and deploying locally in NWDS to my local portal. But then I am sending the EAR file to the system admin to deploy to my dev server (I am doing this because they will not give out the SDM password. And, I am waiting on the NWDI setup to be complete; when that is complete I will let NWDI deploy to the dev portal.)
Incidentally, I am receiving this error on the dev server, not my local portal. (I have tried running on my local portal, but I am getting a socket timeout error. But this is interesting, because I <i>can</i> run other webdynpro non-Adobe apps. I am not tracking down this error at this point because I am really just interested in the dev server. If I get past the 401 error on the dev server, and then get the socket timout issue...then I will worry about it.) -
Error: The requested resource does not exist. (Servlet)
Hello,
I created a simple JSP(submit form), that calls a servlet. When I run the JSP, I see the form. On submit, I get error screen:
404 Not Found
Error: The requested resource does not exist.
Troubleshooting Guide https://sdn.sap.com/irj/sdn/wiki?path=/display/jsts/home
Details: Go to main page of this application!
The URL shows the path to the servlet (fully qualified name of the servlet class)
http://<host>:50000/WebClient/<path>.ClientServlet
Logs don't show anything...
What am I missing here..,The servlet mapping was wrong in web.xml(missed the package.name)
-
Error :-The requested resource does not exist while opening the adobe form
hello Experts,
We are in Portal implementation face with ECC6 EHP4 and Portal EHP1
We have developed adobe form using HCM forms and processes and done the required configuration in SPRO
When we are trying to open the form from ESS we are getting below error
404 not found
The requested resource does not exist.
Please look into this issue and let us know any thing we are missing
Sincerely
Pareshis ADS working correctly?
1. Use transaction SA38 to execute the program FP_TEST_00.
Detailed information about this test program and about how you
should then proceed is given in the Adobe Document Services
Configuration Guide in the Help Portal under:
http://help.sap.com/saphelp_nw2004s/helpdata/en/37/504b8cbc2848a4
94facfdc09a359b1/frameset.htm -> Adobe Document Services
Configuration Guide -> Configuring the Web Service -> Securing
Access to the Web Service ->Configuration Check -> Configuration
Check for PDF-Based Forms in ABAP
- If the FP_TEST_00 form is displayed in the print preview, the
ADS configuration is correct.
-> If you use scenarios with an interactive PDF, proceed with
point 5. Otherwise, proceed with the test under point 6.
- If the system displays an error message instead of a form, the
configuration of ADS is incorrect.
-> Carry out the additional tests from point 2 onwards.
2. Use transaction SA38 to execute the program FP_PDF_TEST_00.
This enables you to check the RFC connection to ADS (see the
reference to the documentation given above).
- If the system displays the version number of ADS, the
configuration of the RFC connection is correct.
read the note 944221
Please paste the whole error? Is any dump in ST22 -
CRM Upgrade from 7.0 to EhP1 Error - The requested resource does not exist
Hello All,
We have recently upgrade our pilot system in CRM from CRM 7.0 to Ehp1. The upgrade was successful.
However, when I login into the WebUI, I get an error message as follows:
404 Not Found
The requested resource does not exist
Details: Go to main page of this application
I got in touch with the Basis team and tried to activate some services through SICF that were deactivated because of the upgrade. But we still encounter the above error everytime I tried logging into WebUI.
I kindly request to provide some pointers towards the resolution of the same.
Thanks and regards,
VSK.Hi,
please try to activate all SICF services under sap->bc->bsp.
If needed deactivate them and activate afterwards again to be sure all services are active.
Good luck
Kind regards
Manfred -
Need urgent help :'The requested resource does not exist error'
Hi All,
I am getting 'The requested resource does not exist error' when trying to acess http://machinename:50000/irj
Even when i access http://machinename:50000, i get the same 'The root directory does not exist' error. I checked in visual admin, there is no other application deployed except my application.
Any clues? Pls help
thanks
bhawnaHI ,
Did succeed to solve your problem. I am running into same problem.
Any help is welcome.
Thank u very much. -
404 Not Found, Error: The requested resource does not exist.
Hi all,
When I try to access VC with the http://localhost:50400/vc where 04 is the CE1 instance, it returns the following error:
404 Not Found
Error: The requested resource does not exist.
Any clues. Just to add that the CE1 servers are running green and nwa is accessible on same url.
Regards.Hi
Try with following link (VC should be in Caps) -
http://localhost:50400/VC/default.jsp
Also check whether you have proper admin roles assigned to your user id.
Regards
Sandeep
Edited by: Sandeep Patki on Sep 16, 2009 8:47 AM -
Guys im getting an error "The requested resource was not found. what do i do???
Make sure you disable antivirus and firewall.
Reboot iPad and computer. -
ESS/MSS - Error " 404, The requested resource is not available."
Hi
I have deployed below archives in the EP 7.0 SP14 system. My back end system is ECC 6.0 with SP14.
1)BP ERP05 ESS 1.0 with sp14
2)BP ERP05 MSS 1.0 with sp14
3)SAP ESS 600 with sp14
4)SAP MSS 600 with sp14
5)SAP PCUI_GP 600 with sp14
We are getting " The requested resource is not available." error after clicking on
Working Time tab.
Can anyone suggest me whether i need to update any higher level patches from EP and ERP side ?
Or what could be the problem ?
Thanks in Advance,
VinayHi Vinay
Check below steps one by one for your application.Whch is very helpful link.
http://help.sap.com/saphelp_erp2004/helpdata/en/38/e8584c2a664547b60442646bee23b6/frameset.htm
Regards
-SS -
Portal Error 404 (The requested resource is not available)
Dear,
I have faced the below error in our Portal (6.0), I have created a new role that its linked normally with worksets, pages and i-view, all the way to custom SAP R/3 transactions, most of the users are able to see and execute these transactions, but one of them faced the below error, please advise? What it could be the problem?
404
The requested resource is not available.
stack trace
com.sapportals.wcm.protocol.webdav.server.WDServletException
at com.sapportals.wcm.protocol.webdav.server.WDObject.throwNotFoundIf(WDObject.java:54)
at com.sapportals.wcm.protocol.webdav.server.WDGetHandler.handle(WDGetHandler.java:110)
at com.sapportals.wcm.protocol.webdav.server.WDServlet.doGet(WDServlet.java:775)
at com.sapportals.wcm.protocol.webdav.server.WDServlet.service(WDServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
at java.security.AccessController.doPrivileged(Native Method)
at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:160)check whether user has end user permissions or not
-
''dupe of https://support.mozilla.org/en-US/questions/928117''
all website went "Not Found HTTP Error 404. The requested resource is not found." and the "Firefox cannot load websites but other programs can" page is not helping in any waysA possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
See:
*https://support.mozilla.org/kb/Server+not+found
*https://support.mozilla.org/kb/Firewalls
*http://kb.mozillazine.org/Error_loading_websites
You can try to reset (power off/on) the router. -
All website went "HTTP Error 404. The requested resource is not found."
''dupe of https://support.mozilla.org/en-US/questions/928117''
all website went "HTTP Error 404. The requested resource is not found."
this only happen in firefox (i'm using IE to post this question)A possible cause is security software (firewall,anti-virus) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
See:
*https://support.mozilla.org/kb/Server+not+found
*https://support.mozilla.org/kb/Firewalls
*http://kb.mozillazine.org/Error_loading_websites
You can try to reset (power off/on) the router.
Maybe you are looking for
-
How can I work on parallel tabs?
Is it possible to work on multiple tabs on one screen at a time? As in, I would be able to view and use multiple webpages together. This feature would enable me to: >compare certain items on different pages, e.g. photos, images, patterns, tech. specs
-
I added Icloud to join my calendar on my phone to another person. It erased all history date from previous months. how do I get that data back?
-
Please let to be inset a CMYK images!
More graphic designer have a CMYK logos and images first in hight resolution for press version, and something the big work is to convert all files for web publishing, Would be great to have a fantastic program like Muse that give a permission to conv
-
Sync 2 Laptops to one share file?
I have an external hard drive attached to my home network where my music is stored and I wish to use this library on 2 different laptops, however when I add new files to the storage device (eg Automatically add to iTunes) via one laptop it only adds
-
Unable to load certain website (not really a safari problem)
As the subject says, this isn't a Safari problem but instead a general issue I have run into, so perhaps this is not the proper forum for it. But I have always received good help here before so I figured I would give it a shot. I have recently (for a