diff --git a/bt5/erp5_olapy/ActionTemplateItem/portal_types/Olapy%20Connector/view.xml b/bt5/erp5_olapy/ActionTemplateItem/portal_types/Olapy%20Connector/view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3d741cf754cabcd9efed47cba027bbff176d21e8
--- /dev/null
+++ b/bt5/erp5_olapy/ActionTemplateItem/portal_types/Olapy%20Connector/view.xml
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+ -
+ action
+
+ AAAAAAAAAAI=
+
+
+ -
+ categories
+
+
+ action_type/object_view
+
+
+
+ -
+ category
+ object_view
+
+ -
+ condition
+
+
+ -
+ description
+
+
+
+
+ -
+ icon
+
+
+ -
+ id
+ view
+
+ -
+ permissions
+
+
+ View
+
+
+
+ -
+ portal_type
+ Action Information
+
+ -
+ priority
+ 1.0
+
+ -
+ title
+ View
+
+ -
+ visible
+ 1
+
+
+
+
+
+
+
+
+
+
+ -
+ text
+ string:${object_url}/OlapyConnector_view
+
+
+
+
+
diff --git a/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.py b/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.py
new file mode 100644
index 0000000000000000000000000000000000000000..bb87644bc43a98756a3003307f580549a4292225
--- /dev/null
+++ b/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.py
@@ -0,0 +1,48 @@
+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# Copyright (c) 2017 Nexedi SA and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+##############################################################################
+
+from Products.ERP5.Document.SOAPBinding import SOAPBinding
+from spyne.server.http import HttpBase
+from olapy.core.services.xmla import application as olapy_application
+
+class OlapyConnector(SOAPBinding):
+ """Connector to Olapy
+ """
+
+ def _getServer(self):
+ """ERP5.Document.SOAPBinding API to create a spyne server"""
+ try:
+ serial, server = self._v_server
+ if serial == self._p_serial:
+ return server
+ except AttributeError:
+ pass
+
+ server = HttpBase(olapy_application)
+ self._v_server = self._p_serial, server
+ return server
diff --git a/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.xml b/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6da86173ea88158467d788981954ac3a2c9b7f8a
--- /dev/null
+++ b/bt5/erp5_olapy/DocumentTemplateItem/portal_components/document.erp5.OlapyConnector.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+ -
+ _recorded_property_dict
+
+ AAAAAAAAAAI=
+
+
+ -
+ default_reference
+ OlapyConnector
+
+ -
+ description
+
+
+
+
+ -
+ id
+ document.erp5.OlapyConnector
+
+ -
+ portal_type
+ Document Component
+
+ -
+ sid
+
+
+
+
+ -
+ text_content_error_message
+
+
+
+
+ -
+ text_content_warning_message
+
+
+
+
+ -
+ version
+ erp5
+
+ -
+ workflow_history
+
+ AAAAAAAAAAM=
+
+
+
+
+
+
+
+
+
+
+
+ -
+ data
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ data
+
+
+
-
+ component_validation_workflow
+
+ AAAAAAAAAAQ=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ action
+ validate
+
+ -
+ validation_state
+ validated
+
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml b/bt5/erp5_olapy/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0d6e141a0427969c9101173a49670cf7795dab34
--- /dev/null
+++ b/bt5/erp5_olapy/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
@@ -0,0 +1,5 @@
+
+
+ - Olapy Connector
+
+
\ No newline at end of file
diff --git a/bt5/erp5_olapy/PortalTypePropertySheetTemplateItem/property_sheet_list.xml b/bt5/erp5_olapy/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
new file mode 100644
index 0000000000000000000000000000000000000000..93e90d9436018f16a2cbd0dce318d4f8bda89105
--- /dev/null
+++ b/bt5/erp5_olapy/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
@@ -0,0 +1,5 @@
+
+
+ - Reference
+
+
\ No newline at end of file
diff --git a/bt5/erp5_olapy/PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml b/bt5/erp5_olapy/PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b7e0c9511ce5576858fc0481a950225f0572280a
--- /dev/null
+++ b/bt5/erp5_olapy/PortalTypeTemplateItem/portal_types/Olapy%20Connector.xml
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+
+ -
+ content_icon
+
+
+
+
+ -
+ description
+
+
+
+
+ -
+ id
+ Olapy Connector
+
+ -
+ init_script
+
+
+
+
+ -
+ permission
+
+
+
+
+ -
+ portal_type
+ Base Type
+
+ -
+ type_class
+ OlapyConnector
+
+ -
+ type_interface
+
+
+
+
+ -
+ type_mixin
+
+
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml
new file mode 100644
index 0000000000000000000000000000000000000000..0f276a8f0c4027833f98b025a11119631bb1bf59
--- /dev/null
+++ b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+ -
+ _objects
+
+
+
+
+ -
+ id
+ erp5_olapy
+
+ -
+ title
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml
new file mode 100644
index 0000000000000000000000000000000000000000..689ffe886d822e6d030a1452e4a89c2fc06d78c5
--- /dev/null
+++ b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view.xml
@@ -0,0 +1,154 @@
+
+
+
+
+
+
+
+
+ -
+ _bind_names
+
+
+
+
+ -
+ _objects
+
+
+
+
+ -
+ action
+ Base_edit
+
+ -
+ description
+
+
+ -
+ edit_order
+
+
+
+
+ -
+ encoding
+ UTF-8
+
+ -
+ enctype
+
+
+ -
+ group_list
+
+
+ left
+ right
+ center
+ bottom
+ hidden
+
+
+
+ -
+ groups
+
+
+
-
+ bottom
+
+
+
+
+ -
+ center
+
+
+
+
+ -
+ hidden
+
+
+
+
+ -
+ left
+
+
+ my_reference
+
+
+
+ -
+ right
+
+
+ my_translated_validation_state_title
+
+
+
+
+
+
+ -
+ id
+ OlapyConnector_view
+
+ -
+ method
+ POST
+
+ -
+ name
+ FTPConnector_view
+
+ -
+ pt
+ form_view
+
+ -
+ row_length
+ 4
+
+ -
+ stored_encoding
+ UTF-8
+
+ -
+ title
+ FTP Connector
+
+ -
+ unicode_mode
+ 0
+
+ -
+ update_action
+
+
+ -
+ update_action_title
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml
new file mode 100644
index 0000000000000000000000000000000000000000..892518905d970fb59f1badfaa6aab7083c31a866
--- /dev/null
+++ b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_reference.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+ -
+ delegated_list
+
+
+
+
+ -
+ id
+ my_reference
+
+ -
+ message_values
+
+
+
-
+ external_validator_failed
+ The input failed the external validator.
+
+
+
+
+ -
+ overrides
+
+
+
-
+ field_id
+
+
+ -
+ form_id
+
+
+ -
+ target
+
+
+
+
+
+ -
+ tales
+
+
+
-
+ field_id
+
+
+ -
+ form_id
+
+
+ -
+ target
+
+
+
+
+
+ -
+ values
+
+
+
-
+ field_id
+ my_view_mode_reference
+
+ -
+ form_id
+ Base_viewFieldLibrary
+
+ -
+ target
+ Click to edit the target
+
+
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_translated_validation_state_title.xml b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_translated_validation_state_title.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f8bf5216b58f242f89e84c2b71a6fa143dfe5460
--- /dev/null
+++ b/bt5/erp5_olapy/SkinTemplateItem/portal_skins/erp5_olapy/OlapyConnector_view/my_translated_validation_state_title.xml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+ -
+ delegated_list
+
+
+
+
+ -
+ id
+ my_translated_validation_state_title
+
+ -
+ message_values
+
+
+
-
+ external_validator_failed
+ The input failed the external validator.
+
+
+
+
+ -
+ overrides
+
+
+
-
+ field_id
+
+
+ -
+ form_id
+
+
+ -
+ target
+
+
+
+
+
+ -
+ tales
+
+
+
-
+ field_id
+
+
+ -
+ form_id
+
+
+ -
+ target
+
+
+
+
+
+ -
+ values
+
+
+
-
+ field_id
+ my_view_mode_translated_workflow_state_title
+
+ -
+ form_id
+ Base_viewFieldLibrary
+
+ -
+ target
+ Click to edit the target
+
+
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.py b/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.py
new file mode 100644
index 0000000000000000000000000000000000000000..cbb41cb69e235c4170f53160aed2a63a2f57d5d9
--- /dev/null
+++ b/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.py
@@ -0,0 +1,101 @@
+##############################################################################
+#
+# Copyright (c) 2017 Nexedi SA and Contributors. All Rights Reserved.
+#
+# WARNING: This program as such is intended to be used by professional
+# programmers who take the whole responsibility of assessing all potential
+# consequences resulting from its eventual inadequacies and bugs
+# End users who are looking for a ready-to-use solution with commercial
+# guarantees and support are strongly adviced to contract a Free Software
+# Service Company
+#
+# This program is Free Software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+##############################################################################
+
+from StringIO import StringIO
+import xml.etree.ElementTree as ET
+
+from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
+
+
+class TestOlapy(ERP5TypeTestCase):
+
+ def publish(self, *args, **kw):
+ """ add (partial) support for publish in live tests.
+
+ patch Zope.Testing.ZopeTestCase.functional publish, with support for request within a request
+
+ TODO: integrate in live test class.
+ """
+ from zope.security.management import endInteraction
+ from zope.security.management import restoreInteraction
+ endInteraction()
+ module_cache_set = getattr(self.portal.REQUEST, '_module_cache_set', None)
+ try:
+ return super(TestOlapy, self).publish(*args, **kw)
+ finally:
+ restoreInteraction()
+ if module_cache_set is not None:
+ self.portal.REQUEST._module_cache_set = module_cache_set
+
+ def afterSetUp(self):
+ self.olapy_connector = self.portal.portal_web_services.newContent(
+ portal_type='Olapy Connector')
+
+ def test_Execute(self):
+ dummy_execute_message = """
+
+
+
+
+
+ SELECT {[Dim].[Dim].[column0].[data1],
+ [Dim].[Dim].[column0].[data2]} ON COLUMNS FROM ERP5
+
+
+
+ TupleFormat
+ Multidimensional
+
+
+
+
+
+ """
+ ret = self.publish(
+ self.olapy_connector.absolute_url_path(),
+ request_method="POST",
+ handle_errors=False,
+ stdin=StringIO(dummy_execute_message))
+
+ # this can be parsed
+ tree = ET.fromstring(ret.getBody())
+
+ # and looks like a SOAP/XMLA response
+ response = tree.find('.//{urn:schemas-microsoft-com:xml-analysis}ExecuteResponse')
+ self.assertIsNotNone(response)
+
+ # returning two cells
+ self.assertEqual(
+ 2,
+ len(tree.findall('.//{urn:schemas-microsoft-com:xml-analysis:mddataset}Cell'
+ '/{urn:schemas-microsoft-com:xml-analysis:mddataset}Value')))
+
diff --git a/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.xml b/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9c785c5e30595728465e6593b20412bc5245c554
--- /dev/null
+++ b/bt5/erp5_olapy/TestTemplateItem/portal_components/test.erp5.testOlapyConnector.xml
@@ -0,0 +1,123 @@
+
+
+
+
+
+
+
+
+ -
+ _recorded_property_dict
+
+ AAAAAAAAAAI=
+
+
+ -
+ default_reference
+ testOlapyConnector
+
+ -
+ description
+
+
+
+
+ -
+ id
+ test.erp5.testOlapyConnector
+
+ -
+ portal_type
+ Test Component
+
+ -
+ sid
+
+
+
+
+ -
+ text_content_error_message
+
+
+
+
+ -
+ text_content_warning_message
+
+
+
+
+ -
+ version
+ erp5
+
+ -
+ workflow_history
+
+ AAAAAAAAAAM=
+
+
+
+
+
+
+
+
+
+
+
+ -
+ data
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ data
+
+
+
-
+ component_validation_workflow
+
+ AAAAAAAAAAQ=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+ action
+ validate
+
+ -
+ validation_state
+ validated
+
+
+
+
+
+
+
diff --git a/bt5/erp5_olapy/bt/dependency_list b/bt5/erp5_olapy/bt/dependency_list
new file mode 100644
index 0000000000000000000000000000000000000000..bf70d455baed527bac4c063f210ae7784c6f7a4e
--- /dev/null
+++ b/bt5/erp5_olapy/bt/dependency_list
@@ -0,0 +1 @@
+erp5_web_service
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_action_path_list b/bt5/erp5_olapy/bt/template_action_path_list
new file mode 100644
index 0000000000000000000000000000000000000000..47dbe403fcac878f48b644385044bff68ca0c112
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_action_path_list
@@ -0,0 +1 @@
+Olapy Connector | view
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_document_id_list b/bt5/erp5_olapy/bt/template_document_id_list
new file mode 100644
index 0000000000000000000000000000000000000000..2039837ba85140efc5453423c4c74373f335030e
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_document_id_list
@@ -0,0 +1 @@
+document.erp5.OlapyConnector
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_format_version b/bt5/erp5_olapy/bt/template_format_version
new file mode 100644
index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_format_version
@@ -0,0 +1 @@
+1
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_portal_type_allowed_content_type_list b/bt5/erp5_olapy/bt/template_portal_type_allowed_content_type_list
new file mode 100644
index 0000000000000000000000000000000000000000..4d5e30af8154a479cf126c3b40d1ac5dc6490451
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_portal_type_allowed_content_type_list
@@ -0,0 +1 @@
+Web Service Tool | Olapy Connector
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_portal_type_id_list b/bt5/erp5_olapy/bt/template_portal_type_id_list
new file mode 100644
index 0000000000000000000000000000000000000000..a492203961fc4210f25adc6d2ed1cadd97025028
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_portal_type_id_list
@@ -0,0 +1 @@
+Olapy Connector
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_portal_type_property_sheet_list b/bt5/erp5_olapy/bt/template_portal_type_property_sheet_list
new file mode 100644
index 0000000000000000000000000000000000000000..343905bbad678df6444adf72db3e29686ead9a2e
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_portal_type_property_sheet_list
@@ -0,0 +1 @@
+Olapy Connector | Reference
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_skin_id_list b/bt5/erp5_olapy/bt/template_skin_id_list
new file mode 100644
index 0000000000000000000000000000000000000000..dcef4bad23ec85bfcbc1f8065943a259dc615b24
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_skin_id_list
@@ -0,0 +1 @@
+erp5_olapy
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/template_test_id_list b/bt5/erp5_olapy/bt/template_test_id_list
new file mode 100644
index 0000000000000000000000000000000000000000..24f1ebdb52bf6f828906f80a6f9737a0cdf6604b
--- /dev/null
+++ b/bt5/erp5_olapy/bt/template_test_id_list
@@ -0,0 +1 @@
+test.erp5.testOlapyConnector
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/test_dependency_list b/bt5/erp5_olapy/bt/test_dependency_list
new file mode 100644
index 0000000000000000000000000000000000000000..418a1a563a9077206438e46e77047d5b0ea3be59
--- /dev/null
+++ b/bt5/erp5_olapy/bt/test_dependency_list
@@ -0,0 +1 @@
+erp5_full_text_myisam_catalog
\ No newline at end of file
diff --git a/bt5/erp5_olapy/bt/title b/bt5/erp5_olapy/bt/title
new file mode 100644
index 0000000000000000000000000000000000000000..dcef4bad23ec85bfcbc1f8065943a259dc615b24
--- /dev/null
+++ b/bt5/erp5_olapy/bt/title
@@ -0,0 +1 @@
+erp5_olapy
\ No newline at end of file