cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid Response Code: (401) Unauthorized error in running Interactive form

Former Member
0 Kudos

Dear All,

I am trying to deploy and run a interactive form developed in webdynpro. but i get the following error upon running the form :

com.sap.tc.webdynpro.pdfobject.core.PDFObjectRuntimeException: Service call exception; nested exception is:

com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.

at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:282)

at com.sap.tc.webdynpro.pdfobject.core.PDFObject.createPDF(PDFObject.java:224)

at com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper.createPDFDocumentForUIElement(AdobeFormHelper.java:483)

at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:185)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterHandleActionEvent(ClientApplication.java:1154)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:402)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

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)

Caused by: java.rmi.RemoteException: Service call exception; nested exception is:

com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.

at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:85)

at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:95)

at com.sap.tc.webdynpro.pdfobject.core.PDFObject.doSoapCall(PDFObject.java:279)

... 27 more

Caused by: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized.

at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.handleResponseMessage(MimeHttpBinding.java:836)

at com.sap.engine.services.webservices.jaxrpc.wsdl2java.soapbinding.MimeHttpBinding.call(MimeHttpBinding.java:1238)

at com.sap.tc.webdynpro.adsproxy.ConfigBindingStub.rpData(ConfigBindingStub.java:78)

... 29 more

I am using a NW04 sandbox server. I have checked the configuration steps and even did the Quick test in AdobeDocumentServices and got the expected response.

I have verified the ADSUser settings and password too. And still i am getting this error.

Can you please let me know if any other settings are required.

Thanks in Advance,

Bharat

Accepted Solutions (1)

Accepted Solutions (1)

krishanu_biswas
Active Participant
0 Kudos

Hello Bharat,

This error means that you are not authorised to access the ADS. In other words, you have an ADS running at the URL configured in the proxy (whether the ADS setup is correct or not is a different issue), but the authetication is failing. Please check the URL and the username and password that you have configured in the visual administrator to configure web service client proxy.

In short, to set up Basic Authentication in a Java environment:

1. Log on to the Visual Administrator.

2. On the Cluster tab, choose Server <x> &#8594; Services &#8594; Web Services Security.

3. Choose Web Service Clients &#8594; sap.com > tcwdpdfobject &#8594; com.sap.tc.webdynpro.adsproxy.AdsProxy*ConfigPort_Document.

4. Check that the url mentioned there is correct (Thats the location where ADS is running as a web service). If not, please modify the URL (switch to Custom) to point it to the right location. You are required to change only the host and port in the URL. You can test the URL on your browser to be 100% sure.

5. From the Authentication list, select BASIC.

6. In the User and Password boxes, enter as Username ADSUser and a Password (consult your ADS administrator got the same).

7. Choose Save.

8. The authentication data must be activated. For doing this navigate to Services &#8594; Deploy.

9. Choose the button Application.

10. Choose sap.com/tcwdpdfobject in the tree.

11. Choose Stop Application.

12. For restarting the application choose Start Application.

13. Test your application

If your Adobe Document Service is running at the URL provided and you are authorised to access the service with the username and password provided then you should not get the execption any more. You may double check this from your browser as well.

Hope that helps.

Best Regards,

Krish

Answers (3)

Answers (3)

Former Member
0 Kudos

Dear BASIS Guys,

Now i'm implement LAC 2.0 on SRM 5.0 , when i test the lac by smoke test the error occured following belowing ,

#1.#00144F50BED1007C000000150000377400043741BCF38D1C#1186655389322#com.sap.srm.la.server.msg.JcoServerController#sap.com/com.sap.srm.la#com.sap.srm.la.server.msg.JcoServerController#SRMSTPUR#165##erpdevsrci_SRD_103409850#SRMSTPUR#6b11d670466311dcc1a400144f50bed1#SAPEngine_Application_Thread[impl:3]_18##0#0#Warning#1#/Applications/SRMLA/SERVER#Plain###Auction cannot be viewed in current status

at com.sap.srm.la.server.jco.services.AbstractJcoService.convertToServerException(Unknown Source)

at com.sap.srm.la.server.jco.services.AbstractJcoService.execute(Unknown Source)

at com.sap.srm.la.server.jco.services.JcoServiceProvider.logon(Unknown Source)

at com.sap.srm.la.server.msg.JcoServerController.login(Unknown Source)

at com.sap.srm.la.server.jmx.JMXMonitorServerController.login(Unknown Source)

at com.sap.srm.la.server.msg.MessagingServlet.handleHelloReq(Unknown Source)

at com.sap.srm.la.server.msg.MessagingServlet.processRequestMessages(Unknown Source)

at com.sap.srm.la.server.msg.MessagingServlet.processAppletRequest(Unknown Source)

at com.sap.srm.la.server.msg.MessagingServlet.doPost(Unknown Source)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)

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)

Please help about how to solve and configre it .

BR,

Rang

Former Member
0 Kudos

Hi Krish,

Thanks for the solution. That problem is solved. But now a new problem has cropped up. Can you please help me with this also.

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Error during call to AdobeDocumentServer: Processing exception during a "UsageRights" operation.

Request start time: Fri Mar 30 14:01:10 GMT+05:30 2007

at com.sap.tc.webdynpro.clientserver.adobe.AdobeFormHelper.createPDFDocumentForUIElement(AdobeFormHelper.java:486)

at com.sap.tc.webdynpro.clientserver.uielib.adobe.impl.InteractiveForm.afterHandleActionEvent(InteractiveForm.java:185)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.afterHandleActionEvent(ClientApplication.java:1154)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.handleActionEvent(WebDynproMainTask.java:402)

at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:649)

at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)

at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)

at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

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)

krishanu_biswas
Active Participant
0 Kudos

Hello Bharat,

You seem to have not configured the credential properly on the ADS. Please check with the NW04 version of ADS configuration guide on how to do so. It is just a configuration issue. Just by following the document, you should be able to solve it very easily.

The document is available at the service market place: <a href="http://service.sap.com/adobe">SAP service market place</a> > Media Library > Documentation > Adobe Document Services - Configuration Guide Nw04. Please download follow the credential configuration part of it. You may use it as a checklist as well to check whether have you configured all the ADS components properly or not.

Best Regards,

Krish

Former Member
0 Kudos

Hello,

There must be something missing in your configuration. Check the settings in the web services security in the Visual Admin: you can find detailed information with the guide on http://service.sap.com/adobe > Media Library > Documentation.

Regards,

Francois