Questions tagged [spyne]

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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
17 views

Spyne - How to return xsd:choice types from function

I am using spyne to try and replicate the following WSDL: <xsd:element name="getDeviceDescriptionResponse"> <xsd:annotation> <...
0 votes
1 answer
108 views

python / spyne SOAP service - how to properly return an empty list?

related to: Flask 2.2.2 spyne 2.14.0 zeep 4.2.0 I am building a SOAP service using spyne. This service simulates the SOAP API ...
0 votes
2 answers
35 views

Spyne/Python/Soap. Add xsi:type to AnyDict

Im using Spyne & I try to add xsi:type="xsd:string" to my AnyDict result in response . Now i have this one: <soap11env:Envelope xmlns:soap11env="http://schemas.xmlsoap.org/soap/...
  • 3
0 votes
1 answer
72 views

Accepting 2 complex type arguments in Spyne vs Core WCF

I need to create a SOAP service which needs to be consumed by a third-party application to accomplish a task (callback). The below is the C# interface they've specified in their documentation and I ...
0 votes
2 answers
37 views

spyne How to get a list of soap action names?

I have two soap applications implementing different, soap actions which I want to route accordingly. How can I get the listing of the soap actions available in my spyne service? Is it available ...
0 votes
0 answers
13 views

Do you know, if there is a wsgi dataflow documentation for spyne?

I am looking for documentation on spyne WSGI support i.e. which objects were created in which order? Also, I used events.py example from the repository to test the events but wsgi_call does not fire. ...
-1 votes
1 answer
56 views

spyne with DispatcherMiddleware modifying request header

My application is getting messages from different clients and sending information to different flask and spyne servers. In some cases method in ctx.method_request_string is different than the method ...
0 votes
0 answers
95 views

How to: Spyne authentication?

I don't understand how to setup the user and password for authentication of my soap server. I found this example: import logging import random import sys # bcrypt seems to be among the latest ...
0 votes
0 answers
56 views

Spyne soap service returning json output not xml

This is my service in spyne for integrating client server. It works well when i tested it in Postman, SoapUI and Boomerang(extension for soap request/response). It sends and gets xml format. But ...
-1 votes
2 answers
218 views

how can I change django application server port number in spyne

I am trying to run the spyne Django soap server project on my computer but I can't run the project because the default port number which is 8000, is already in use so I want to change the port number ...
  • 55
1 vote
1 answer
302 views

How can I create a basic Soap server with spyne in django

I want to create a server which uses Django and make and take response as SOAP, so I try to use spyne for this reason but I can't run the given code class HelloWorldService(ServiceBase): @rpc(...
  • 55
0 votes
1 answer
87 views

I could not return soap response

I need to write a soap service which gets soap request and return soap response. I could handle sending soap request with zeep client library, everythin correct. But i couldnt send any soap response ...
user avatar
0 votes
1 answer
54 views

Unable to use ByteArray value received

