Skip to content

Commit

Permalink
1. Support for Mondrian level properties. Caveat: will not work when …
Browse files Browse the repository at this point in the history
…having two properties with the same name on the same hierarchy

2. Support for proxy bypass.
3. Preregisters well known CA root certificates.
4. Works with SharePoint 2013.
  • Loading branch information
alexandra iancu committed Mar 9, 2015
1 parent 007201c commit 93c676a
Show file tree
Hide file tree
Showing 51 changed files with 2,026 additions and 445 deletions.
2 changes: 2 additions & 0 deletions DiscoverResponse.gsoap
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public:
xsd__string PropertyDescription;
xsd__string PropertyType;
xsd__string PropertyAccessType;
xsd__string PROPERTY_USCOREATTRIBUTE_USCOREHIERARCHY_USCORENAME;
xsd__string IsRequired;
xsd__string Value;
xsd__string DataSourceName;
Expand All @@ -78,6 +79,7 @@ public:
xsd__string EXPRESSION;
xsd__string SET_USCORECAPTION;
xsd__string SET_USCOREDISPLAY_USCOREFOLDER;
xsd__string STRUCTURE;
xsd__string DIMENSIONS;
}* row;
};
Expand Down
1 change: 1 addition & 0 deletions ExecuteResponse.gsoap
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
extern typedef struct UserPropStruct {
const char* elementName;
const char* name;
const char* __xsi__type;
const char* value;
} UserDataProp;
Expand Down
6 changes: 6 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Changes 9-March-2015
1. Support for Mondrian level properties. Caveat: will not work when having two propeties with the same name on the same hierarchy
2. Support for proxy bypass.
3. Preregisters well known CA root certificates.
4. Works with SharePoint 2013.

Changes 1-Jan-2015

1. Proxy autoconfiguration script support. Implemented with ATLHTTP. You need to download it from here: http://atlserver.codeplex.com/ . The solution expects atlhttp to be on the same level with gsoap. The current build layout is shown belw:
Expand Down
2 changes: 1 addition & 1 deletion Rowset.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ODBO provider for XMLA data stores
Copyright (C) 2014 Yalos Software Labs
Copyright (C) 2014-2015 ARquery LTD
http://www.arquery.com
This program is free software: you can redistribute it and/or modify
Expand Down
7 changes: 5 additions & 2 deletions Session.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ODBO provider for XMLA data stores
Copyright (C) 2014 Yalos Software Labs
Copyright (C) 2014-2015 ARquery LTD
http://www.arquery.com
This program is free software: you can redistribute it and/or modify
Expand All @@ -24,6 +24,7 @@

#include <strsafe.h>


class catalog_rowset;
class cube_rowset;
class dimension_rowset;
Expand All @@ -35,6 +36,8 @@ class measure_rowset;
class property_rowset;
class set_rowset;



using namespace ATL;

class ATL_NO_VTABLE session :
Expand Down Expand Up @@ -99,7 +102,7 @@ class ATL_NO_VTABLE session :
return FInit();
}

void FinalRelease()
void FinalRelease()
{
session_table().erase( session_table().find( this ) );
}
Expand Down
2 changes: 1 addition & 1 deletion XMLAAdvancedDlg.rgs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HKCR
VersionIndependentProgID = s 'XMLAProviderLib.XMLAAdvancedDlg'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
val ThreadingModel = s 'Both'
}
TypeLib = s '{27958A5E-8C87-4CFA-B293-7940DE842E24}'
Version = s '1.0'
Expand Down
2 changes: 1 addition & 1 deletion XMLAConnectionDlg.rgs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HKCR
VersionIndependentProgID = s 'XMLAProviderLib.XMLAConnectionDlg'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
val ThreadingModel = s 'Both'
}
TypeLib = s '{27958A5E-8C87-4CFA-B293-7940DE842E24}'
Version = s '1.0'
Expand Down
2 changes: 1 addition & 1 deletion XMLAData.rgs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ HKCR
VersionIndependentProgID = s 'XMLAProvider.data_source'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
val ThreadingModel = s 'Both'
}
'OLE DB MD Provider' = s 'XMLA Data Source'
val OLEDB_SERVICES = d '4294967295'
Expand Down
7 changes: 6 additions & 1 deletion XMLAMethods.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,12 @@ struct SOAP_ENV__Header {
} *EndSession;
};


struct SOAP_ENV__Detail {
struct erType {
xsd__string code;
xsd__string desc;
} error;
};

