Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

SOAP fixes #6

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion wsmeext/soap/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
A SOAP implementation for wsme.
Parts of the code were taken from the tgwebservices soap implmentation.
"""
from __future__ import absolute_import
from __future__ import absolute_import, print_function

import pkg_resources
import datetime
Expand Down Expand Up @@ -383,6 +383,9 @@ def read_arguments(self, context):
return kw
msg = context.soap_message
for param in msg:
# FIX for python2.6 (only for lxml)
if use_lxml and isinstance(param, ET._Comment):
continue
name = param.tag[len(self.typenamespace) + 2:]
arg = context.funcdef.get_arg(name)
value = fromsoap(arg.datatype, param, {
Expand Down
6 changes: 3 additions & 3 deletions wsmeext/soap/wsdl.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def gen_function_types(self, path, funcdef):
type=self.soap_type(farg.datatype, True)
)
if not farg.mandatory:
element.set('minOccurs', 0)
element.set('minOccurs', '0')

response_el = ET.Element(
xs_ns('element'),
Expand Down Expand Up @@ -152,7 +152,7 @@ def gen_functions(self):
binding = ET.Element(
wsdl_ns('binding'),
name='%s_Binding' % self.service_name,
type='%s_PortType' % self.service_name
type='tns:%s_PortType' % self.service_name
)
ET.SubElement(
binding,
Expand Down Expand Up @@ -224,7 +224,7 @@ def gen_functions(self):
)
ET.SubElement(
operation,
wsdl_ns('operation'),
soap_ns('operation'),
soapAction=soap_fname
)
ET.SubElement(
Expand Down