You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are trying to build a SOAP app with Django + Spyne building specific required endpoints. The exposed WSDL has to precisely match a predetermined XML file, including the custom simpleType definitions. We're currently failing to show the simple type definitions on our WSDL, everything else matches up precisely.
A simple example is the following hello world app:
import logging
logging.basicConfig(level=logging.DEBUG)
from spyne import Application, rpc, ServiceBase, \
Integer, Unicode, SimpleModel
from spyne import Iterable
from spyne.protocol.xml import XmlDocument
from spyne.protocol.soap import Soap11
from spyne.interface.wsdl import Wsdl11
from spyne.server.django import DjangoApplication
from django.views.decorators.csrf import csrf_exempt
class IdType(SimpleModel):
__type_name__ = "IdType"
__namespace__ = 'spyne.examples.hello'
__extends__ = Unicode
class Attributes(Unicode.Attributes):
out_type = 'TxnIdType'
class HelloWorldService(ServiceBase):
@rpc(IdType, Integer, _returns=Iterable(Unicode))
def say_hello(ctx, TxnIdType, times):
for i in range(times):
yield 'Hello, %s' % TxnIdType
application = Application([HelloWorldService],
tns='spyne.examples.hello',
interface = Wsdl11(),
in_protocol=Soap11(validator = 'lxml'),
# out_protocol=XmlDocument(validator='schema')
out_protocol=Soap11()
)
hello_app = csrf_exempt(DjangoApplication(application))
As you can see, the simpleType "IdType" does not show up. Is there a way to force Spyne to reflect these tags? Currently our output WSDL does not pass the required validation since it does not recognize the custom simpleTypes.
Hello,
We are trying to build a SOAP app with Django + Spyne building specific required endpoints. The exposed WSDL has to precisely match a predetermined XML file, including the custom simpleType definitions. We're currently failing to show the simple type definitions on our WSDL, everything else matches up precisely.
A simple example is the following hello world app:
Which yields the following WSDL:
As you can see, the simpleType "IdType" does not show up. Is there a way to force Spyne to reflect these tags? Currently our output WSDL does not pass the required validation since it does not recognize the custom simpleTypes.
Our expected output is the following:
Any help will be greatly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: