Spyne is a Python RPC toolkit that makes it easy to expose services that have a well-defined API using multiple protocols and transports. Spyne currently supports a subset of both Xml Schema 1.0 and WSDL 1.1 interface description documents, various Http implementations and ZeroMQ as transports, and SOAP 1.1, HttpRpc, Xml, Json, MessagePack and Yaml standards as protocols. The transports can be used in both a client or server setting.
Questions tagged [spyne]
211 questions
0
votes
2 answers
How do I default optional fields in spyne?
Here is some Spyne/SOAP code where I'm returning one or two strings. Is there a way to avoid having to set string2 to None to indicate that it's not present?
class TestResult(ComplexModel):
"""
"""
string1 = Unicode
string2 =…

Paul D Smith
- 639
- 5
- 16
0
votes
2 answers
Why does Spyne complex result have both Response and Result levels?
I'm trying to return a Complex result from a spyne/SOAP/HTTP application but I'm seeing the expected 'CommandResponse' level but also an unexpected 'CommandResult' level (in the XML) before my data starts.
I've not create a 'CommandResult' object…

Papadeltasierra
- 233
- 1
- 9
0
votes
2 answers
How do you @rpc _returns polymorphic types in spyne?
Edit
Example,
class A(ComplexModel):
Id = Unicode
class B(ComplexModel):
__extends__ = A
Name = Unicode
@rpc(String, _returns=A)
def hello(self, name):
ret = B()
B.Id = '123'
B.Name = name
return ret
How do you handle…

blakev
- 4,154
- 2
- 32
- 52
0
votes
1 answer
SOAP webservice with spyne, django and apache
I have a django based website deployed with apache and mod_wsgi.
I need to develop a SOAP based webservice and to host it with my django project, using the same port (80).
So I've read about…

user3599803
- 6,435
- 17
- 69
- 130
0
votes
2 answers
Using Python Spyne (RPC) is there a way to return a native python list instead of the fancy Array or Iterable?
Both the Iterable and Array types seem to have a native list hidden away in them, but I find myself always doing things like:
myList = service.fetchRemoteList()[0][1]
Where fetchRemoteList() _returns=Iterable(String)
I don't want to have to put…

Jonathan
- 6,741
- 7
- 52
- 69
0
votes
1 answer
Wrap function parameters complexType in an element
I am trying to implement an existing webservice with Spyne.
I have a function that takes two parameters, for which the WSDL should look like this:
…

qvdb
- 3
- 1
0
votes
1 answer
schema validation error with spyne and soappy
I'm using Spyne to create simple webservie, and when i call that sample service i get following error :
faultType:

Asif
- 479
- 2
- 6
- 12
0
votes
2 answers
How to add attributes all the to XMLElements in Spyne Array
I am using spyne Array to transform a JSON list and I need to add the "id" attribute to the "referral" parent node in the final XML.
This is the final XML I am expecting:
…

vidyarani-dg
- 13
- 1
- 4
0
votes
1 answer
Spyne fails with XMLSchemaParseError when building a SOAP API with multiple namespaces
I am implementing an existing WSDL that uses separate namespaces for messages and types.

Danielle Madeley
- 2,616
- 1
- 19
- 26
0
votes
1 answer
How to use exclude_properties and include_properties to exclude/include SQLAlchemy model attributes from corresponding Spyne model?
I have model declared as:
class SAProduct(Base):
sku = Column(PRODUCT_SKU_TYPE, primary_key=True)
i_want_to_hide = Column(String(20), nullable=False)
name = Column(Unicode(255), nullable=True)
@property
def my_property(self):
…

Dmitry Mugtasimov
- 3,858
- 2
- 18
- 26
0
votes
1 answer
The encodingStyle attribute is not allowed in spyne
I try to figure out how to build a soap service with spyne to this kind of request:

user3853233
- 3
- 1
0
votes
0 answers
Restrict spyne SOAP service with oauth2_provider
I need to restrict some of my SOAP method so they can only be accessible with an Access Token.
My SOAP service is running with Spyne and my OAuth2 provider comes from django-oauth2-toolkit.
from django.contrib.auth.decorators import…

Quentin Hayot
- 7,786
- 6
- 45
- 62
0
votes
1 answer
Spyne: How to decode POST into JSON using HttpRpc
I am trying to build a REST application using sypne. I want to receive a JSON document (but not with with the method called as the name of the object. I give en example to clarify:
I make a POST to the URL http://localhost/root with the following…

Javier
- 49
- 6
0
votes
1 answer
How to do flat array of elements in spyne?
How does one write a request handler for Spyne that handles a SOAP request like this:
foo
bar
...
I have tried…

anttikoo
- 785
- 8
- 20
0
votes
1 answer
Wrapping array of elements in spyne
I'm trying to construct a SOAP service with Spyne that has method addUsers, which takes a single argument (users - exactly one instance) provided in such structure:
Jake
123
…

anttikoo
- 785
- 8
- 20