public static void SaveAndUploadStudyMetaData( ejsSessionToken sessionToken, ejsStudyMetaData study, int parentAssignmentId) { EjsPublicServiceClient _client = null; try { _client = new EjsPublicServiceClient(); _client.Endpoint.Address = new EndpointAddress(ejsBridgeManager.EjsAddress); _client.SaveStudyMetaData(sessionToken, study, parentAssignmentId); } catch (FaultException <ejsFailureReport> ex) { if (ex.Detail._failureCode == 7) { sessionToken._isAuthenticated = false; } throw new ApplicationException(ex.Detail._header + "\n" + ex.Detail._message); } //catch (Exception) //{ // throw new ApplicationException(Properties.Resources.EX_EjsConnectionFailed); //} finally { if (_client != null) { _client.Close(); } } }