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.
 
 
 

93 lines
4.1 KiB

  1. #! /usr/bin/env python
  2. """Namespace module, so you don't need PyXML
  3. """
  4. try:
  5. from xml.ns import SOAP, SCHEMA, WSDL, XMLNS, DSIG, ENCRYPTION
  6. except:
  7. class SOAP:
  8. ENV = "http://schemas.xmlsoap.org/soap/envelope/"
  9. ENC = "http://schemas.xmlsoap.org/soap/encoding/"
  10. ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"
  11. class SCHEMA:
  12. XSD1 = "http://www.w3.org/1999/XMLSchema"
  13. XSD2 = "http://www.w3.org/2000/10/XMLSchema"
  14. XSD3 = "http://www.w3.org/2001/XMLSchema"
  15. XSD_LIST = [ XSD1, XSD2, XSD3 ]
  16. XSI1 = "http://www.w3.org/1999/XMLSchema-instance"
  17. XSI2 = "http://www.w3.org/2000/10/XMLSchema-instance"
  18. XSI3 = "http://www.w3.org/2001/XMLSchema-instance"
  19. XSI_LIST = [ XSI1, XSI2, XSI3 ]
  20. BASE = XSD3
  21. class WSDL:
  22. BASE = "http://schemas.xmlsoap.org/wsdl/"
  23. BIND_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"
  24. BIND_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"
  25. BIND_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"
  26. class XMLNS:
  27. BASE = "http://www.w3.org/2000/xmlns/"
  28. XML = "http://www.w3.org/XML/1998/namespace"
  29. HTML = "http://www.w3.org/TR/REC-html40"
  30. class DSIG:
  31. BASE = "http://www.w3.org/2000/09/xmldsig#"
  32. C14N = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315"
  33. C14N_COMM = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315#WithComments"
  34. C14N_EXCL = "http://www.w3.org/2001/10/xml-exc-c14n#"
  35. DIGEST_MD2 = "http://www.w3.org/2000/09/xmldsig#md2"
  36. DIGEST_MD5 = "http://www.w3.org/2000/09/xmldsig#md5"
  37. DIGEST_SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
  38. ENC_BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"
  39. ENVELOPED = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
  40. HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  41. SIG_DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  42. SIG_RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  43. XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"
  44. XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"
  45. class ENCRYPTION:
  46. BASE = "http://www.w3.org/2001/04/xmlenc#"
  47. BLOCK_3DES = "http://www.w3.org/2001/04/xmlenc#des-cbc"
  48. BLOCK_AES128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  49. BLOCK_AES192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  50. BLOCK_AES256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
  51. DIGEST_RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"
  52. DIGEST_SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
  53. DIGEST_SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"
  54. KA_DH = "http://www.w3.org/2001/04/xmlenc#dh"
  55. KT_RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  56. KT_RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  57. STREAM_ARCFOUR = "http://www.w3.org/2001/04/xmlenc#arcfour"
  58. WRAP_3DES = "http://www.w3.org/2001/04/xmlenc#kw-3des"
  59. WRAP_AES128 = "http://www.w3.org/2001/04/xmlenc#kw-aes128"
  60. WRAP_AES192 = "http://www.w3.org/2001/04/xmlenc#kw-aes192"
  61. WRAP_AES256 = "http://www.w3.org/2001/04/xmlenc#kw-aes256"
  62. class WSSE:
  63. BASE = "http://schemas.xmlsoap.org/ws/2002/04/secext"
  64. class WSU:
  65. BASE = "http://schemas.xmlsoap.org/ws/2002/04/utility"
  66. UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
  67. class WSR:
  68. PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
  69. LIFETIME = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
  70. class WSA:
  71. ADDRESS = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
  72. ADDRESS2004 = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
  73. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  74. ANONYMOUS2004 = "%s/role/anonymous" %ADDRESS2004
  75. FAULT = "http://schemas.xmlsoap.org/ws/2004/03/addressing/fault"
  76. class WSP:
  77. POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"