Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
olapy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
olapy
Commits
3cab42e0
Commit
3cab42e0
authored
Jun 20, 2017
by
Boris Kocherov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support OPTIONS request, that is needed for https
parent
fd3ff66e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
olapy/core/services/xmla.py
olapy/core/services/xmla.py
+16
-3
No files found.
olapy/core/services/xmla.py
View file @
3cab42e0
...
...
@@ -7,9 +7,11 @@ from datetime import datetime
from
os.path
import
expanduser
from
lxml
import
etree
from
spyne
import
AnyXml
,
Application
,
ServiceBase
,
rpc
from
spyne
import
AnyXml
,
Application
,
ServiceBase
,
rpc
,
Fault
from
spyne.const.http
import
HTTP_200
from
spyne.error
import
InvalidCredentialsError
from
spyne.protocol.soap
import
Soap11
from
spyne.server.http
import
HttpTransportContext
from
spyne.server.wsgi
import
WsgiApplication
from
..mdx.tools.config_file_parser
import
ConfigParser
...
...
@@ -20,6 +22,17 @@ from .xmla_execute_tools import XmlaExecuteTools
from
.xmla_execute_xsds
import
execute_xsd
class
XmlaSoap11
(
Soap11
):
def
create_in_document
(
self
,
ctx
,
charset
=
None
):
if
isinstance
(
ctx
.
transport
,
HttpTransportContext
):
http_verb
=
ctx
.
transport
.
get_request_method
()
if
http_verb
==
"OPTIONS"
:
ctx
.
transport
.
resp_headers
[
'allow'
]
=
"POST, OPTIONS"
ctx
.
transport
.
respond
(
HTTP_200
)
raise
Fault
(
""
)
return
Soap11
.
create_in_document
(
self
,
ctx
,
charset
)
class
XmlaProviderService
(
ServiceBase
):
"""
The main class to active soap services between xmla clients and olapy.
...
...
@@ -214,8 +227,8 @@ class XmlaProviderService(ServiceBase):
application
=
Application
(
[
XmlaProviderService
],
'urn:schemas-microsoft-com:xml-analysis'
,
in_protocol
=
Soap11
(
validator
=
'soft'
),
out_protocol
=
Soap11
(
validator
=
'soft'
))
in_protocol
=
Xmla
Soap11
(
validator
=
'soft'
),
out_protocol
=
Xmla
Soap11
(
validator
=
'soft'
))
# validator='soft' or nothing, this is important because spyne doesn't support encodingStyle until now !!!!
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment