0

I am using Spyne to provide SOAP interface to my backend, but a need one or more custom views accessible on certain URLS. For example to show some statistics in HTML.

How do i do that?

warvariuc
  • 57,116
  • 41
  • 173
  • 227

1 Answers1

1

Please have a look at the multiple protocols example here: https://github.com/arskom/spyne/tree/master/examples/multiple_protocols

If you want to return raw data via Http, you must set your output protocol to HttpRpc, your output type in your service to ByteArray or String and ctx.transport.mime_type to whatever type you're returning

Burak Arslan
  • 7,671
  • 2
  • 15
  • 24
  • Looks like this won't work without `werkzeug` :( Additional dependency for me. Anyway thank you for the response. – warvariuc Jul 19 '13 at 08:15
  • werkzeug is needed only for url routing, which is only used in ``DynProtService``. Other examples don't need werkzeug at all. – Burak Arslan Jul 20 '13 at 11:16