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.
 
 
 

112 lines
4.9 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. DSIG.C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
  7. except:
  8. class SOAP:
  9. ENV = "http://schemas.xmlsoap.org/soap/envelope/"
  10. ENC = "http://schemas.xmlsoap.org/soap/encoding/"
  11. ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"
  12. class SCHEMA:
  13. XSD1 = "http://www.w3.org/1999/XMLSchema"
  14. XSD2 = "http://www.w3.org/2000/10/XMLSchema"
  15. XSD3 = "http://www.w3.org/2001/XMLSchema"
  16. XSD_LIST = [ XSD1, XSD2, XSD3 ]
  17. XSI1 = "http://www.w3.org/1999/XMLSchema-instance"
  18. XSI2 = "http://www.w3.org/2000/10/XMLSchema-instance"
  19. XSI3 = "http://www.w3.org/2001/XMLSchema-instance"
  20. XSI_LIST = [ XSI1, XSI2, XSI3 ]
  21. BASE = XSD3
  22. class WSDL:
  23. BASE = "http://schemas.xmlsoap.org/wsdl/"
  24. BIND_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"
  25. BIND_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"
  26. BIND_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"
  27. class XMLNS:
  28. BASE = "http://www.w3.org/2000/xmlns/"
  29. XML = "http://www.w3.org/XML/1998/namespace"
  30. HTML = "http://www.w3.org/TR/REC-html40"
  31. class DSIG:
  32. BASE = "http://www.w3.org/2000/09/xmldsig#"
  33. C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
  34. C14N_COMM = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315#WithComments"
  35. C14N_EXCL = "http://www.w3.org/2001/10/xml-exc-c14n#"
  36. DIGEST_MD2 = "http://www.w3.org/2000/09/xmldsig#md2"
  37. DIGEST_MD5 = "http://www.w3.org/2000/09/xmldsig#md5"
  38. DIGEST_SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
  39. ENC_BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"
  40. ENVELOPED = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
  41. HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  42. SIG_DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  43. SIG_RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  44. XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"
  45. XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"
  46. class ENCRYPTION:
  47. BASE = "http://www.w3.org/2001/04/xmlenc#"
  48. BLOCK_3DES = "http://www.w3.org/2001/04/xmlenc#des-cbc"
  49. BLOCK_AES128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  50. BLOCK_AES192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  51. BLOCK_AES256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
  52. DIGEST_RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"
  53. DIGEST_SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
  54. DIGEST_SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"
  55. KA_DH = "http://www.w3.org/2001/04/xmlenc#dh"
  56. KT_RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  57. KT_RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  58. STREAM_ARCFOUR = "http://www.w3.org/2001/04/xmlenc#arcfour"
  59. WRAP_3DES = "http://www.w3.org/2001/04/xmlenc#kw-3des"
  60. WRAP_AES128 = "http://www.w3.org/2001/04/xmlenc#kw-aes128"
  61. WRAP_AES192 = "http://www.w3.org/2001/04/xmlenc#kw-aes192"
  62. WRAP_AES256 = "http://www.w3.org/2001/04/xmlenc#kw-aes256"
  63. class OASIS:
  64. '''URLs for Oasis specifications
  65. '''
  66. WSSE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
  67. UTILITY = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  68. LIFETIME = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
  69. class WSSE:
  70. BASE = "http://schemas.xmlsoap.org/ws/2002/04/secext"
  71. TRUST = "http://schemas.xmlsoap.org/ws/2004/04/trust"
  72. class WSU:
  73. BASE = "http://schemas.xmlsoap.org/ws/2002/04/utility"
  74. UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
  75. class WSR:
  76. PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
  77. LIFETIME = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
  78. class WSA:
  79. ADDRESS = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
  80. ADDRESS2004 = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
  81. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  82. ANONYMOUS2004 = "%s/role/anonymous" %ADDRESS2004
  83. FAULT = "http://schemas.xmlsoap.org/ws/2004/03/addressing/fault"
  84. class WSP:
  85. POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"
  86. class BEA:
  87. SECCONV = "http://schemas.xmlsoap.org/ws/2004/04/sc"
  88. class GLOBUS:
  89. SECCONV = "http://wsrf.globus.org/core/2004/07/security/secconv"
  90. CORE = "http://www.globus.org/namespaces/2004/06/core"
  91. SIG = "http://www.globus.org/2002/04/xmlenc#gssapi-sign"