Problem Authentification / Webservices

User 05d9866f9b

04-06-2013 16:47:15

We've implemented a webservice (Version 6.0 / REST).


If we now integrate a webservice that asks for username and password we get the following error message as soon as we launch the webservice:


Service call failed.


Stack Trace shows:


ERROR:
Service call failed.


STACK TRACE:
chemaxon.marvin.services.ServiceException: java.io.IOException: Server returned HTTP response code: 401 for URL: ______________________
 at chemaxon.marvin.services.httpservice.HTTPServiceHandler.callService(HTTPServiceHandler.java:113)
 at chemaxon.marvin.services.httpservice.HTTPServiceHandler.callService(HTTPServiceHandler.java:25)
 at chemaxon.marvin.services.ServiceHandler$1.run(ServiceHandler.java:28)
 at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
 at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Server returned HTTP response code: 401 for URL: _____________
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
 at chemaxon.marvin.services.httpservice.HTTPServiceHandler.callService(HTTPServiceHandler.java:104)
 ... 5 more


What is the reason / how can we go on?


Thanks Edith

ChemAxon 2db1f4037e

05-06-2013 12:44:05

Hi Edith,


Marvin Services not handles authentication by default. Depending on the type of the authentication you can



I would recommend the third option if possible, and *not* recommend the first one in production environment - since passwords are easily readable to anyone in that case. If the authentication is specific, then the second option has all the flexibility you may need - however it requires some extra work.


Cheers,


Istvan Rabel

User 05d9866f9b

05-06-2013 16:50:02

great - thanks for the answer-  the colleague will contact you directly to follow up some details