<rss version="2.0" xmlns:a10="http://www.w3.org/2005/Atom"><channel><title>Inflectra Customer Forums: Web Service API authentication issue (Thread)</title><description>  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      </description><language>en-US</language><copyright>(C) Copyright 2006-2026 Inflectra Corporation.</copyright><managingEditor>support@inflectra.com</managingEditor><category domain="http://www.dmoz.org">/Computers/Software/Project_Management/</category><category domain="http://www.dmoz.org">/Computers/Software/Quality_Assurance/</category><generator>KronoDesk</generator><a10:contributor><a10:email>support@inflectra.com</a10:email></a10:contributor><a10:id>http://www.inflectra.com/kronodesk/forums/threads</a10:id><ttl>120</ttl><link>/Support/Forum/spirateam/issues-questions/225.aspx</link><item><guid isPermaLink="false">threadId=225</guid><author>Charlie Stott (cstott@tnsi.com)</author><title>Web Service API authentication issue</title><description>  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      </description><pubDate>Wed, 04 Jan 2012 06:27:51 -0500</pubDate><a10:updated>2012-01-05T16:46:25-05:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/225.aspx</link></item><item><guid isPermaLink="false">messageId=440</guid><author>Charlie Stott (cstott@tnsi.com)</author><title>  Sorry about previous post ending abruptly, messed up the cut &amp; paste.  I tried using:            (</title><description>  Sorry about previous post ending abruptly, messed up the cut &amp; 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();       }   }         </description><pubDate>Thu, 05 Jan 2012 00:16:03 -0500</pubDate><a10:updated>2012-01-05T00:16:03-05:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/225.aspx#reply440</link></item><item><guid isPermaLink="false">messageId=447</guid><author>David J (adam.sandman+support@inflectra.com)</author><title>You need to turn on cookie handling on the web service proxy and that will fix the issue. The sessio</title><description>You 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.</description><pubDate>Thu, 05 Jan 2012 16:46:25 -0500</pubDate><a10:updated>2012-01-05T16:46:25-05:00</a10:updated><link>/Support/Forum/spirateam/issues-questions/225.aspx#reply447</link></item></channel></rss>