Skip to content

Develop#4

Open
juliomenendez wants to merge 30 commits intomasterfrom
develop
Open

Develop#4
juliomenendez wants to merge 30 commits intomasterfrom
develop

Conversation

@juliomenendez
Copy link

No description provided.

Julio C. Menendez and others added 30 commits May 30, 2013 14:16
Initial code of the package
Disclaimer: THIS IS A HACK (but it does as intended)
- Made it work by monkey-patching  no-op method `replyfilter` of the
`suds.bindings.binding.Binding` class.
- The monkey-patch version tries to parse the reply string, as Suds would.
- If no SAX-parsing exception is raised, return the string untouched.
- If a `SAXParseException` is raised, detect the payload boundaries using RegEx
  and use those payloads to construct MIME Messages and extract the the payload
  content.
- It's assumed the first payload is the XML response, so this XML is parsed
  (using lxml) and the "return" node's text is replaced with the second
  payload's content.
- The lxml parser is instantiated with every flag available that could
  transform the XML. When called with the default parser, some namespaces and
  prefixes where replaced.
- The resulting XML (after replacing the text of the result node) is serialized
  as a string and then returned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants