[mapguide-commits] r4323 - in sandbox/adsk/2.1: Common
Common/MapGuideCommon/Services Common/MapGuideCommon/System
Server/src/Common/Manager Server/src/Services/ServerAdmin
UnitTest/WebTier/MapAgent/MapAgentForms Web/src/ApacheAgent
Web/src/CgiAgent Web/src/HttpHandler Web/src/IsapiAgent
Web/src/viewerfiles
svn_mapguide at osgeo.org
svn_mapguide at osgeo.org
Tue Oct 27 20:17:23 EDT 2009
Author: brucedechant
Date: 2009-10-27 20:17:22 -0400 (Tue, 27 Oct 2009)
New Revision: 4323
Added:
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.cpp
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.h
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.cpp
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.h
sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.h
Modified:
sandbox/adsk/2.1/Common/MapGuideCommon/Services/Command.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.h
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.h
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.h
sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteConnection.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.h
sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.cpp
sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.h
sandbox/adsk/2.1/Common/ProductVersion.h
sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.cpp
sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.h
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/Makefile.am
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminOperationFactory.cpp
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.cpp
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.h
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.vcproj
sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminServiceBuild.cpp
sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html
sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html
sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/siteserviceapi.html
sandbox/adsk/2.1/Web/src/ApacheAgent/ApacheAgent.cpp
sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.h
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.h
sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandler.vcproj
sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandlerBuild.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequest.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequestResponseHandler.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.cpp
sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.h
sandbox/adsk/2.1/Web/src/HttpHandler/Makefile.am
sandbox/adsk/2.1/Web/src/IsapiAgent/IsapiAgent.cpp
sandbox/adsk/2.1/Web/src/viewerfiles/ajaxmappane.templ
Log:
Fix for trac ticket 1131 - Load balancing doesn't support failover
http://trac.osgeo.org/mapguide/ticket/1131
Notes:
- Updated load balancing algorithm to remove failed servers and periodically add them back in when they are up and running again
- Added NEW ServerAdmin HTTP/API GetSiteStatus - supports multiple servers
- Updated ServerAdmin HTTP GetSiteInfo to support multiple servers
- Updated ServerAdmin HTTP GetSiteVersion to support multiple servers
- Updated web tier test pages to use new version of above APIs
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/Command.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/Command.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/Command.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -34,6 +34,8 @@
//TODO: Parse url and pull machine name into target
}
+ MG_TRY()
+
Ptr<MgUserInformation> userInfo = connProp->GetUserInfo();
Ptr<MgServerConnection> serviceConn = MgServerConnection::Acquire(userInfo, connProp);
Ptr<MgStream> stream = serviceConn->GetStream();
@@ -114,6 +116,29 @@
stream->WriteStreamEnd();
GetResponse(serviceConn, retType);
+
+ MG_CATCH(L"MgCommand.ExecuteCommand")
+
+ if (NULL != mgException)
+ {
+ if (mgException->IsOfClass(MapGuide_Exception_MgConnectionFailedException))
+ {
+ // The server didn't respond so it needs to be marked as unavailable in the list of servers.
+ // We will check to see if it can be made available later.
+ MgSiteManager* siteManager = MgSiteManager::GetInstance();
+ Ptr<MgSiteInfo> badSite = siteManager->GetSiteInfo(connProp->GetTarget(), connProp->GetPort());
+ if(NULL != badSite.p)
+ {
+ // Update the status of the failed server
+ badSite->SetStatus(MgSiteInfo::UnableToConnect);
+ }
+
+ // Need to remove the server connection from the pool
+ MgServerConnection::Remove(connProp);
+ }
+
+ MG_THROW();
+ }
}
//////////////////////////////////////////////////////////////////
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -622,6 +622,63 @@
///////////////////////////////////////////////////////////////////////////////////
/// <summary>
+/// Gets the site version.
+/// </summary>
+/// <returns>
+/// The site version.
+/// </returns>
+///
+/// EXCEPTIONS:
+/// MgConnectionNotOpenException
+STRING MgServerAdmin::GetSiteVersion()
+{
+ MgCommand cmd;
+
+ cmd.ExecuteCommand(m_connProp, // Connection
+ MgCommand::knString, // Return type expected
+ MgServerAdminServiceOpId::GetSiteVersion, // Command Code
+ 0, // No of arguments
+ ServerAdmin_Service, // Service Id
+ BUILD_VERSION(1,0,0), // Operation version
+ MgCommand::knNone);
+
+ SetWarning(cmd.GetWarningObject());
+
+ STRING retVal = *(cmd.GetReturnValue().val.m_str);
+ delete cmd.GetReturnValue().val.m_str;
+
+ return retVal;
+}
+
+///////////////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Gets the status properties for the server.
+/// </summary>
+/// <returns>
+/// The collection of status properties.
+/// </returns>
+///
+/// EXCEPTIONS:
+/// MgConnectionNotOpenException
+MgPropertyCollection* MgServerAdmin::GetSiteStatus()
+{
+ MgCommand cmd;
+
+ cmd.ExecuteCommand(m_connProp, // Connection
+ MgCommand::knObject, // Return type expected
+ MgServerAdminServiceOpId::GetSiteStatus, // Command Code
+ 0, // No of arguments
+ ServerAdmin_Service, // Service Id
+ BUILD_VERSION(2,1,0), // Operation version
+ MgCommand::knNone);
+
+ SetWarning(cmd.GetWarningObject());
+
+ return (MgPropertyCollection*)cmd.GetReturnValue().val.m_obj;
+}
+
+///////////////////////////////////////////////////////////////////////////////////
+/// <summary>
/// Delete the specified package, if able.
/// </summary>
///
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.h
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdmin.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -365,6 +365,28 @@
///////////////////////////////////////////////////////////////////////////////////
/// \brief
+ /// Gets the site version.
+ ///
+ /// \return
+ /// The site version.
+ ///
+ /// \exception MgConnectionNotOpenException
+ ///
+ STRING GetSiteVersion();
+
+ ///////////////////////////////////////////////////////////////////////////////////
+ /// \brief
+ /// Gets the status properties for the server.
+ ///
+ /// \return
+ /// The collection of status properties.
+ ///
+ /// \exception MgConnectionNotOpenException
+ ///
+ MgPropertyCollection* GetSiteStatus();
+
+ ///////////////////////////////////////////////////////////////////////////////////
+ /// \brief
/// Delete the specified package, if able.
///
/// \param packageName
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -76,3 +76,5 @@
const STRING MgServerInformationProperties::TotalConnections = L"TotalConnections";
const STRING MgServerInformationProperties::TotalActiveConnections = L"TotalActiveConnections";
const STRING MgServerInformationProperties::OperatingSystemVersion = L"OperatingSystemVersion";
+const STRING MgServerInformationProperties::ApiVersion = L"ApiVersion";
+const STRING MgServerInformationProperties::MachineIp = L"MachineIp";
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.h
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerAdminDefs.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -114,6 +114,8 @@
/// The server's version
static const STRING ServerVersion; /// value("ServerVersion")
+ /// The API version
+ static const STRING ApiVersion; /// value("ApiVersion")
/// STATISTIC PROPERTIES SECTION -----------------------------------------------------------------------------------
@@ -156,6 +158,9 @@
/// Gets the server display name
static const STRING DisplayName; /// value("DisplayName")
+ /// Gets the server machine Ip
+ static const STRING MachineIp; /// value("MachineIp")
+
/// Gets the total operations received
static const STRING TotalReceivedOperations; /// value("TotalReceivedOperations")
@@ -209,6 +214,8 @@
static const int NotifyResourcesChanged = 0x1111EA1A;
static const int MakePackage = 0x1111EA1B;
static const int RemoveConfigurationProperties = 0x1111EA1C;
+ static const int GetSiteVersion = 0x1111EA1D;
+ static const int GetSiteStatus = 0x1111EA1E;
};
/// \endcond
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -275,10 +275,10 @@
/// </summary>
///
/// <param name="userInformation">
-/// User information to authenticate against
+/// User information to authenticate against.
/// </param>
-/// <param name="target">
-/// Target server. NULL or "" indicates local server
+/// <param name="connProp">
+/// Connection properties for the server to connect to.
/// </param>
/// <returns>
/// Nothing
@@ -342,3 +342,28 @@
return msc.Detach();
}
+//////////////////////////////////////////////////////////////////
+/// <summary>
+/// Removes a connection to a Mg server
+/// </summary>
+///
+/// <param name="connProp">
+/// Connection properties of the server to remove.
+/// </param>
+/// <returns>
+/// Nothing
+/// </returns>
+/// EXCEPTIONS:
+/// AuthorizationFailed
+/// TargetNotFound
+void MgServerConnection::Remove(MgConnectionProperties* connProp)
+{
+ CHECKNULL((MgConnectionProperties*)connProp, L"MgServerConnection.Remove");
+
+ {
+ ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex));
+
+ wstring hash = connProp->Hash();
+ g_connectionPool->pool.erase(hash);
+ }
+}
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.h
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/ServerConnection.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -105,6 +105,19 @@
//////////////////////////////////////////////////////////////////
/// \brief
+ /// Removes the TCP/IP connection to a MapGuide server from the
+ /// internal connection pool.
+ ///
+ /// \param connProp
+ /// Connection properties for target server
+ ///
+ /// \return
+ /// Nothing
+ ///
+ static void Remove(MgConnectionProperties* connProp);
+
+ //////////////////////////////////////////////////////////////////
+ /// \brief
/// Internal method used for getting stream helper
/// which will then be used in serialize/deserialize
///
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteConnection.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteConnection.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteConnection.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -129,7 +129,8 @@
if (m_connProp == NULL)
{
- throw new MgLogicException(L"MgSiteConnection.Open",
+ // There might not be any MapGuide servers running for the site
+ throw new MgConnectionFailedException(L"MgSiteConnection.Open",
__LINE__, __WFILE__, NULL, L"", NULL);
}
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -19,6 +19,79 @@
// Process-wide MgSiteManager
Ptr<MgSiteManager> MgSiteManager::sm_siteManager = (MgSiteManager*)NULL;
+// Background thread function
+ACE_THR_FUNC_RETURN CheckServers(void* param)
+{
+ SMThreadData* threadData = (SMThreadData*)param;
+ // Store our unique thread ID
+ threadData->threadId = ACE_Thread::self();
+
+ MgSiteManager* siteManager = MgSiteManager::GetInstance();
+
+ bool bDone = false;
+ while(!bDone)
+ {
+ MgSiteVector* sites = siteManager->GetSites();
+ if(sites)
+ {
+ for(size_t i=0;i<sites->size();i++)
+ {
+ MgSiteInfo* siteInfo = sites->at(i);
+
+ // Check the server status
+ if (MgSiteInfo::Ok != siteInfo->GetStatus())
+ {
+ // This is an unavailable server so we need to check if it is now available
+ MG_TRY()
+
+ // Send a simple request to the server to see if it can respond
+ Ptr<MgUserInformation> userInformation = new MgUserInformation(L"Administrator", L"admin");
+ Ptr<MgConnectionProperties> connProp = siteManager->GetConnectionProperties(userInformation, siteInfo, MgSiteInfo::Admin);
+
+ // Use GetSiteStatus because it doesn't require authentication
+ MgCommand cmd;
+ cmd.ExecuteCommand(connProp, // Connection
+ MgCommand::knObject, // Return type expected
+ MgServerAdminServiceOpId::GetSiteStatus, // Command Code
+ 0, // No of arguments
+ ServerAdmin_Service, // Service Id
+ BUILD_VERSION(2,1,0), // Operation version
+ MgCommand::knNone);
+
+ // The server responded so update the status if the server is online
+ Ptr<MgPropertyCollection> properties = (MgPropertyCollection*)cmd.GetReturnValue().val.m_obj;
+ if(properties.p)
+ {
+ // Check the status of the server
+ Ptr<MgBooleanProperty> boolProp = (MgBooleanProperty*)properties->GetItem(MgServerInformationProperties::Status);
+ if(boolProp->GetValue())
+ {
+ // Server is there and "Online"
+ ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, siteManager->m_mutex, NULL));
+ siteInfo->SetStatus(MgSiteInfo::Ok);
+ }
+ }
+
+ MG_CATCH_AND_RELEASE()
+ if(NULL != mgException.p)
+ {
+ // Exception was thrown
+ STRING message = mgException->GetMessage();
+ }
+ }
+ }
+ }
+
+ // Sleep the thread as thread resume/suspend is not supported on all platforms
+ ACE_OS::sleep(threadData->failoverRetryTime);
+
+ // Update whether we are done or not
+ bDone = siteManager->GetCheckServersThreadDone();
+ }
+
+ return 0;
+}
+
///----------------------------------------------------------------------------
/// <summary>
/// Constructs the object.
@@ -47,6 +120,10 @@
ClearSiteInfo();
+ // Block any threads as we are updating the thread done
+ ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex));
+ m_bCheckServersThreadDone = true;
+
MG_CATCH(L"MgSiteManager.~MgSiteManager")
}
@@ -187,6 +264,24 @@
m_sites.push_back(siteInfo.Detach());
}
+ // Create background thread that will check any unavailable servers to see if their status has changed
+ INT32 failoverRetryTime = MgConfigProperties::DefaultGeneralPropertyFailoverRetryTime;
+ configuration->GetIntValue(
+ MgConfigProperties::GeneralPropertiesSection,
+ MgConfigProperties::GeneralPropertyFailoverRetryTime,
+ failoverRetryTime,
+ MgConfigProperties::DefaultGeneralPropertyFailoverRetryTime);
+
+ m_threadData.failoverRetryTime = failoverRetryTime;
+
+ m_bCheckServersThreadDone = false;
+
+ // Need a thread manager
+ ACE_Thread_Manager* manager = ACE_Thread_Manager::instance();
+
+ // Create the background thread
+ manager->spawn(ACE_THR_FUNC(CheckServers), &m_threadData);
+
MG_CATCH_AND_THROW(L"MgSiteManager.Initialize")
}
@@ -221,12 +316,19 @@
{
STRING siteHexString = sessionId.substr(
length - MgSiteInfo::HexStringLength, MgSiteInfo::HexStringLength);
- Ptr<MgSiteInfo> siteInfo = new MgSiteInfo(siteHexString);
+ Ptr<MgSiteInfo> siteInfo = GetSiteInfo(siteHexString);
if (MgSiteInfo::Ok == siteInfo->GetStatus())
{
connProps = GetConnectionProperties(userInfo, siteInfo, portType);
}
+ else
+ {
+ // This site is not currently working
+
+ // We have a session, but it will not exist on any other machine so we force the session exception
+ throw new MgSessionExpiredException(L"MgSiteManager.GetConnectionProperties",__LINE__,__WFILE__, NULL, L"", NULL);
+ }
}
}
else
@@ -241,7 +343,8 @@
if (NULL == connProps.p)
{
- throw new MgLogicException(
+ // There might not be any MapGuide servers running for the site
+ throw new MgConnectionFailedException(
L"MgSiteManager.GetConnectionProperties",
__LINE__, __WFILE__, NULL, L"", NULL);
}
@@ -379,3 +482,64 @@
return SAFE_ADDREF(matchingSiteInfo);
}
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Retrieves site info for the site server matching the specified target and port
+/// contained within the specifed hex string.
+/// </summary>
+///----------------------------------------------------------------------------
+MgSiteInfo* MgSiteManager::GetSiteInfo(CREFSTRING hexString)
+{
+ MgSiteInfo* matchingSiteInfo = NULL;
+
+ if(hexString.length() >= MgSiteInfo::HexStringLength)
+ {
+ UINT32 n1, n2, n3, n4;
+ INT32 sitePort, clientPort, adminPort;
+ STRING target;
+
+ // Read the IP parts into their variables
+ if(::swscanf(hexString.c_str(), L"%2X%2X%2X%2X%4X%4X%4X", &n1, &n2, &n3, &n4, &sitePort, &clientPort, &adminPort) == 7)
+ {
+ // Write the 4 'n' values into an IP string
+ wchar_t buffer[20];
+ swprintf(buffer, 20, L"%u.%u.%u.%u", n1, n2, n3, n4);
+ target = buffer;
+ }
+
+ ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex, NULL));
+
+ for (INT32 i = 0; i < (INT32)m_sites.size(); i++)
+ {
+ MgSiteInfo* siteInfo = m_sites.at(i);
+
+ if (siteInfo->GetTarget() == target
+ && (siteInfo->GetPort(MgSiteInfo::Site) == sitePort ||
+ siteInfo->GetPort(MgSiteInfo::Client) == clientPort ||
+ siteInfo->GetPort(MgSiteInfo::Admin) == adminPort))
+ {
+ matchingSiteInfo = siteInfo;
+ break;
+ }
+ }
+ }
+
+ return SAFE_ADDREF(matchingSiteInfo);
+}
+
+MgSiteVector* MgSiteManager::GetSites()
+{
+ return &m_sites;
+}
+
+bool MgSiteManager::GetCheckServersThreadDone()
+{
+ return m_bCheckServersThreadDone;
+}
+
+void MgSiteManager::SetCheckServersThreadDone(bool bDone)
+{
+ ACE_MT(ACE_GUARD(ACE_Recursive_Thread_Mutex, ace_mon, m_mutex));
+ m_bCheckServersThreadDone = bDone;
+}
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.h
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/Services/SiteManager.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -21,6 +21,13 @@
class MgSiteInfo;
typedef std::vector<MgSiteInfo*> MgSiteVector;
+// Data structure which is passed to thread
+struct SMThreadData
+{
+ ACE_thread_t threadId;
+ INT32 failoverRetryTime;
+};
+
class MG_MAPGUIDE_API MgSiteManager : public MgGuardDisposable
{
DECLARE_CLASSNAME(MgSiteManager)
@@ -63,9 +70,16 @@
MgSiteInfo* GetSiteInfo(INT32 index);
MgSiteInfo* GetSiteInfo(CREFSTRING target, INT32 port);
+ MgSiteInfo* GetSiteInfo(CREFSTRING hexString);
INT32 GetSiteCount();
+ MgSiteVector* GetSites();
+ ACE_Recursive_Thread_Mutex m_mutex;
+
+ bool GetCheckServersThreadDone();
+ void SetCheckServersThreadDone(bool bDone);
+
private:
void Initialize();
@@ -79,9 +93,10 @@
static Ptr<MgSiteManager> sm_siteManager;
- ACE_Recursive_Thread_Mutex m_mutex;
INT32 m_index;
MgSiteVector m_sites;
+ SMThreadData m_threadData;
+ bool m_bCheckServersThreadDone;
};
#endif // MG_SITEMANAGER_H_
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.cpp
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -155,6 +155,8 @@
const INT32 MgConfigProperties::DefaultGeneralPropertyWorkerThreadPoolSize = 10;
const STRING MgConfigProperties::GeneralPropertyRenderer = L"Renderer";
const STRING MgConfigProperties::DefaultGeneralPropertyRenderer = L"GD";
+const STRING MgConfigProperties::GeneralPropertyFailoverRetryTime = L"FailoverRetryTime"; // for internal use only
+const INT32 MgConfigProperties::DefaultGeneralPropertyFailoverRetryTime = 60;
// ******************************************************************
// Administrative Connection Properties
@@ -491,6 +493,7 @@
{ MgConfigProperties::GeneralPropertyWfsDocumentPath , MgPropertyType::String , MG_CONFIG_MIN_PATH_LENGTH , MG_CONFIG_MAX_PATH_LENGTH , MG_CONFIG_PATH_RESERVED_CHARACTERS },
{ MgConfigProperties::GeneralPropertyWmsDocumentPath , MgPropertyType::String , MG_CONFIG_MIN_PATH_LENGTH , MG_CONFIG_MAX_PATH_LENGTH , MG_CONFIG_PATH_RESERVED_CHARACTERS },
{ MgConfigProperties::GeneralPropertyWorkerThreadPoolSize , MgPropertyType::Int32 , MG_CONFIG_MIN_THREAD_POOL_SIZE , MG_CONFIG_MAX_THREAD_POOL_SIZE , L"" },
+ { MgConfigProperties::GeneralPropertyFailoverRetryTime , MgPropertyType::Int32 , MG_CONFIG_MIN_TIMER_INTERVAL , MG_CONFIG_MAX_TIMER_INTERVAL , L"" },
{ L"" , 0 , 0.0 , 0.0 , L"" }
};
Modified: sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.h
===================================================================
--- sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/MapGuideCommon/System/ConfigProperties.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -135,6 +135,10 @@
static const STRING GeneralPropertyWorkerThreadPoolSize; /// value("WorkerThreadPoolSize")
static const INT32 DefaultGeneralPropertyWorkerThreadPoolSize; /// value(10)
+ /// Sets the failover retry time
+ static const STRING GeneralPropertyFailoverRetryTime; /// value("FailoverRetryTime")
+ static const INT32 DefaultGeneralPropertyFailoverRetryTime; /// value(60)
+
EXTERNAL_API:
/// ADMINISTRATIVE CONNECTION PROPERTIES SECTION ---------------------------------------------------------------------
Modified: sandbox/adsk/2.1/Common/ProductVersion.h
===================================================================
--- sandbox/adsk/2.1/Common/ProductVersion.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Common/ProductVersion.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -18,6 +18,8 @@
#ifndef PRODUCTVERSION_H_
#define PRODUCTVERSION_H_
-const STRING ProductVersion = L"7.0.0.1";
+// These versions must be updated for each release of the product
+const STRING ProductVersion = L"2.1.0.0";
+const STRING ApiVersion = L"2.1"; // Major.Minor only
#endif // PRODUCTVERSION_H_
Modified: sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -494,6 +494,10 @@
pProperty = new MgStringProperty(MgServerInformationProperties::DisplayName, m_displayName);
pProperties->Add(pProperty);
+ // Add the MachineIp
+ pProperty = new MgStringProperty(MgServerInformationProperties::MachineIp, m_localServerAddress);
+ pProperties->Add(pProperty);
+
// Add the Operations info
INT32 nTotalReceivedOperations = GetTotalReceivedOperations();
pProperty = new MgInt32Property(MgServerInformationProperties::TotalReceivedOperations, nTotalReceivedOperations);
@@ -572,6 +576,51 @@
return pProperties.Detach();
}
+///////////////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Gets the site version.
+/// </summary>
+STRING MgServerManager::GetSiteVersion()
+{
+ return ProductVersion;
+}
+
+///////////////////////////////////////////////////////////////////////////////////
+/// <summary>
+/// Gets the status properties for the server.
+/// </summary>
+MgPropertyCollection* MgServerManager::GetSiteStatus()
+{
+ Ptr<MgPropertyCollection> pProperties;
+ pProperties = NULL;
+
+ MG_TRY()
+
+ MG_LOG_TRACE_ENTRY(L"MgServerManager::GetSiteStatus()");
+
+ pProperties = new MgPropertyCollection();
+
+ // Add the information properties
+ Ptr<MgProperty> pProperty;
+
+ // Add the DisplayName
+ pProperty = new MgStringProperty(MgServerInformationProperties::DisplayName, m_displayName);
+ pProperties->Add(pProperty);
+
+ // Add the Status
+ bool bOnline = IsOnline();
+ pProperty = new MgBooleanProperty(MgServerInformationProperties::Status, bOnline);
+ pProperties->Add(pProperty);
+
+ // Add the API Version
+ pProperty = new MgStringProperty(MgServerInformationProperties::ApiVersion, ApiVersion);
+ pProperties->Add(pProperty);
+
+ MG_CATCH_AND_THROW(L"MgServerManager.GetSiteStatus")
+
+ return pProperties.Detach();
+}
+
MgByteReader* MgServerManager::GetDocument(CREFSTRING identifier)
{
Ptr<MgByteReader> pByteReader;
Modified: sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.h
===================================================================
--- sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Common/Manager/ServerManager.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -60,6 +60,8 @@
void RemoveConfigurationProperties(CREFSTRING propertySection, MgPropertyCollection* properties);
MgPropertyCollection* GetInformationProperties();
+ MgPropertyCollection* GetSiteStatus();
+ STRING GetSiteVersion();
MgByteReader* GetDocument(CREFSTRING identifier);
void SetDocument(CREFSTRING identifier, MgByteReader* data);
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/Makefile.am
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/Makefile.am 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/Makefile.am 2009-10-28 00:17:22 UTC (rev 4323)
@@ -34,6 +34,8 @@
OpGetLogFile.cpp \
OpGetPackageLog.cpp \
OpGetPackageStatus.cpp \
+ OpGetSiteStatus.cpp \
+ OpGetSiteVersion.cpp \
OpIsMaximumLogSizeEnabled.cpp \
OpIsOnline.cpp \
OpLoadPackage.cpp \
@@ -68,6 +70,8 @@
OpGetLogFile.h \
OpGetPackageLog.h \
OpGetPackageStatus.h \
+ OpGetSiteStatus.h \
+ OpGetSiteVersion.h \
OpIsMaximumLogSizeEnabled.h \
OpIsOnline.h \
OpLoadPackage.h \
Added: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.cpp (rev 0)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,117 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#include "MapGuideCommon.h"
+#include "ServerAdminService.h"
+#include "OpGetSiteStatus.h"
+#include "LogManager.h"
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Constructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpGetSiteStatus::MgOpGetSiteStatus()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Destructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpGetSiteStatus::~MgOpGetSiteStatus()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Gets the role(s) required to perform this operation.
+/// </summary>
+///----------------------------------------------------------------------------
+MgStringCollection* MgOpGetSiteStatus::GetRoles() const
+{
+ return NULL; // for anonymous/everyone
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Executes the operation.
+/// </summary>
+///
+/// <exceptions>
+/// MgException
+/// </exceptions>
+///----------------------------------------------------------------------------
+void MgOpGetSiteStatus::Execute()
+{
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT(" (%t) MgOpGetSiteStatus::Execute()\n")));
+
+ MG_LOG_OPERATION_MESSAGE(L"MgOpGetSiteStatus");
+
+ MG_TRY()
+
+ MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+ ACE_ASSERT(m_stream != NULL);
+
+ if (0 == m_packet.m_NumArguments)
+ {
+ BeginExecution();
+
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+ // Authentication not required for this operation
+ //Validate();
+
+ Ptr<MgPropertyCollection> propertyCollection = m_service->GetSiteStatus();
+
+ EndExecution(propertyCollection);
+ }
+ else
+ {
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+ }
+
+ if (!m_argsRead)
+ {
+ throw new MgOperationProcessingException(L"MgOpGetSiteStatus.Execute",
+ __LINE__, __WFILE__, NULL, L"", NULL);
+ }
+
+ // Successful operation
+ MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+ MG_CATCH(L"MgOpGetSiteStatus.Execute")
+
+ if (mgException != NULL)
+ {
+ // Failed operation
+ MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+ }
+
+ // Add admin log entry for operation
+ MG_LOG_OPERATION_MESSAGE_ADMIN_ENTRY();
+
+ MG_THROW()
+}
Property changes on: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.h
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.h (rev 0)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,36 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef MGOPGETSITESTATUS_H_
+#define MGOPGETSITESTATUS_H_
+
+#include "ServerAdminOperation.h"
+
+class MgOpGetSiteStatus : public MgServerAdminOperation
+{
+ public:
+ MgOpGetSiteStatus();
+ virtual ~MgOpGetSiteStatus();
+
+ public:
+ virtual void Execute();
+
+ protected:
+ virtual MgStringCollection* GetRoles() const;
+};
+
+#endif
Property changes on: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteStatus.h
___________________________________________________________________
Added: svn:eol-style
+ native
Added: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.cpp (rev 0)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,116 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#include "MapGuideCommon.h"
+#include "ServerAdminService.h"
+#include "OpGetSiteVersion.h"
+#include "LogManager.h"
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Constructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpGetSiteVersion::MgOpGetSiteVersion()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Destructs the object.
+/// </summary>
+///----------------------------------------------------------------------------
+MgOpGetSiteVersion::~MgOpGetSiteVersion()
+{
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Gets the role(s) required to perform this operation.
+/// </summary>
+///----------------------------------------------------------------------------
+MgStringCollection* MgOpGetSiteVersion::GetRoles() const
+{
+ return NULL; // for anonymous/everyone
+}
+
+
+///----------------------------------------------------------------------------
+/// <summary>
+/// Executes the operation.
+/// </summary>
+///
+/// <exceptions>
+/// MgException
+/// </exceptions>
+///----------------------------------------------------------------------------
+void MgOpGetSiteVersion::Execute()
+{
+ ACE_DEBUG((LM_DEBUG, ACE_TEXT(" (%t) MgOpGetSiteVersion::Execute()\n")));
+
+ MG_LOG_OPERATION_MESSAGE(L"MgOpGetSiteVersion");
+
+ MG_TRY()
+
+ MG_LOG_OPERATION_MESSAGE_INIT(m_packet.m_OperationVersion, m_packet.m_NumArguments);
+
+ ACE_ASSERT(m_stream != NULL);
+
+ if (0 == m_packet.m_NumArguments)
+ {
+ BeginExecution();
+
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+
+ Validate();
+
+ STRING version = m_service->GetSiteVersion();
+
+ EndExecution(version);
+ }
+ else
+ {
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_START();
+ MG_LOG_OPERATION_MESSAGE_PARAMETERS_END();
+ }
+
+ if (!m_argsRead)
+ {
+ throw new MgOperationProcessingException(L"MgOpGetSiteVersion.Execute",
+ __LINE__, __WFILE__, NULL, L"", NULL);
+ }
+
+ // Successful operation
+ MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Success.c_str());
+
+ MG_CATCH(L"MgOpGetSiteVersion.Execute")
+
+ if (mgException != NULL)
+ {
+ // Failed operation
+ MG_LOG_OPERATION_MESSAGE_ADD_STRING(MgResources::Failure.c_str());
+ }
+
+ // Add admin log entry for operation
+ MG_LOG_OPERATION_MESSAGE_ADMIN_ENTRY();
+
+ MG_THROW()
+}
Property changes on: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.h
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.h (rev 0)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,36 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef MGOPGETSITEVERSION_H_
+#define MGOPGETSITEVERSION_H_
+
+#include "ServerAdminOperation.h"
+
+class MgOpGetSiteVersion : public MgServerAdminOperation
+{
+ public:
+ MgOpGetSiteVersion();
+ virtual ~MgOpGetSiteVersion();
+
+ public:
+ virtual void Execute();
+
+ protected:
+ virtual MgStringCollection* GetRoles() const;
+};
+
+#endif
Property changes on: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/OpGetSiteVersion.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminOperationFactory.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminOperationFactory.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminOperationFactory.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -35,6 +35,8 @@
#include "OpGetLogFile.h"
#include "OpGetPackageLog.h"
#include "OpGetPackageStatus.h"
+#include "OpGetSiteStatus.h"
+#include "OpGetSiteVersion.h"
#include "OpIsMaximumLogSizeEnabled.h"
#include "OpIsOnline.h"
#include "OpLoadPackage.h"
@@ -301,6 +303,28 @@
}
break;
+ case MgServerAdminServiceOpId::GetSiteVersion:
+ switch (VERSION_NO_PHASE(operationVersion))
+ {
+ case VERSION_SUPPORTED(1,0): // Original 1.0 operation actually called GetInformationProperties
+ handler.reset(new MgOpGetSiteVersion());
+ break;
+ default:
+ break;
+ }
+ break;
+
+ case MgServerAdminServiceOpId::GetSiteStatus:
+ switch (VERSION_NO_PHASE(operationVersion))
+ {
+ case VERSION_SUPPORTED(2,1):
+ handler.reset(new MgOpGetSiteStatus());
+ break;
+ default:
+ break;
+ }
+ break;
+
case MgServerAdminServiceOpId::RegisterServicesOnServers :
switch (VERSION_NO_PHASE(operationVersion))
{
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -550,6 +550,57 @@
return pProperties.Detach();
}
+//////////////////////////////////////////////////////////////////
+/// <summary>
+/// Gets the site version.
+/// </summary>
+STRING MgServerAdminService::GetSiteVersion()
+{
+ STRING version = L"";
+
+ MG_TRY()
+
+ MG_LOG_TRACE_ENTRY(L"MgServerAdminService::GetSiteVersion()");
+
+ MgServerManager* pMan = MgServerManager::GetInstance();
+ if (NULL == pMan)
+ {
+ throw new MgNullReferenceException(L"MgServerAdminService::GetSiteVersion", __LINE__, __WFILE__, NULL, L"", NULL);
+ }
+
+ version = pMan->GetSiteVersion();
+
+ MG_CATCH_AND_THROW(L"MgServerAdminService.GetSiteVersion");
+
+ return version;
+}
+
+//////////////////////////////////////////////////////////////////
+/// <summary>
+/// Gets the status properties for the server.
+/// </summary>
+MgPropertyCollection* MgServerAdminService::GetSiteStatus()
+{
+ Ptr<MgPropertyCollection> pProperties;
+ pProperties = NULL;
+
+ MG_TRY()
+
+ MG_LOG_TRACE_ENTRY(L"MgServerAdminService::GetSiteStatus()");
+
+ MgServerManager* pMan = MgServerManager::GetInstance();
+ if (NULL == pMan)
+ {
+ throw new MgNullReferenceException(L"MgServerAdminService::GetSiteStatus", __LINE__, __WFILE__, NULL, L"", NULL);
+ }
+
+ pProperties = pMan->GetSiteStatus();
+
+ MG_CATCH_AND_THROW(L"MgServerAdminService.GetSiteStatus");
+
+ return pProperties.Detach();
+}
+
///----------------------------------------------------------------------------
/// <summary>
/// Registers services on the specified servers.
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.h
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -62,6 +62,8 @@
void SetDocument(CREFSTRING identifier, MgByteReader* data);
MgPropertyCollection* GetInformationProperties();
+ MgPropertyCollection* GetSiteStatus();
+ STRING GetSiteVersion();
// Service Management Methods
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.vcproj
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.vcproj 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminService.vcproj 2009-10-28 00:17:22 UTC (rev 4323)
@@ -955,6 +955,86 @@
>
</File>
<File
+ RelativePath=".\OpGetSiteStatus.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\OpGetSiteStatus.h"
+ >
+ </File>
+ <File
+ RelativePath=".\OpGetSiteVersion.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\OpGetSiteVersion.h"
+ >
+ </File>
+ <File
RelativePath=".\OpIsMaximumLogSizeEnabled.cpp"
>
<FileConfiguration
Modified: sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminServiceBuild.cpp
===================================================================
--- sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminServiceBuild.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Server/src/Services/ServerAdmin/ServerAdminServiceBuild.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -32,6 +32,8 @@
#include "OpGetLogFile.cpp"
#include "OpGetPackageLog.cpp"
#include "OpGetPackageStatus.cpp"
+#include "OpGetSiteStatus.cpp"
+#include "OpGetSiteVersion.cpp"
#include "OpIsOnline.cpp"
#include "OpIsMaximumLogSizeEnabled.cpp"
#include "OpLoadPackage.cpp"
Modified: sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html
===================================================================
--- sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteinfoform.html 2009-10-28 00:17:22 UTC (rev 4323)
@@ -13,7 +13,7 @@
<b>Operation:</b>
<input type="text" name="OPERATION" value="GETSITEINFO" size="50" ID="Text1">
<p> Version:
- <input type="text" name="VERSION" value="1.0.0" size="10" ID="Text2">
+ <input type="text" name="VERSION" value="2.1.0" size="10" ID="Text2">
<p> Locale:
<input type="text" name="LOCALE" value="en" size="10" ID="Text4">
<p> Client Agent:
Added: sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html
===================================================================
--- sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html (rev 0)
+++ sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<html>
+ <head>
+ <title></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
+ <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
+ <script type="text/javascript" src="setactiontarget.js" >
+ </script>
+ </head>
+ <body>
+ <form name="input" action="" method="get" ID="Form1">
+ <b>Operation:</b>
+ <input type="text" name="OPERATION" value="GETSITESTATUS" size="50" ID="Text1">
+ <p> Version:
+ <input type="text" name="VERSION" value="2.1.0" size="10" ID="Text2">
+ <p> Locale:
+ <input type="text" name="LOCALE" value="en" size="10" ID="Text4">
+ <p> Client Agent:
+ <input type="text" name="CLIENTAGENT" value="MapGuide Developer" size="100">
+ <p>
+ <input type="submit" value="Submit" onclick="SetActionTarget()"> <input type="reset">
+ </form>
+ </body>
+</html>
Property changes on: sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsitestatusform.html
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html
===================================================================
--- sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/getsiteversionform.html 2009-10-28 00:17:22 UTC (rev 4323)
@@ -13,7 +13,7 @@
<b>Operation:</b>
<input type="text" name="OPERATION" value="GETSITEVERSION" size="50" ID="Text1">
<p> Version:
- <input type="text" name="VERSION" value="1.0.0" size="10" ID="Text2">
+ <input type="text" name="VERSION" value="2.1.0" size="10" ID="Text2">
<p> Locale:
<input type="text" name="LOCALE" value="en" size="10" ID="Text4">
<p> Client Agent:
Modified: sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/siteserviceapi.html
===================================================================
--- sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/siteserviceapi.html 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/UnitTest/WebTier/MapAgent/MapAgentForms/siteserviceapi.html 2009-10-28 00:17:22 UTC (rev 4323)
@@ -10,8 +10,9 @@
<ul>
<li><a href="enumerateusersform.html" target="showform">EnumerateUsers</a>
<li><a href="enumerategroupsform.html" target="showform">EnumerateGroups</a>
+<li><a href="getsiteinfoform.html" target="showform">GetSiteInfo</a>
+<li><a href="getsitestatusform.html" target="showform">GetSiteStatus</a>
<li><a href="getsiteversionform.html" target="showform">GetSiteVersion</a>
-<li><a href="getsiteinfoform.html" target="showform">GetSiteInfo</a>
</ul>
</body>
Modified: sandbox/adsk/2.1/Web/src/ApacheAgent/ApacheAgent.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/ApacheAgent/ApacheAgent.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/ApacheAgent/ApacheAgent.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -202,6 +202,13 @@
if (!bValid)
bValid = params->GetXmlPostData().length() != 0;
+ // Certain operations do not require authentication
+ STRING operation = params->GetParameterValue(L"OPERATION");
+ if((_wcsicmp(operation.c_str(), L"GETSITESTATUS") == 0))
+ {
+ bValid = true;
+ }
+
if (!bValid)
{
// Invalid authentication information is not fatal, we should continue.
Modified: sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/CgiAgent/CgiAgent.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -210,6 +210,13 @@
if (!bValid)
bValid = params->GetXmlPostData().length() != 0;
+ // Certain operations do not require authentication
+ STRING operation = params->GetParameterValue(L"OPERATION");
+ if((_wcsicmp(operation.c_str(), L"GETSITESTATUS") == 0))
+ {
+ bValid = true;
+ }
+
if (!bValid)
{
// Invalid authentication information is not fatal, we should continue.
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -52,14 +52,79 @@
// Check common parameters
ValidateCommonParameters();
- // Create ServerAdmin object
- Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
- serverAdmin->Open(m_userInfo);
+ STRING xml;
+ xml += BeginXml();
- // call the C++ APIs
- Ptr<MgPropertyCollection> properties = serverAdmin->GetInformationProperties();
- STRING xml = GetXml(properties);
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ MgSiteManager* siteManager = MgSiteManager::GetInstance();
+ if(siteManager)
+ {
+ MgSiteVector* sites = siteManager->GetSites();
+ if(sites)
+ {
+ for(size_t i=0;i<sites->size();i++)
+ {
+ MgSiteInfo* siteInfo = sites->at(i);
+ // Check the server status - though this status could be out of date and an exception might be thrown
+ bool bHaveSiteInfo = false;
+ STRING message = MgResources::Unknown;
+
+ if (MgSiteInfo::Ok == siteInfo->GetStatus())
+ {
+ MG_HTTP_HANDLER_TRY()
+
+ // Create ServerAdmin object
+ Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
+ serverAdmin->Open(siteInfo->GetTarget(), m_userInfo);
+
+ // call the C++ APIs
+ Ptr<MgPropertyCollection> properties = serverAdmin->GetInformationProperties();
+ xml += GetXml(properties);
+ bHaveSiteInfo = true;
+
+ MG_HTTP_HANDLER_CATCH(L"MgHttpGetSiteInfo.Execute")
+ if (mgException != NULL)
+ {
+ message = mgException->GetMessage();
+ }
+ }
+
+ if(!bHaveSiteInfo)
+ {
+ // This server is not available
+ xml += L"\t<Server>\n";
+
+ xml += L"\t\t<IpAddress>";
+ xml += siteInfo->GetTarget();
+ xml += L"</IpAddress>\n";
+ xml += L"\t\t<DisplayName></DisplayName>\n";
+ xml += L"\t\t<Status>";
+ xml += message;
+ xml += L"</Status>\n";
+ xml += L"\t\t<Version></Version>\n";
+ xml += L"\t\t<OperatingSystem></OperatingSystem>\n";
+ xml += L"\t\t<Statistics></Statistics>\n";
+
+ xml += L"\t</Server>\n";
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // Create ServerAdmin object
+ Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
+ serverAdmin->Open(m_userInfo);
+
+ // call the C++ APIs
+ Ptr<MgPropertyCollection> properties = serverAdmin->GetInformationProperties();
+ xml += GetXml(properties);
+ }
+ xml += EndXml();
+
Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(xml);
if(!value)
throw new MgOutOfMemoryException(L"", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -69,6 +134,32 @@
MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetSiteInfo.Execute")
}
+STRING MgHttpGetSiteInfo::BeginXml()
+{
+ STRING xml = L"";
+
+ xml += L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"<SiteInformation xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteInformation-2.1.0.xsd\">\n";
+ }
+ else
+ {
+ xml += L"<SiteInformation xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteInformation-1.0.0.xsd\">\n";
+ }
+
+ return xml;
+}
+
+STRING MgHttpGetSiteInfo::EndXml()
+{
+ STRING xml = L"";
+
+ xml = L"</SiteInformation>\n";
+
+ return xml;
+}
+
STRING MgHttpGetSiteInfo::GetXml(MgPropertyCollection* properties)
{
STRING xml;
@@ -78,18 +169,23 @@
Ptr<MgInt32Property> int32Prop;
Ptr<MgBooleanProperty> boolProp;
- // this XML follows the SiteInformation-1.0.0.xsd or 2.0.0.xsd schema
- xml += L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
- if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,0,0))
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
{
- xml += L"<SiteInformation xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteInformation-2.0.0.xsd\">\n";
+ xml += L"\t<Server>\n";
}
else
{
- xml += L"<SiteInformation xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteInformation-1.0.0.xsd\">\n";
+ xml += L"\t<SiteServer>\n";
}
- xml += L"\t<SiteServer>\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"\t\t<IpAddress>";
+ strProp = (MgStringProperty*)properties->GetItem(MgServerInformationProperties::MachineIp);
+ xml += strProp->GetValue();
+ xml += L"</IpAddress>\n";
+ }
+
xml += L"\t\t<DisplayName>";
strProp = (MgStringProperty*)properties->GetItem(MgServerInformationProperties::DisplayName);
xml += strProp->GetValue();
@@ -138,7 +234,10 @@
xml += L"\t\t</OperatingSystem>\n";
- xml += L"\t</SiteServer>\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(1,0,0))
+ {
+ xml += L"\t</SiteServer>\n";
+ }
xml += L"\t<Statistics>\n";
@@ -172,7 +271,7 @@
xml += MgUtil::MultiByteToWideChar(tmpStr);
xml += L"</CpuUtilization>\n";
- if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,0,0))
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
{
xml += L"\t\t<WorkingSet>";
int64Prop = (MgInt64Property*)properties->GetItem(L"WorkingSet");
@@ -225,7 +324,10 @@
xml += L"\t</Statistics>\n";
- xml += L"</SiteInformation>\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"\t</Server>\n";
+ }
return xml;
}
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.h
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteInfo.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -46,6 +46,9 @@
private:
STRING GetXml(MgPropertyCollection* properties);
+ STRING BeginXml();
+ STRING EndXml();
+
};
#endif
Added: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.cpp (rev 0)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,163 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#include "HttpHandler.h"
+#include "HttpGetSiteStatus.h"
+
+HTTP_IMPLEMENT_CREATE_OBJECT(MgHttpGetSiteStatus)
+
+/// <summary>
+/// Initializes the common parameters and parameters specific to this request.
+/// </summary>
+/// <param name="name">Input
+/// MgHttpRequest
+/// This contains all the parameters of the request.
+/// </param>
+/// <returns>
+/// nothing
+/// </returns>
+MgHttpGetSiteStatus::MgHttpGetSiteStatus(MgHttpRequest *hRequest)
+{
+ InitializeCommonParameters(hRequest);
+}
+
+/// <summary>
+/// Executes the specific request.
+/// </summary>
+/// <returns>
+/// MgHttpResponse
+/// This contains the response (including MgHttpResult and StatusCode) from the server.
+/// </returns>
+void MgHttpGetSiteStatus::Execute(MgHttpResponse& hResponse)
+{
+ Ptr<MgHttpResult> hResult = hResponse.GetResult();
+
+ MG_HTTP_HANDLER_TRY()
+
+ // Check common parameters
+ ValidateCommonParameters();
+
+ STRING xml = BeginXml();
+
+ MgSiteManager* siteManager = MgSiteManager::GetInstance();
+ if(siteManager)
+ {
+ MgSiteVector* sites = siteManager->GetSites();
+ if(sites)
+ {
+ for(size_t i=0;i<sites->size();i++)
+ {
+ MgSiteInfo* siteInfo = sites->at(i);
+
+ // Check the server status - though this status could be out of date and an exception might be thrown
+ bool bHaveSiteStatus = false;
+ STRING message = MgResources::Unknown;
+
+ if (MgSiteInfo::Ok == siteInfo->GetStatus())
+ {
+ MG_HTTP_HANDLER_TRY()
+ // Create ServerAdmin object
+ Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
+ serverAdmin->Open(siteInfo->GetTarget(), m_userInfo);
+
+ // call the C++ APIs
+ Ptr<MgPropertyCollection> properties = serverAdmin->GetSiteStatus();
+ xml += GetXml(properties);
+ bHaveSiteStatus = true;
+
+ MG_HTTP_HANDLER_CATCH(L"MgHttpGetSiteStatus.Execute")
+ if (mgException != NULL)
+ {
+ message = mgException->GetMessage();
+ }
+ }
+
+ if(!bHaveSiteStatus)
+ {
+ // This server is not available
+ xml += L"\t<Server>\n";
+
+ xml += L"\t\t<DisplayName></DisplayName>\n";
+ xml += L"\t\t<Status>";
+ xml += message;
+ xml += L"</Status>\n";
+ xml += L"\t\t<ApiVersion></ApiVersion>\n";
+
+ xml += L"\t</Server>\n";
+ }
+ }
+ }
+ }
+
+ xml += EndXml();
+
+ Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(xml);
+ if(!value)
+ throw new MgOutOfMemoryException(L"", __LINE__, __WFILE__, NULL, L"", NULL);
+
+ hResult->SetResultObject(value, MgMimeType::Xml);
+
+ MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetSiteStatus.Execute")
+}
+
+STRING MgHttpGetSiteStatus::BeginXml()
+{
+ STRING xml = L"";
+
+ // this XML follows the SiteStatus-1.0.0.xsd schema
+ xml += L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ xml += L"<SiteStatus xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteStatus-2.1.0.xsd\">\n";
+
+ return xml;
+}
+
+STRING MgHttpGetSiteStatus::EndXml()
+{
+ STRING xml = L"";
+
+ xml = L"</SiteStatus>\n";
+
+ return xml;
+}
+
+STRING MgHttpGetSiteStatus::GetXml(MgPropertyCollection* properties)
+{
+ STRING xml = L"";
+ Ptr<MgStringProperty> strProp;
+ Ptr<MgBooleanProperty> boolProp;
+
+ xml += L"\t<Server>\n";
+
+ xml += L"\t\t<DisplayName>";
+ strProp = (MgStringProperty*)properties->GetItem(MgServerInformationProperties::DisplayName);
+ xml += strProp->GetValue();
+ xml += L"</DisplayName>\n";
+
+ xml += L"\t\t<Status>";
+ boolProp = (MgBooleanProperty*)properties->GetItem(MgServerInformationProperties::Status);
+ xml += boolProp->GetValue() ? L"Online" : L"Offline";
+ xml += L"</Status>\n";
+
+ xml += L"\t\t<ApiVersion>";
+ strProp = (MgStringProperty*)properties->GetItem(MgServerInformationProperties::ApiVersion);
+ xml += strProp->GetValue();
+ xml += L"</ApiVersion>\n";
+
+ xml += L"\t</Server>\n";
+
+ return xml;
+}
Property changes on: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.cpp
___________________________________________________________________
Added: svn:eol-style
+ native
Added: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.h
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.h (rev 0)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -0,0 +1,52 @@
+//
+// Copyright (C) 2004-2009 by Autodesk, Inc.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of version 2.1 of the GNU Lesser
+// General Public License as published by the Free Software Foundation.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+//
+
+#ifndef _S_GET_SITE_STATUS_H
+#define _S_GET_SITE_STATUS_H
+
+class MgHttpGetSiteStatus : public MgHttpRequestResponseHandler
+{
+HTTP_DECLARE_CREATE_OBJECT()
+
+public:
+ /// <summary>
+ /// Initializes the common parameters of the request.
+ /// </summary>
+ /// <param name="name">Input
+ /// MgHttpRequest
+ /// This contains all the parameters of the request.
+ /// </param>
+ /// <returns>
+ /// nothing
+ /// </returns>
+ MgHttpGetSiteStatus(MgHttpRequest *hRequest);
+
+ /// <summary>
+ /// Executes the specific request.
+ /// </summary>
+ /// <param name="hResponse">Input
+ /// This contains the response (including MgHttpResult and StatusCode) from the server.
+ /// </param>
+ void Execute(MgHttpResponse& hResponse);
+
+private:
+ STRING GetXml(MgPropertyCollection* properties);
+ STRING BeginXml();
+ STRING EndXml();
+};
+
+#endif
Property changes on: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteStatus.h
___________________________________________________________________
Added: svn:eol-style
+ native
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -51,14 +51,72 @@
// Check common parameters
ValidateCommonParameters();
- // Create ServerAdmin object
- Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
- serverAdmin->Open(m_userInfo);
+ STRING xml;
+ xml += BeginXml();
- // call the C++ APIs
- Ptr<MgPropertyCollection> properties = serverAdmin->GetInformationProperties();
- STRING xml = GetXml(properties);
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ MgSiteManager* siteManager = MgSiteManager::GetInstance();
+ if(siteManager)
+ {
+ MgSiteVector* sites = siteManager->GetSites();
+ if(sites)
+ {
+ for(size_t i=0;i<sites->size();i++)
+ {
+ MgSiteInfo* siteInfo = sites->at(i);
+ // Check the server status - though this status could be out of date and an exception might be thrown
+ bool bHaveSiteVersion = false;
+ STRING message = MgResources::Unknown;
+
+ if (MgSiteInfo::Ok == siteInfo->GetStatus())
+ {
+ MG_HTTP_HANDLER_TRY()
+
+ // Create ServerAdmin object
+ Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
+ serverAdmin->Open(siteInfo->GetTarget(), m_userInfo);
+
+ // call the C++ APIs
+ STRING version = serverAdmin->GetSiteVersion();
+ xml += GetXml(version);
+ bHaveSiteVersion = true;
+
+ MG_HTTP_HANDLER_CATCH(L"MgHttpGetSiteInfo.Execute")
+ if (mgException != NULL)
+ {
+ message = mgException->GetMessage();
+ }
+ }
+
+ if(!bHaveSiteVersion)
+ {
+ // This server is not available
+ xml += L"\t<Server>\n";
+
+ xml += L"\t\t<Version>";
+ xml += message;
+ xml += L"</Version>\n";
+
+ xml += L"\t</Server>\n";
+ }
+ }
+ }
+ }
+ }
+ else
+ {
+ // Create ServerAdmin object
+ Ptr<MgServerAdmin> serverAdmin = new MgServerAdmin();
+ serverAdmin->Open(m_userInfo);
+
+ // call the C++ APIs
+ STRING version = serverAdmin->GetSiteVersion();
+ xml += GetXml(version);
+ }
+ xml += EndXml();
+
Ptr<MgHttpPrimitiveValue> value = new MgHttpPrimitiveValue(xml);
if(!value)
throw new MgOutOfMemoryException(L"", __LINE__, __WFILE__, NULL, L"", NULL);
@@ -68,18 +126,49 @@
MG_HTTP_HANDLER_CATCH_AND_THROW_EX(L"MgHttpGetSiteVersion.Execute")
}
-STRING MgHttpGetSiteVersion::GetXml(MgPropertyCollection* properties)
+STRING MgHttpGetSiteVersion::BeginXml()
{
- Ptr<MgStringProperty> property = (MgStringProperty*)properties->GetItem(L"ServerVersion");
STRING xml = L"";
- // this XML follows the SiteVersion-1.0.0.xsd schema
xml += L"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
- xml += L"<SiteVersion xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteVersion-1.0.0.xsd\">\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"<SiteVersion xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteVersion-2.1.0.xsd\">\n";
+ }
+ else
+ {
+ xml += L"<SiteVersion xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"SiteVersion-1.0.0.xsd\">\n";
+ }
+
+ return xml;
+}
+
+STRING MgHttpGetSiteVersion::EndXml()
+{
+ STRING xml = L"";
+
+ xml += L"</SiteVersion>\n";
+
+ return xml;
+}
+
+STRING MgHttpGetSiteVersion::GetXml(CREFSTRING version)
+{
+ STRING xml = L"";
+
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"\t<Server>\n";
+ }
+
xml += L"\t<Version>";
- xml += property->GetValue();
+ xml += version;
xml += L"</Version>\n";
- xml += L"</SiteVersion>\n";
+ if (m_userInfo->GetApiVersion() == MG_API_VERSION(2,1,0))
+ {
+ xml += L"\t</Server>\n";
+ }
+
return xml;
}
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.h
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpGetSiteVersion.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -44,7 +44,9 @@
void Execute(MgHttpResponse& hResponse);
private:
- STRING GetXml(MgPropertyCollection* properties);
+ STRING GetXml(CREFSTRING version);
+ STRING BeginXml();
+ STRING EndXml();
};
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandler.vcproj
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandler.vcproj 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandler.vcproj 2009-10-28 00:17:22 UTC (rev 4323)
@@ -100,9 +100,9 @@
/>
</Configuration>
<Configuration
- Name="Release|Win32"
- OutputDirectory="..\..\bin\release"
- IntermediateDirectory="..\..\obj\release\HttpHandler"
+ Name="Debug|x64"
+ OutputDirectory="$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
@@ -120,14 +120,17 @@
/>
<Tool
Name="VCMIDLTool"
+ TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="2"
+ Optimization="0"
AdditionalIncludeDirectories="..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;"..\..\..\Oem\dbxml-2.3.10\xerces-c-src\src";..\..\..\Oem\jsoncpp\include"
- PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT"
+ PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT"
+ MinimalRebuild="true"
ExceptionHandling="2"
- RuntimeLibrary="2"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
@@ -143,19 +146,17 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ACE.lib lib_json.lib"
- OutputFile="$(OutDir)\MgHttpHandler.dll"
- LinkIncremental="1"
+ AdditionalDependencies="ACEd.lib lib_jsond.lib"
+ OutputFile="$(OutDir)\MgHttpHandlerd.dll"
+ LinkIncremental="2"
AdditionalLibraryDirectories="..\..\..\Oem\ACE\ACE_wrappers\lib;"..\..\..\Oem\dbxml-2.3.10\lib";..\..\..\Oem\jsoncpp\lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)\MgHttpHandler.pdb"
+ ProgramDatabaseFile="$(OutDir)\MgHttpHandlerd.pdb"
SubSystem="2"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary="..\..\lib\release\HttpHandler.lib"
- TargetMachine="1"
+ ImportLibrary="..\..\lib\debug\HttpHandlerd.lib"
+ TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
@@ -180,9 +181,9 @@
/>
</Configuration>
<Configuration
- Name="Debug|x64"
- OutputDirectory="$(PlatformName)\$(ConfigurationName)"
- IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ Name="Release|Win32"
+ OutputDirectory="..\..\bin\release"
+ IntermediateDirectory="..\..\obj\release\HttpHandler"
ConfigurationType="2"
CharacterSet="1"
>
@@ -200,17 +201,14 @@
/>
<Tool
Name="VCMIDLTool"
- TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
- Optimization="0"
+ Optimization="2"
AdditionalIncludeDirectories="..\..\..\Common\Foundation;..\..\..\Common\Geometry;..\..\..\Common\PlatformBase;..\..\..\Common\MapGuideCommon;..\..\..\Oem\ACE\ACE_wrappers;"..\..\..\Oem\dbxml-2.3.10\xerces-c-src\src";..\..\..\Oem\jsoncpp\include"
- PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT"
- MinimalRebuild="true"
+ PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;MG_MAPAGENT_API_EXPORT"
ExceptionHandling="2"
- BasicRuntimeChecks="3"
- RuntimeLibrary="3"
+ RuntimeLibrary="2"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
@@ -226,17 +224,19 @@
/>
<Tool
Name="VCLinkerTool"
- AdditionalDependencies="ACEd.lib lib_jsond.lib"
- OutputFile="$(OutDir)\MgHttpHandlerd.dll"
- LinkIncremental="2"
+ AdditionalDependencies="ACE.lib lib_json.lib"
+ OutputFile="$(OutDir)\MgHttpHandler.dll"
+ LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\Oem\ACE\ACE_wrappers\lib;"..\..\..\Oem\dbxml-2.3.10\lib";..\..\..\Oem\jsoncpp\lib"
GenerateDebugInformation="true"
- ProgramDatabaseFile="$(OutDir)\MgHttpHandlerd.pdb"
+ ProgramDatabaseFile="$(OutDir)\MgHttpHandler.pdb"
SubSystem="2"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
- ImportLibrary="..\..\lib\debug\HttpHandlerd.lib"
- TargetMachine="17"
+ ImportLibrary="..\..\lib\release\HttpHandler.lib"
+ TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
@@ -360,7 +360,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -368,7 +368,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -400,7 +400,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -408,7 +408,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -440,7 +440,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -448,7 +448,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -480,7 +480,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -488,7 +488,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -520,7 +520,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -528,7 +528,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -560,7 +560,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -568,7 +568,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -600,7 +600,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -608,7 +608,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -640,7 +640,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -648,7 +648,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -680,7 +680,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -688,7 +688,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -720,7 +720,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -728,7 +728,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -760,7 +760,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -768,7 +768,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -800,7 +800,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -808,7 +808,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -840,7 +840,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -848,7 +848,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -880,7 +880,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -888,7 +888,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -920,7 +920,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -928,7 +928,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -960,7 +960,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -968,7 +968,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1000,7 +1000,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1008,7 +1008,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1040,7 +1040,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1048,7 +1048,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1080,7 +1080,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1088,7 +1088,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1120,7 +1120,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1128,7 +1128,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1160,7 +1160,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1168,7 +1168,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1200,7 +1200,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1208,7 +1208,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1240,7 +1240,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1248,7 +1248,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1280,7 +1280,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1288,7 +1288,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1324,7 +1324,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1332,7 +1332,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1364,7 +1364,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1372,7 +1372,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1404,7 +1404,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1412,7 +1412,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1444,7 +1444,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1452,7 +1452,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1484,7 +1484,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1492,7 +1492,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1524,7 +1524,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1532,7 +1532,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1564,7 +1564,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1572,7 +1572,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1604,7 +1604,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1612,7 +1612,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1644,7 +1644,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1652,7 +1652,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1684,7 +1684,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1692,7 +1692,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1724,7 +1724,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1732,7 +1732,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1764,7 +1764,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1772,7 +1772,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1804,7 +1804,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1812,7 +1812,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1844,7 +1844,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1852,7 +1852,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1884,7 +1884,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1892,7 +1892,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1924,7 +1924,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1932,7 +1932,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -1964,7 +1964,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -1972,7 +1972,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2008,7 +2008,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2016,7 +2016,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2048,7 +2048,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2056,7 +2056,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2088,7 +2088,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2096,7 +2096,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2128,7 +2128,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2136,7 +2136,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2168,7 +2168,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2176,7 +2176,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2208,7 +2208,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2216,7 +2216,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2248,7 +2248,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2256,7 +2256,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2288,7 +2288,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2296,7 +2296,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2328,7 +2328,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2336,7 +2336,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2372,7 +2372,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2380,7 +2380,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2412,7 +2412,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2420,7 +2420,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2452,7 +2452,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2460,7 +2460,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2492,7 +2492,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2500,7 +2500,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2533,20 +2533,20 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
+ GeneratePreprocessedFile="0"
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
- GeneratePreprocessedFile="0"
/>
</FileConfiguration>
<FileConfiguration
@@ -2578,7 +2578,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2586,7 +2586,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2618,7 +2618,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2626,7 +2626,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2658,7 +2658,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2666,7 +2666,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2687,7 +2687,7 @@
>
</File>
<File
- RelativePath=".\HttpGetSiteVersion.cpp"
+ RelativePath=".\HttpGetSiteStatus.cpp"
>
<FileConfiguration
Name="Debug|Win32"
@@ -2698,6 +2698,14 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Debug|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
@@ -2706,6 +2714,30 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|x64"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\HttpGetSiteStatus.h"
+ >
+ </File>
+ <File
+ RelativePath=".\HttpGetSiteVersion.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Debug|x64"
ExcludedFromBuild="true"
>
@@ -2714,6 +2746,14 @@
/>
</FileConfiguration>
<FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
Name="Release|x64"
ExcludedFromBuild="true"
>
@@ -2742,7 +2782,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2750,7 +2790,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2782,7 +2822,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2790,7 +2830,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2822,7 +2862,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2830,7 +2870,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2866,7 +2906,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2874,7 +2914,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2906,7 +2946,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2914,7 +2954,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2946,7 +2986,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2954,7 +2994,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -2986,7 +3026,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -2994,7 +3034,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3026,7 +3066,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3034,7 +3074,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3070,7 +3110,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3078,7 +3118,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3110,7 +3150,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3118,7 +3158,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3150,7 +3190,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3158,7 +3198,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3190,7 +3230,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3198,7 +3238,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3230,7 +3270,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3238,7 +3278,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3270,7 +3310,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3278,7 +3318,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3310,7 +3350,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3318,7 +3358,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3350,7 +3390,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3358,7 +3398,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3390,7 +3430,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3398,7 +3438,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3430,7 +3470,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3438,7 +3478,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3482,7 +3522,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3490,7 +3530,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3522,7 +3562,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3530,7 +3570,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3562,7 +3602,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3570,7 +3610,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3602,7 +3642,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3610,7 +3650,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3642,7 +3682,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3650,7 +3690,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3694,7 +3734,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3702,7 +3742,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3734,7 +3774,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3742,7 +3782,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3774,7 +3814,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3782,7 +3822,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3814,7 +3854,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3822,7 +3862,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3854,7 +3894,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3862,7 +3902,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3894,7 +3934,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3902,7 +3942,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3934,7 +3974,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3942,7 +3982,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -3978,7 +4018,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -3986,7 +4026,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4022,7 +4062,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4030,7 +4070,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4062,7 +4102,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4070,7 +4110,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4106,7 +4146,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4114,7 +4154,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4146,7 +4186,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4154,7 +4194,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4186,7 +4226,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4194,7 +4234,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4230,7 +4270,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4238,7 +4278,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4270,7 +4310,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4278,7 +4318,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4310,7 +4350,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4318,7 +4358,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4350,7 +4390,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4358,7 +4398,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4390,7 +4430,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4398,7 +4438,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4430,7 +4470,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4438,7 +4478,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4470,7 +4510,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4478,7 +4518,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4510,7 +4550,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4518,7 +4558,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4554,7 +4594,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4562,7 +4602,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4594,7 +4634,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4602,7 +4642,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4634,7 +4674,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4642,7 +4682,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4695,7 +4735,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4703,7 +4743,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4735,7 +4775,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4743,7 +4783,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4779,7 +4819,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4787,7 +4827,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4819,7 +4859,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4827,7 +4867,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4859,7 +4899,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4867,7 +4907,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4899,7 +4939,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4907,7 +4947,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4939,7 +4979,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4947,7 +4987,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -4979,7 +5019,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -4987,7 +5027,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -5019,7 +5059,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -5027,7 +5067,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -5063,7 +5103,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -5071,7 +5111,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -5103,7 +5143,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -5111,7 +5151,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
@@ -5143,7 +5183,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|x64"
ExcludedFromBuild="true"
>
<Tool
@@ -5151,7 +5191,7 @@
/>
</FileConfiguration>
<FileConfiguration
- Name="Debug|x64"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandlerBuild.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandlerBuild.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpHandlerBuild.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -84,6 +84,7 @@
#include "HttpGetIdentityProperties.cpp"
#include "HttpGetSchemaMapping.cpp"
#include "HttpGetSiteInfo.cpp"
+#include "HttpGetSiteStatus.cpp"
#include "HttpGetSiteVersion.cpp"
#include "HttpGetSpatialContexts.cpp"
#include "HttpGetTileImage.cpp"
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequest.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequest.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequest.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -352,6 +352,7 @@
httpClassCreators[MgHttpResourceStrings::opEnumerateGroups] = MgHttpEnumerateGroups::CreateObject;
httpClassCreators[MgHttpResourceStrings::opGetSiteVersion] = MgHttpGetSiteVersion::CreateObject;
httpClassCreators[MgHttpResourceStrings::opGetSiteInfo] = MgHttpGetSiteInfo::CreateObject;
+ httpClassCreators[MgHttpResourceStrings::opGetSiteStatus] = MgHttpGetSiteStatus::CreateObject;
httpClassCreators[MgHttpResourceStrings::opGetDrawingCoordinateSpace] = MgHttpGetDrawingCoordinateSpace::CreateObject;
httpClassCreators[MgHttpResourceStrings::opCreateSession] = MgHttpCreateSession::CreateObject;
httpClassCreators[MgHttpResourceStrings::opGetDwfViewerPage] = MgHttpGetDwfViewerPage::CreateObject;
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequestResponseHandler.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequestResponseHandler.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpRequestResponseHandler.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -230,7 +230,8 @@
INT32 version = m_userInfo->GetApiVersion();
if (version != MG_API_VERSION(1,0,0) &&
version != MG_API_VERSION(1,2,0) &&
- version != MG_API_VERSION(2,0,0))
+ version != MG_API_VERSION(2,0,0) &&
+ version != MG_API_VERSION(2,1,0))
{
throw new MgInvalidOperationVersionException(
L"MgHttpRequestResponseHandler.ValidateOperationVersion", __LINE__, __WFILE__, NULL, L"", NULL);
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -321,6 +321,7 @@
const STRING MgHttpResourceStrings::opEnumerateGroups = L"ENUMERATEGROUPS";
const STRING MgHttpResourceStrings::opGetSiteVersion = L"GETSITEVERSION";
const STRING MgHttpResourceStrings::opGetSiteInfo = L"GETSITEINFO";
+const STRING MgHttpResourceStrings::opGetSiteStatus = L"GETSITESTATUS";
// Other requests
const STRING MgHttpResourceStrings::opCreateSession = L"CREATESESSION";
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.h
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.h 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/HttpResourceStrings.h 2009-10-28 00:17:22 UTC (rev 4323)
@@ -326,6 +326,7 @@
static const STRING opEnumerateGroups;
static const STRING opGetSiteVersion;
static const STRING opGetSiteInfo;
+ static const STRING opGetSiteStatus;
// Other requests
static const STRING opCreateSession;
Modified: sandbox/adsk/2.1/Web/src/HttpHandler/Makefile.am
===================================================================
--- sandbox/adsk/2.1/Web/src/HttpHandler/Makefile.am 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/HttpHandler/Makefile.am 2009-10-28 00:17:22 UTC (rev 4323)
@@ -83,6 +83,7 @@
HttpGetSchemaMapping.cpp \
HttpGetSchemas.cpp \
HttpGetSiteInfo.cpp \
+ HttpGetSiteStatus.cpp \
HttpGetSiteVersion.cpp \
HttpGetSpatialContexts.cpp \
HttpGetTileImage.cpp \
@@ -203,6 +204,7 @@
HttpGetSchemaMapping.h \
HttpGetSchemas.h \
HttpGetSiteInfo.h \
+ HttpGetSiteStatus.h \
HttpGetSiteVersion.h \
HttpGetSpatialContexts.h \
HttpGetTileImage.h \
Modified: sandbox/adsk/2.1/Web/src/IsapiAgent/IsapiAgent.cpp
===================================================================
--- sandbox/adsk/2.1/Web/src/IsapiAgent/IsapiAgent.cpp 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/IsapiAgent/IsapiAgent.cpp 2009-10-28 00:17:22 UTC (rev 4323)
@@ -169,6 +169,13 @@
if (!bValid)
bValid = params->GetXmlPostData().length() != 0;
+ // Certain operations do not require authentication
+ STRING operation = params->GetParameterValue(L"OPERATION");
+ if((_wcsicmp(operation.c_str(), L"GETSITESTATUS") == 0))
+ {
+ bValid = true;
+ }
+
if (!bValid)
{
// Invalid authentication information is not fatal, we should continue.
Modified: sandbox/adsk/2.1/Web/src/viewerfiles/ajaxmappane.templ
===================================================================
--- sandbox/adsk/2.1/Web/src/viewerfiles/ajaxmappane.templ 2009-10-27 19:04:39 UTC (rev 4322)
+++ sandbox/adsk/2.1/Web/src/viewerfiles/ajaxmappane.templ 2009-10-28 00:17:22 UTC (rev 4323)
@@ -1662,7 +1662,7 @@
url = webAgent + "?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=2.1.0&SESSION=" + sessionId + "&MAPNAME=" + encodeComponent(mapName) + "&SEQ=" + Math.random() + "&CLIENTAGENT=" + encodeComponent(clientAgent) + "&BEHAVIOR=2";
url += viewParams;
document.getElementById("overlay").innerHTML =
- '<img class="mapImage" name="' + reqId + '" id="mapImage" src="' + url + '" width=' + mapDevW + ' height=' + mapDevH + ' border=0 vspace=0 hspace=0 style="visibility: hidden; width: ' + mapDevW + 'px; height: ' + mapDevH + 'px;" onload="return OnMapOverlayImageLoaded(event)">';
+ '<img class="mapImage" name="' + reqId + '" id="mapImage" src="' + url + '" width=' + mapDevW + ' height=' + mapDevH + ' border=0 vspace=0 hspace=0 style="visibility: hidden; width: ' + mapDevW + 'px; height: ' + mapDevH + 'px;" onload="return OnMapOverlayImageLoaded(event)" onerror="return OnMapOverlayImageLoadedError(event)">';
if (opera)
document.getElementById("mapImage").src = document.getElementById("mapImage").src;
}
@@ -1672,7 +1672,7 @@
url = webAgent + "?OPERATION=GETDYNAMICMAPOVERLAYIMAGE&FORMAT=PNG&VERSION=2.1.0&SESSION=" + sessionId + "&MAPNAME=" + encodeComponent(mapName) + "&SEQ=" + Math.random() + "&CLIENTAGENT=" + encodeComponent(clientAgent) + "&BEHAVIOR=5&SELECTIONCOLOR=" + selectionColor;
url += viewParams;
document.getElementById('selOverlay').innerHTML =
- '<img class="mapImage" name="' + reqId + '" id="selectionImage" src="' + url + '" width=' + mapDevW + ' height=' + mapDevH + ' border=0 vspace=0 hspace=0 style="visibility: hidden; width: ' + mapDevW + 'px; height: ' + mapDevH + 'px;" onload="return OnSelectionOverlayImageLoaded(event)">';
+ '<img class="mapImage" name="' + reqId + '" id="selectionImage" src="' + url + '" width=' + mapDevW + ' height=' + mapDevH + ' border=0 vspace=0 hspace=0 style="visibility: hidden; width: ' + mapDevW + 'px; height: ' + mapDevH + 'px;" onload="return OnSelectionOverlayImageLoaded(event)" onerror="return OnSelectionOverlayImageLoadedError(event)">';
if (opera)
document.getElementById("selectionImage").src = document.getElementById("selectionImage").src;
}
@@ -1737,6 +1737,28 @@
return false;
}
+function OnMapOverlayImageLoadedError(e)
+{
+ var frmParent = parent.frames["tbFrame"];
+ var objDivRefresh = frmParent.document.getElementById("divRefresh");
+ if(objDivRefresh != null)
+ {
+ objDivRefresh.style.display='none';
+ }
+ mapLoading = false;
+
+ var text = this.req.responseText;
+
+ var startPos = text.indexOf("<h2>");
+ startPos = startPos + 4;
+ var endPos = text.indexOf("</h2>", startPos);
+ var message = text.substring(startPos, endPos);
+
+ alert(message);
+
+ return false;
+}
+
function OnSelectionOverlayImageLoaded(e)
{
if(msie)
@@ -1785,6 +1807,20 @@
return false;
}
+function OnSelectionOverlayImageLoadedError(e)
+{
+ var text = this.req.responseText;
+
+ var startPos = text.indexOf("<h2>");
+ startPos = startPos + 4;
+ var endPos = text.indexOf("</h2>", startPos);
+ var message = text.substring(startPos, endPos);
+
+ alert(message);
+
+ return false;
+}
+
function OnAlternateImageLoaded()
{
altimg = document.getElementById(curimg == "mapImage1"? "mapImage2": "mapImage1");
@@ -1821,7 +1857,12 @@
function RequestFailed(text)
{
- //placeholder for debugging output
+ var startPos = text.indexOf("<h2>");
+ startPos = startPos + 4;
+ var endPos = text.indexOf("</h2>", startPos);
+ var message = text.substring(startPos, endPos);
+
+ alert(message);
}
function DraggingShape(e)
@@ -2646,12 +2687,12 @@
selRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
selRequest.send(reqParams);
- if(selRequest.responseXML)
+ if(selRequest.status == 200)
{
ProcessFeatureInfo(selRequest.responseXML.documentElement, append, which);
}
else
- RequestFailed("No response");
+ RequestFailed(selRequest.responseText);
}
function CompareProperties(p1, p2)
@@ -2838,8 +2879,14 @@
reqHandler.open("POST", setSelScript, false);
reqHandler.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
reqHandler.send(reqParams);
- if(requery)
- return reqHandler.responseXML;
+
+ if(reqHandler.status == 200)
+ {
+ if(requery)
+ return reqHandler.responseXML;
+ }
+ else
+ RequestFailed(reqHandler.responseText);
}
function ZoomSelection()
@@ -2855,7 +2902,7 @@
dr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
dr.send(reqParams);
- if(dr.responseXML)
+ if(dr.status == 200)
{
var env = ParseEnvelope(dr.responseXML.documentElement);
if(env != null)
@@ -2868,6 +2915,8 @@
GotoView(centerX, centerY, scale, true, true);
}
}
+ else
+ RequestFailed(dr.responseText);
}
function ParseEnvelope(xmlRoot)
More information about the mapguide-commits
mailing list