//gsoap xmlns service name: XMLAConnection //gsoap xmlns service type: XMLAConnectionPortType
//gsoap xmlns service namespace: urn:schemas-microsoft-com:xml-analysis
Expand Down
Binary file modified XMLAProvider.aps
Binary file not shown.
2 changes: 1 addition & 1 deletion XMLAProvider.idl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ODBO provider for XMLA data stores
Copyright (C) 2014 Yalos Software Labs
Copyright (C) 2014-2015 ARquery LTD
http://www.arquery.com

This program is free software: you can redistribute it and/or modify
Expand Down
Binary file modified XMLAProvider.rc
Binary file not shown.
19 changes: 10 additions & 9 deletions XMLAProvider.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>ALLOW_TRANSLATIONS;WITH_OPENSSL;WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_OPENSSL;WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\gsoap\gsoap\;..\openssl\include\;..\atl_server\include\</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
Expand All @@ -110,7 +110,7 @@
<ModuleDefinitionFile>.\XMLAProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RegisterOutput>true</RegisterOutput>
<AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32d.lib;ssleay32d.lib;Version.lib;comsuppwd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Iphlpapi.lib;Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32d.lib;ssleay32d.lib;Version.lib;comsuppwd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\openssl\lib\Windows\i386\static\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
Expand All @@ -119,7 +119,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WITH_OPENSSL;WIN32;_WINDOWS;_DEBUG;_USRDLL;ALLOW_TRANSLATIONS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_NOIDREF;WITH_OPENSSL;WIN32;_WINDOWS;_DEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\gsoap\gsoap\;..\openssl\include\;..\atl_server\include\</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
Expand All @@ -143,7 +143,7 @@
<ModuleDefinitionFile>.\XMLAProvider.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<RegisterOutput>true</RegisterOutput>
<AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32d.lib;ssleay32d.lib;Version.lib;comsuppwd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Iphlpapi.lib;Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32d.lib;ssleay32d.lib;Version.lib;comsuppwd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\openssl\lib\Windows\x86_64\static\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
Expand All @@ -152,7 +152,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>ALLOW_TRANSLATIONS;WITH_OPENSSL;WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_OPENSSL;WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\gsoap\gsoap\;..\openssl\include\;..\atl_server\include\</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
Expand Down Expand Up @@ -180,7 +180,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
<AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32.lib;ssleay32.lib;Version.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Iphlpapi.lib;Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32.lib;ssleay32.lib;Version.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\openssl\lib\Windows\i386\static\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
Expand All @@ -189,7 +189,7 @@
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<PreprocessorDefinitions>ALLOW_TRANSLATIONS;WITH_OPENSSL;WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WITH_OPENSSL;WIN32;_WINDOWS;NDEBUG;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\gsoap\gsoap\;..\openssl\include\;..\atl_server\include\</AdditionalIncludeDirectories>
</ClCompile>
<Midl>
Expand All @@ -215,7 +215,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<RegisterOutput>true</RegisterOutput>
<AdditionalDependencies>Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32.lib;ssleay32.lib;Version.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>Iphlpapi.lib;Ws2_32.lib;Dnsapi.lib;Crypt32.lib;Wininet.lib;libeay32.lib;ssleay32.lib;Version.lib;comsuppw.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>..\openssl\lib\Windows\x86_64\static\</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
Expand Down Expand Up @@ -289,6 +289,7 @@
<ClInclude Include="config_data.h" />
<ClInclude Include="cube_row.h" />
<ClInclude Include="axis_row.h" />
<ClInclude Include="dimension_properties.h" />
<ClInclude Include="dimension_row.h" />
<ClInclude Include="dllmain.h" />
<ClInclude Include="function_row.h" />
Expand Down Expand Up @@ -320,7 +321,7 @@
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\gsoap\gsoap\bin\win32\soapcpp2.exe -i XMLAMethods.h</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">soapXMLAConnectionProxy.h soapXMLAConnectionProxy.cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">soapXMLAConnectionProxy.h soapXMLAConnectionProxy.cpp</Outputs>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</CustomBuild>
<ClInclude Include="version_info.h" />
<ClInclude Include="XMLAProvider_i.h" />
Expand Down
3 changes: 3 additions & 0 deletions XMLAProvider.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@
<ClInclude Include="pac_interpreter.h">
<Filter>Header Files\config</Filter>
</ClInclude>
<ClInclude Include="dimension_properties.h">
<Filter>Header Files\compatibility</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="XMLAProvider.rc">
Expand Down
35 changes: 22 additions & 13 deletions axis_row.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ODBO provider for XMLA m_data_exchange stores
Copyright (C) 2014 Yalos Software Labs
Copyright (C) 2014-2015 ARquery LTD
http://www.arquery.com
This program is free software: you can redistribute it and/or modify
Expand All @@ -24,6 +24,8 @@

