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.
 
 
 

126 lines
5.5 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.xsd"
  71. BASENOTIFICATION = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
  72. BASEFAULTS = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
  73. class WSSE:
  74. BASE = "http://schemas.xmlsoap.org/ws/2002/04/secext"
  75. TRUST = "http://schemas.xmlsoap.org/ws/2004/04/trust"
  76. class WSU:
  77. BASE = "http://schemas.xmlsoap.org/ws/2002/04/utility"
  78. UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
  79. class WSR:
  80. PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
  81. LIFETIME = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
  82. class WSA200408:
  83. ADDRESS = "http://schemas.xmlsoap.org/ws/2004/08/addressing"
  84. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  85. FAULT = "%s/fault" %ADDRESS
  86. WSA = WSA200408
  87. class WSA200403:
  88. ADDRESS = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
  89. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  90. FAULT = "%s/fault" %ADDRESS
  91. class WSA200303:
  92. ADDRESS = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
  93. ANONYMOUS = "%s/role/anonymous" %ADDRESS
  94. FAULT = None
  95. class WSP:
  96. POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"
  97. class BEA:
  98. SECCONV = "http://schemas.xmlsoap.org/ws/2004/04/sc"
  99. class GLOBUS:
  100. SECCONV = "http://wsrf.globus.org/core/2004/07/security/secconv"
  101. CORE = "http://www.globus.org/namespaces/2004/06/core"
  102. SIG = "http://www.globus.org/2002/04/xmlenc#gssapi-sign"
  103. ZSI_SCHEMA_URI = 'http://www.zolera.com/schemas/ZSI/'