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.
 
 
 

125 lines
5.4 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. BIND_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"
  28. class XMLNS:
  29. BASE = "http://www.w3.org/2000/xmlns/"
  30. XML = "http://www.w3.org/XML/1998/namespace"
  31. HTML = "http://www.w3.org/TR/REC-html40"
  32. class DSIG:
  33. BASE = "http://www.w3.org/2000/09/xmldsig#"
  34. C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
  35. C14N_COMM = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315#WithComments"
  36. C14N_EXCL = "http://www.w3.org/2001/10/xml-exc-c14n#"
  37. DIGEST_MD2 = "http://www.w3.org/2000/09/xmldsig#md2"
  38. DIGEST_MD5 = "http://www.w3.org/2000/09/xmldsig#md5"
  39. DIGEST_SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
  40. ENC_BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"
  41. ENVELOPED = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
  42. HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
  43. SIG_DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
  44. SIG_RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
  45. XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"
  46. XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"
  47. class ENCRYPTION:
  48. BASE = "http://www.w3.org/2001/04/xmlenc#"
  49. BLOCK_3DES = "http://www.w3.org/2001/04/xmlenc#des-cbc"
  50. BLOCK_AES128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
  51. BLOCK_AES192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
  52. BLOCK_AES256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
  53. DIGEST_RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"
  54. DIGEST_SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
  55. DIGEST_SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"
  56. KA_DH = "http://www.w3.org/2001/04/xmlenc#dh"
  57. KT_RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
  58. KT_RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
  59. STREAM_ARCFOUR = "http://www.w3.org/2001/04/xmlenc#arcfour"
  60. WRAP_3DES = "http://www.w3.org/2001/04/xmlenc#kw-3des"
  61. WRAP_AES128 = "http://www.w3.org/2001/04/xmlenc#kw-aes128"
  62. WRAP_AES192 = "http://www.w3.org/2001/04/xmlenc#kw-aes192"
  63. WRAP_AES256 = "http://www.w3.org/2001/04/xmlenc#kw-aes256"
  64. class OASIS:
  65. '''URLs for Oasis specifications
  66. '''
  67. WSSE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
  68. UTILITY = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
  69. LIFETIME = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
  70. PROPERTIES = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
  71. BASENOTIFICATION = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
  72. class WSSE:
  73. BASE = "http://schemas.xmlsoap.org/ws/2002/04/secext"
  74. TRUST = "http://schemas.xmlsoap.org/ws/2004/04/trust"
  75. class WSU:
  76. BASE = "http://schemas.xmlsoap.org/ws/2002/04/utility"
  77. UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
  78. class WSR:
  79. PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
  80. LIFETIME = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
  81. class WSA200408:
  82. ADDRESS = "http://schemas.xmlsoap.org/ws/2004/08/addressing"
  83. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  84. FAULT = "%s/fault" %ADDRESS
  85. WSA = WSA200408
  86. class WSA200403:
  87. ADDRESS = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
  88. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  89. FAULT = "%s/fault" %ADDRESS
  90. class WSA200303:
  91. ADDRESS = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
  92. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  93. FAULT = None
  94. class WSP:
  95. POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"
  96. class BEA:
  97. SECCONV = "http://schemas.xmlsoap.org/ws/2004/04/sc"
  98. class GLOBUS:
  99. SECCONV = "http://wsrf.globus.org/core/2004/07/security/secconv"
  100. CORE = "http://www.globus.org/namespaces/2004/06/core"
  101. SIG = "http://www.globus.org/2002/04/xmlenc#gssapi-sign"
  102. ZSI_SCHEMA_URI = 'http://www.zolera.com/schemas/ZSI/'