class axis_row
{
private:
static const size_t MAX_BUF_SIZE = 10 * 1024 * sizeof( wchar_t );
private:
char* m_data_exchange;
xmlns__Axis* m_axis;
Expand All @@ -33,6 +35,7 @@ class axis_row
DBLENGTH m_buf_size;
typedef std::map<unsigned short, unsigned short> m_indirection_type;
m_indirection_type m_indirection;
std::vector<size_t> m_boundaries;
public:
axis_row()
{
Expand Down Expand Up @@ -87,12 +90,12 @@ class axis_row

for ( unsigned int i = 0, e = m_axis_info->__size; i < e; ++i ) {
xmlns__HierarchyInfo hInfo = m_axis_info->HierarchyInfo[i];

m_boundaries.push_back(crtColInfo);
m_col_info[crtColInfo].pwszName = _wcsdup( CA2W( hInfo.UName.name, CP_UTF8 ) );
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand All @@ -105,7 +108,7 @@ class axis_row
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand All @@ -118,7 +121,7 @@ class axis_row
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand Down Expand Up @@ -158,7 +161,7 @@ class axis_row
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand All @@ -173,7 +176,7 @@ class axis_row
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand Down Expand Up @@ -204,7 +207,7 @@ class axis_row
m_col_info[crtColInfo].pTypeInfo = (ITypeInfo*)nullptr;
m_col_info[crtColInfo].iOrdinal = crtColInfo+1;
m_col_info[crtColInfo].dwFlags = DBCOLUMNFLAGS_ISFIXEDLENGTH;
m_col_info[crtColInfo].ulColumnSize = 1024;
m_col_info[crtColInfo].ulColumnSize = MAX_BUF_SIZE;
m_col_info[crtColInfo].wType = DBTYPE_WSTR;
m_col_info[crtColInfo].bPrecision = 0xFF;
m_col_info[crtColInfo].bScale = 0xFF;
Expand Down Expand Up @@ -232,9 +235,14 @@ class axis_row
*( ( DBLENGTH *) m_data_exchange ) = idx;
offset += m_col_info[0].ulColumnSize;

size_t pos = 0;
size_t length = m_boundaries.size() - 1;
for ( unsigned short i = 1; i < m_col_info_cnt; ++i ) {
unsigned short idx = ( i-1 ) % member_size;
unsigned short memberIdx = (i - 1 ) / member_size;
if ( (pos < length) && (i == m_boundaries[pos+1] ) ) {
++pos;
}
unsigned short idx = i- m_boundaries[pos];//( i-1 ) % member_size;
unsigned short memberIdx = pos;//(i - 1 ) / member_size;
switch ( idx ) {
case 0://UName
wcscpy_s( ( wchar_t* )( m_data_exchange + offset ), m_col_info[i].ulColumnSize / 2, CA2W( crtTuple.Member[ memberIdx ].UName, CP_UTF8 ) );
Expand All @@ -258,8 +266,8 @@ class axis_row
break;
default://optional
{
unsigned short customIdx = m_indirection.at(idx);
switch ( m_indirection.at( idx ) ) {
//unsigned short customIdx = m_indirection.at(idx);
switch ( m_indirection.at( i - 1 ) ) {
case 0://ParentUniqueName
if ( nullptr != crtTuple.Member[ memberIdx ].PARENT_USCOREUNIQUE_USCORENAME ) {
wcscpy_s( ( wchar_t* )( m_data_exchange + offset ), m_col_info[i].ulColumnSize / 2, CA2W( crtTuple.Member[ memberIdx ].PARENT_USCOREUNIQUE_USCORENAME, CP_UTF8 ) );
Expand Down Expand Up @@ -299,7 +307,7 @@ class axis_row
break;
default://custom props
{
size_t crt_idx = m_indirection.at( idx ) - 3;
size_t crt_idx = m_indirection.at( i - 1 ) - 3;
if ( crtTuple.Member[ memberIdx ].__userProp.__size <= crt_idx )
{
*( ( wchar_t* )( m_data_exchange + offset ) ) = 0;
Expand Down Expand Up @@ -353,6 +361,7 @@ class axis_row
m_col_info = nullptr;
m_data_exchange = nullptr;
m_axis = nullptr;
m_boundaries.clear();
}
};

Expand Down
2 changes: 1 addition & 1 deletion axis_rowset.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
ODBO provider for XMLA data stores
Copyright (C) 2014 Yalos Software Labs
Copyright (C) 2014-2015 ARquery LTD
http://www.arquery.com
This program is free software: you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit 93c676a

Please sign in to comment.