Inflectra Customer Forums: Web Service API authentication issue (Thread) I am using the Web Service API to update some test run data. I call connection_Authenticate which returns "true" I then call connection_ConnectToProject with a Project ID I know exists, and it throws an exception "The session was not authenticated, please call the Connection_Authenticate() method first" I have also tried using en-US(C) Copyright 2006-2024 Inflectra Corporation.support@inflectra.com/Computers/Software/Project_Management//Computers/Software/Quality_Assurance/KronoDesksupport@inflectra.comhttp://www.inflectra.com/kronodesk/forums/threads120/Support/Forum/spirateam/issues-questions/225.aspxthreadId=225Charlie Stott (cstott@tnsi.com)Web Service API authentication issue I am using the Web Service API to update some test run data. I call connection_Authenticate which returns "true" I then call connection_ConnectToProject with a Project ID I know exists, and it throws an exception "The session was not authenticated, please call the Connection_Authenticate() method first" I have also tried using Wed, 04 Jan 2012 06:27:51 -05002012-01-05T16:46:25-05:00/Support/Forum/spirateam/issues-questions/225.aspxmessageId=440Charlie Stott (cstott@tnsi.com) Sorry about previous post ending abruptly, messed up the cut & paste. I tried using: ( Sorry about previous post ending abruptly, messed up the cut & paste. I tried using: ((BasicHttpBinding_IImportExportStub)service).setUsername("Integrator"); ((BasicHttpBinding_IImportExportStub)service).setPassword("Password0"); but still get the same error. Full code snippet follows, user and password are valid, exception occurs on ConnectToProject, as stated, same result with .setUsername/.setPassword lines commented: public static void main(String[] argv) { RemoteTestCase[] tcs; Boolean rcFlag; try { ImportExportLocator locator = new ImportExportLocator(); IImportExport service = locator.getBasicHttpBinding_IImportExport(); // If authorization is required ((BasicHttpBinding_IImportExportStub)service).setUsername("Integrator"); ((BasicHttpBinding_IImportExportStub)service).setPassword("Password0"); // invoke business method rcFlag = service.connection_Authenticate("Integrator", "Password0"); System.out.println("Authenticate returns " + rcFlag.toString()); rcFlag = service.connection_ConnectToProject(10); System.out.println("ConnectToProject returns " + rcFlag.toString()); RemoteFilter[] remoteFilters = new RemoteFilter[1]; remoteFilters[0].setPropertyName("NAME"); remoteFilters[0].setStringValue("ConnectToWebService"); tcs = service.testCase_Retrieve(remoteFilters, 0, 0); System.out.printf("Found %d test cases", tcs.length); } catch (javax.xml.rpc.ServiceException ex) { ex.printStackTrace(); } catch (java.rmi.RemoteException ex) { ex.printStackTrace(); } } Thu, 05 Jan 2012 00:16:03 -05002012-01-05T00:16:03-05:00/Support/Forum/spirateam/issues-questions/225.aspx#reply440messageId=447David J (support1@inflectra.com)You need to turn on cookie handling on the web service proxy and that will fix the issue. The sessioYou need to turn on cookie handling on the web service proxy and that will fix the issue. The session cookie from the first Authenticate call is not being passed to the subsequent calls.Thu, 05 Jan 2012 16:46:25 -05002012-01-05T16:46:25-05:00/Support/Forum/spirateam/issues-questions/225.aspx#reply447