Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
139
Merge Requests
139
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
044604c8
Commit
044604c8
authored
Feb 15, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Jul 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
interfaces: python3 compatibility (SOAP)
parent
3d3645fe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
1 deletion
+18
-1
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.SOAPBinding.py
...mplateItem/portal_components/document.erp5.SOAPBinding.py
+18
-1
No files found.
bt5/erp5_interfaces/DocumentTemplateItem/portal_components/document.erp5.SOAPBinding.py
View file @
044604c8
...
...
@@ -31,6 +31,9 @@ from Products.ERP5Type import PropertySheet
from
Products.ERP5Type.Permissions
import
AccessContentsInformation
from
Products.ERP5Type.Base
import
Base
import
six
import
zope.component
import
zope.interface
from
ZPublisher.interfaces
import
IXmlrpcChecker
try
:
from
spyne
import
MethodContext
except
ImportError
:
...
...
@@ -42,6 +45,20 @@ else:
from
spyne.server.http
import
HttpBase
_default_xmrpc_checker
=
zope
.
component
.
queryUtility
(
IXmlrpcChecker
)
@
zope
.
interface
.
implementer
(
IXmlrpcChecker
)
def
soap_xmlrpc_checker
(
request
):
if
request
.
getHeader
(
'SOAPACTION'
):
return
False
return
_default_xmrpc_checker
is
None
or
_default_xmrpc_checker
(
request
)
zope
.
component
.
getGlobalSiteManager
().
registerUtility
(
soap_xmlrpc_checker
,
IXmlrpcChecker
)
class
SOAPBinding
(
Base
):
meta_type
=
'ERP5 SOAP Binding'
...
...
@@ -103,7 +120,7 @@ class SOAPBinding(Base):
server
.
get_in_object
(
ctx
)
server
.
get_out_object
(
ctx
)
server
.
get_out_string
(
ctx
)
return
''
.
join
(
ctx
.
out_string
)
return
b
''
.
join
(
ctx
.
out_string
)
try
:
from
spyne.service
import
ServiceBase
...
...
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