A fork of https://github.com/Synerty/SOAPpy-py3 This is a working tree till fixes get imported upstream.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
1.4 KiB

  1. import sys
  2. sys.path.insert(1, "..")
  3. from SOAPpy import *
  4. detailed_fault = \
  5. """
  6. <?xml version="1.0" encoding="UTF-8"?>
  7. <SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.microsoft.com/soap/encoding/clr/1.0 http://schemas.xmlsoap.org/soap/encoding/" xmlns:a1="http://schemas.microsoft.com/clr/ns/System.Runtime.Serialization.Formatters">
  8. <SOAP-ENV:Body>
  9. <SOAP-ENV:Fault id="ref-1">
  10. <faultcode>soapenv:Server.generalException</faultcode>
  11. <faultstring>Exception thrown on Server</faultstring>
  12. <detail>
  13. <loginFailureFault href="#id0"/>
  14. <exceptionName xsi:type="xsd:string">...</exceptionName>
  15. </detail>
  16. </SOAP-ENV:Fault>
  17. <multiRef id="id0">
  18. <description xsi:type="xsd:string">Login failure (504):Unknown User</description>
  19. <module xsi:type="xsd:string"> ... </module>
  20. <timestamp xsi:type="xsd:string">...</timestamp>
  21. <faultcode xsi:type="xsd:string"> ...</faultcode>
  22. <parameter xsi:type="xsd:string"> ... </parameter>
  23. </multiRef>
  24. </SOAP-ENV:Body>
  25. </SOAP-ENV:Envelope>
  26. """
  27. z = parseSOAPRPC(detailed_fault.strip() )
  28. assert(z.__class__==faultType)
  29. assert(z.faultstring=="Exception thrown on Server")
  30. assert(z.detail.loginFailureFault.description=='Login failure (504):Unknown User')
  31. print "Success"