I'm developing a soap web server with spyne. I've defined the following method inside a Service class: @rpc(String, String, String, String, String, DateTime, String, String, String, Integer32,...
0 votes
1 answer
117 views

problem running spyne with uwsgi , unable to find "application" callable

Good morning everyone, I have problems with soap/spyne with uwsgi server This is a semplification of my code : server.py soap_namespace = 'somenamespace' class XmlReturn(ComplexModel): status = ...
  • 77
0 votes
1 answer
105 views

Spyne - GET with multiple paths instead of parameters for the query

I'm trying to create a service to stream some files to clients from the server. However, instead of a URL like this: $ curl http://localhost:8000/get_file?path=file_name the client requests the file ...
  • 3,697
0 votes
1 answer
151 views

Spyne - Multiple services with multiple target namespaces, returns 404 with WsgiMounter

I have two services that are part of one application, Hello and Auth, and each has its own target namespace, as such: from spyne import ( Application, ServiceBase, rpc, Unicode, ) from spyne....
  • 3,697
0 votes
2 answers
444 views

xsi:type attribute does not resolve to a type definition

Do you guys have any idea how to fix it? I've tried to pass the type_name as Lead, but It didn't work either. xmlns:soap11env="http://schemas.xmlsoap.org/soap/envelope/">soap11env:...
0 votes
1 answer
192 views

Spyne - Using nested classes for an Array of ComplexModel

With regards to Spyne Models and Native Python Types, let's assume I have two models, Company and Employee: # server.py from spyne import ( Iterable, ComplexModel, Unicode, Integer, ) class ...
  • 3,697
0 votes
1 answer
70 views

How to validate multiref with spyne?

I need to validate a multiRef document using spyne This is the request send to spyne SOAP server <?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv=&...
0 votes
1 answer
169 views

add xsi:type in SOAP python spyne xml response

I am using example/complextype.py script provided in spyne official repo and I got the following reponse: --------------- RESPONSE ------------------------ <xml version='1.0' encoding='UTF-8'?>...
0 votes
1 answer
146 views

Spyne, Django change WSDL url

I am using django behind nginx reverse proxy and django sees the server url different than what it actually is hosted on like: Django: http://webserver.com Nginx: https://webserver.com When I try to ...
0 votes
1 answer
517 views

Exposing simple types on WSDL with Spyne

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 ...
  • 1
0 votes
1 answer
219 views

How to post xml data to soap service and process properly via spyne Python?

I want to get xml body: <root> <row> <param1>value1</param1> <param2>value2</param2> </row> <row> <param1>value3</param1> <param2>...
  • 11
0 votes
1 answer
216 views

ONVIF - GetServices with Capabilities does not return the capabilities of each service

I need help to define correctly the tds:Service class definition to be able to return the Capabilities of each service (Device, Media, Events). class ServiceT(DeviceComplexModel): __type_name__ = &...
  • 1
0 votes
1 answer
225 views

ONVIF Media.WSDL - GetServiceCapabilities fails

I need help with defining the "Capabilities" class so it would pass the Device Tool Test tests. STEP 5 - Get Media Service capabilities StepStart: 2022-01-19T07:35:14.1804753Z ...
  • 1
0 votes
1 answer
132 views

Spyne request debug

i have a spyne server, and often i have to debug weird calls behavior. I am using eclipse pyDev to develop end debug. The main difficulty is to know the XML content the other part posted, which i have ...
  • 47
0 votes
1 answer
92 views

remove outertag from spyne wsdl input and output

I am using spyne for creating my webservice. #urls.py urlpatterns = [ url( r'^InventoryService.wsdl', DjangoView.as_view( name="InventoryService", ...
  • 1,739
2 votes
1 answer
1k views

How can I built a soap server from WSDL file?

I'm trying to create a soap server from WSDL file. I'm using Python 3 and Spyne for generate it. This server need to be specific, because the client already exists. I need that my WSDL request looks ...
2 votes
1 answer
4k views

SOAP server in flask python3

the spyne lib can create wsdlserver, the wsdl example code: from spyne.application import Application from spyne.decorator import rpc from spyne import ServiceBase, String from spyne.protocol.soap ...
  • 347
0 votes
1 answer
183 views

How to use Spyne+Django with parameters on url?

on django urls.py url(r'soap/<str:user_id>/', DjangoView.as_view(application=provider)), on views.py @ rpc(_returns=AnyDict) def super_test_dict(self, one, two): user_id = 1 #here need ...
0 votes
1 answer
108 views

Spyne+Django ValueError have conflicting name using

I trying to use spyne to generate a SOAP server, but have an error. Spyne: ValueError: classes <class CHILD'> and <class 'CHILD'> have conflicting name; the types.py file is: class PARENT(...
0 votes
1 answer
280 views

Define SOAP client with Spyne that does not have a return message

I'm starting to implement a web service using Spyne. So far the generated WSDL looks good to the consuming client (either the machine client and the human client). The only thing is they (the human ...
  • 481
1 vote
1 answer
253 views

Does Spyne (python web service framework) support multiple threads? If not, is there a way to do using the Python Thread Library?

Due to interoperability, I need to deploy an application as a web service. I'm using Spyne (http://spyne.io/) to do that, a python framework for ws. So far so good. However, the service will receive ...
1 vote
1 answer
439 views

Best approach for adding option to bypass ComplexType wrapping of multi-parameter methods

We've recently started to use Spyne and it seems very powerful. In our case, we need to replicate a legacy SOAP API that we're substituting. In order to ensure compatibility with the current clients, ...
  • 125
2 votes
0 answers
64 views

Python - Is there any swagger for Spyne RPC toolkit?

I have been provided with a project where the API is written with spyne. Now I have to implement a swagger UI (if there is any) for this project. I have done my research but couldn't find any. Is it ...
1 vote
1 answer
29 views

Spyne: Integer Validation how can I set minimum digit limit?

I want to add validation for an Integer, that its minimum digit value is 5 and maximum digit value is 20 For Integer I have set following validations Integer(min_occurs=1, gt=9999, max_str_len=20, ...
  • 154
0 votes
1 answer
91 views

spyne - generating xsd for requests that does not require explicit statement of namespace for each input parameter

At present, my Spyne-based WSGI application generates XSDs for requests like the following: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:aso="asoapns"> &...
2 votes
1 answer
633 views

In Python got many issues with Spyne

Well, here's my Python code: #!/usr/bin/env python from spyne import Application, rpc, ServiceBase, Unicode from lxml import etree from spyne.protocol.soap import Soap11 from spyne.server.wsgi import ...
  • 133
1 vote
0 answers
382 views

Python simple spyne SOAP web service slow response

I have a created a very simple SOAP wsgi webserver in Python using spyne, which only has a returnint() service: from spyne.protocol.soap import Soap11 from spyne.server.wsgi import WsgiApplication ...
  • 879
2 votes
1 answer
382 views

How to override call_wrapper method of Spyne in Django 1.9?

I am using Django 1.9 to expose SOAP 1.1 API with Spyne version 2.12.16 I need to implement logging for every request XML and response XML in my platform. Django urls.py is url(r'^your_data/', ...
0 votes
1 answer
51 views

get_xml_as_object function not working with polymorphism - spyne 2.13.12 alpha0

A spyne error is returned when loading polymorphic object in spyne 2.13.12 alpha0. Could you please have a look at the following example and indicate which function should be used to load an object ...
2 votes
1 answer
621 views

Print out entire SOAP request in python spyne server

I have a SOAP server which is written using spyne. Here is the code: class myService(ServiceBase): @rpc(Integer, String, _returns=String) def my_method(ctx): sys.stdout.write("...
0 votes
0 answers
318 views

spyne + twisted host b'localhost'

Following this tutorial I converted the Unicode to String which has worked fine when following the wsgi tutorial. For some background I am hosting this in a docker container and exposing the port ...
0 votes
1 answer
133 views

get_object_as_xml not working with polymorphism

I would like to export object as xml string with spyne. It works well using function named 'get_object_as_xml' but it does not take polymorphism into account as you can see in the following example. ...
0 votes
1 answer
131 views

How to get an array in the object on the client side?

I would like to get an array in the object on the client side, but instead I need to access dictionary like this: response.BODY["string"] Preferred solution would be: response.BODY For code ...
  • 43
3 votes
2 answers
522 views

Requested resource '{spyne.examples.django}' not found

I am trying to develop a soap service in Django using Spyne. I've cloned spyne for app 'Hello_world' in Django application, but I get an error. Could anyone help me with it please? My codes is ...
0 votes
1 answer
250 views

Using Spyne, trying to condense the multiple namespaces generated to a single namespace in a SOAP request

I have the below SOAP request generated by SOAPUI using ComplexModel approach of Spyne request. <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ava="...
  • 45
0 votes
1 answer
210 views

How can I secure a Spyne web service with SSL?

I'm trying to get a SOAP web service set up with Spyne. So far, so good. I have a web service,but not I need to secure the data in-flight with SSL. Is there a way to attach a certificate to the ...
  • 751
1 vote
1 answer
559 views

Using spyne, trying to produce a specific SOAP response with a XML attribute and a string value in the same element

Using spyne to process and generate SOAP request/response. For a specific SOAP response, need to generate like <SetSpecial tag="Monday">123</SetSpecial> <SetSpecial tag="Tuesday">...
  • 45
0 votes
1 answer
96 views

Preservice a state in python spyne (like a db connection)

I am using python v3.5 with the package spyne 2.13 running on a gunicorn server v19.9 I wrote a small SOAP Webservice with python spyne (working well). It takes a string and enqueues it to rabbitmq. ...
  • 1,430

1
2 3 4 5