1

Problem

I'm testing a wsdl application with a remote server, so I can't have any influence on the requesting mechanism.

While testing with it, I get this log messages.

DEBUG:spyne.protocol.soap.soap11:ValueError: Deserializing from unicode strings
    with encoding declaration is not supported by lxml.
DEBUG:spyne.protocol.xml:Validated ? False
40.50.60.70 - - [14/Jul/2016 16:58:42] "POST /?WSDL HTTP/1.1" 500 480

So the problem seems to be, that my remote server doing it's requests in a utf-8 encoded string, but I'm not able to reproduce it on my local machine. There I'm doing this with curl, which has a charset=utf-8 encoding in it's header and a input xml, wich has encoding='UTF-8' in it's`-tag too.

$ curl -X POST -H "Content-Type: text/xml; charset=utf-8" -d @request.xml
    http://localhost:8000 > response.xml

Approaches

I tried to set an event_listener at the process which builds the wsdl, to maybe get a chance to manipulate the input string with ctx.in_string or something else.

MyService.event_manager.add_listener('wsdl_document_built', _on_wsdl_document_built)
MyService.event_manager.add_listener('document_built', _on_document_built)

application.event_manager.add_listener('wsdl_document_built', _on_wsdl_document_built)
application.event_manager.add_listener('document_built', _on_document_built)

But there was no execution of my added functions.

Also i searched unseccessful the docs for a type of configuration, to pre decode it.

So my question is how to force some kind of encoding of the incoming request xml?

0x00F
  • 50
  • 7
  • First, this has nothing to do with WSDL events. Second, this looks like a bug, if you could provide me with a test case I can work on, I can fix it. – Burak Arslan Jul 18 '16 at 11:42
  • Ok, I managed that the request gets validated correctly, but the encoding error remains. Isn't this normal behavior now? You still want a test case? EDIT: I can open an issue on github?! – 0x00F Jul 19 '16 at 13:02
  • Yes, if you can come up with a test case that reproduces your error I could fix it. – Burak Arslan Jul 20 '16 at 06:11
  • OK, here is the test case https://github.com/arskom/spyne/issues/503 – 0x00F Jul 20 '16 at 11:13

0 Answers0