1 # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
3 # This software is subject to the provisions of the Zope Public License,
4 # Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
5 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
6 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
7 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
8 # FOR A PARTICULAR PURPOSE.
9 """Namespace module, so you don't need PyXML
14 from xml.ns import SOAP, SCHEMA, WSDL, XMLNS, DSIG, ENCRYPTION
15 DSIG.C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
19 ENV = "http://schemas.xmlsoap.org/soap/envelope/"
20 ENC = "http://schemas.xmlsoap.org/soap/encoding/"
21 ACTOR_NEXT = "http://schemas.xmlsoap.org/soap/actor/next"
24 XSD1 = "http://www.w3.org/1999/XMLSchema"
25 XSD2 = "http://www.w3.org/2000/10/XMLSchema"
26 XSD3 = "http://www.w3.org/2001/XMLSchema"
27 XSD_LIST = [ XSD1, XSD2, XSD3]
28 XSI1 = "http://www.w3.org/1999/XMLSchema-instance"
29 XSI2 = "http://www.w3.org/2000/10/XMLSchema-instance"
30 XSI3 = "http://www.w3.org/2001/XMLSchema-instance"
31 XSI_LIST = [ XSI1, XSI2, XSI3 ]
35 BASE = "http://schemas.xmlsoap.org/wsdl/"
36 BIND_HTTP = "http://schemas.xmlsoap.org/wsdl/http/"
37 BIND_MIME = "http://schemas.xmlsoap.org/wsdl/mime/"
38 BIND_SOAP = "http://schemas.xmlsoap.org/wsdl/soap/"
39 BIND_SOAP12 = "http://schemas.xmlsoap.org/wsdl/soap12/"
42 BASE = "http://www.w3.org/2000/xmlns/"
43 XML = "http://www.w3.org/XML/1998/namespace"
44 HTML = "http://www.w3.org/TR/REC-html40"
47 BASE = "http://www.w3.org/2000/09/xmldsig#"
48 C14N = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315"
49 C14N_COMM = "http://www.w3.org/TR/2000/CR-xml-c14n-20010315#WithComments"
50 C14N_EXCL = "http://www.w3.org/2001/10/xml-exc-c14n#"
51 DIGEST_MD2 = "http://www.w3.org/2000/09/xmldsig#md2"
52 DIGEST_MD5 = "http://www.w3.org/2000/09/xmldsig#md5"
53 DIGEST_SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
54 ENC_BASE64 = "http://www.w3.org/2000/09/xmldsig#base64"
55 ENVELOPED = "http://www.w3.org/2000/09/xmldsig#enveloped-signature"
56 HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
57 SIG_DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
58 SIG_RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
59 XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116"
60 XSLT = "http://www.w3.org/TR/1999/REC-xslt-19991116"
63 BASE = "http://www.w3.org/2001/04/xmlenc#"
64 BLOCK_3DES = "http://www.w3.org/2001/04/xmlenc#des-cbc"
65 BLOCK_AES128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc"
66 BLOCK_AES192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc"
67 BLOCK_AES256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc"
68 DIGEST_RIPEMD160 = "http://www.w3.org/2001/04/xmlenc#ripemd160"
69 DIGEST_SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256"
70 DIGEST_SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512"
71 KA_DH = "http://www.w3.org/2001/04/xmlenc#dh"
72 KT_RSA_1_5 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5"
73 KT_RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p"
74 STREAM_ARCFOUR = "http://www.w3.org/2001/04/xmlenc#arcfour"
75 WRAP_3DES = "http://www.w3.org/2001/04/xmlenc#kw-3des"
76 WRAP_AES128 = "http://www.w3.org/2001/04/xmlenc#kw-aes128"
77 WRAP_AES192 = "http://www.w3.org/2001/04/xmlenc#kw-aes192"
78 WRAP_AES256 = "http://www.w3.org/2001/04/xmlenc#kw-aes256"
82 '''OASIS WSRF Specifications Version 1.2
85 XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.xsd"
86 XSD_DRAFT4 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.xsd"
88 WSDL_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceLifetime-1.2-draft-01.wsdl"
89 WSDL_DRAFT4 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceLifetime-1.2-draft-04.wsdl"
91 WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT4)
92 XSD_LIST = (XSD_DRAFT1, XSD_DRAFT4)
95 XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.xsd"
96 XSD_DRAFT5 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.xsd"
98 WSDL_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-ResourceProperties-1.2-draft-01.wsdl"
99 WSDL_DRAFT5 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-ResourceProperties-1.2-draft-05.wsdl"
101 WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT5)
102 XSD_LIST = (XSD_DRAFT1, XSD_DRAFT5)
104 class BASENOTIFICATION:
105 XSD_DRAFT1 = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.xsd"
107 WSDL_DRAFT1 = "http://docs.oasis-open.org/wsn/2004/06/wsn-WS-BaseNotification-1.2-draft-01.wsdl"
109 WSDL_LIST = (WSDL_DRAFT1,)
110 XSD_LIST = (XSD_DRAFT1,)
113 XSD_DRAFT1 = "http://docs.oasis-open.org/wsrf/2004/06/wsrf-WS-BaseFaults-1.2-draft-01.xsd"
114 XSD_DRAFT3 = "http://docs.oasis-open.org/wsrf/2004/11/wsrf-WS-BaseFaults-1.2-draft-03.xsd"
116 #WSDL_LIST = (WSDL_DRAFT1, WSDL_DRAFT3)
117 XSD_LIST = (XSD_DRAFT1, XSD_DRAFT3)
120 WSRFLIST = (WSRF_V1_2,)
124 '''URLs for Oasis specifications
126 WSSE = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
127 UTILITY = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
130 Base64Binary = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
131 STRTransform = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0"
132 PKCS7 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#PKCS7"
133 X509 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509"
134 X509PKIPathv1 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509PKIPathv1"
135 X509v3SubjectKeyIdentifier = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3SubjectKeyIdentifier"
137 LIFETIME = WSRF_V1_2.LIFETIME.XSD_DRAFT1
138 PROPERTIES = WSRF_V1_2.PROPERTIES.XSD_DRAFT1
139 BASENOTIFICATION = WSRF_V1_2.BASENOTIFICATION.XSD_DRAFT1
140 BASEFAULTS = WSRF_V1_2.BASEFAULTS.XSD_DRAFT1
144 '''This name space is defined by AXIS and it is used for the TC in TCapache.py,
145 Map and file attachment (DataHandler)
147 AXIS_NS = "http://xml.apache.org/xml-soap"
151 BASE = "http://schemas.xmlsoap.org/ws/2004/04/trust"
152 ISSUE = "http://schemas.xmlsoap.org/ws/2004/04/trust/Issue"
155 BASE = "http://schemas.xmlsoap.org/ws/2002/04/secext"
160 BASE = "http://schemas.xmlsoap.org/ws/2002/04/utility"
161 UTILITY = "http://schemas.xmlsoap.org/ws/2002/07/utility"
165 PROPERTIES = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties"
166 LIFETIME = "http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceLifetime"
170 ADDRESS = "http://www.w3.org/2005/08/addressing"
171 ANONYMOUS = "%s/anonymous" %ADDRESS
172 FAULT = "%s/fault" %ADDRESS
175 ADDRESS = "http://schemas.xmlsoap.org/ws/2004/08/addressing"
176 ANONYMOUS = "%s/role/anonymous" %ADDRESS
177 FAULT = "%s/fault" %ADDRESS
180 ADDRESS = "http://schemas.xmlsoap.org/ws/2004/03/addressing"
181 ANONYMOUS = "%s/role/anonymous" %ADDRESS
182 FAULT = "%s/fault" %ADDRESS
185 ADDRESS = "http://schemas.xmlsoap.org/ws/2003/03/addressing"
186 ANONYMOUS = "%s/role/anonymous" %ADDRESS
191 WSA_LIST = (WSA200508, WSA200408, WSA200403, WSA200303)
194 """ Define ADDRESS attribute to be compatible with WSA* layout """
195 ADDRESS = property(lambda s: s)
197 WSAW200605 = _WSAW("http://www.w3.org/2006/05/addressing/wsdl")
199 WSAW_LIST = (WSAW200605,)
202 POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy"
205 SECCONV = "http://schemas.xmlsoap.org/ws/2004/04/sc"
206 SCTOKEN = "http://schemas.xmlsoap.org/ws/2004/04/security/sc/sct"
209 SECCONV = "http://wsrf.globus.org/core/2004/07/security/secconv"
210 CORE = "http://www.globus.org/namespaces/2004/06/core"
211 SIG = "http://www.globus.org/2002/04/xmlenc#gssapi-sign"
212 TOKEN = "http://www.globus.org/ws/2004/09/security/sc#GSSAPI_GSI_TOKEN"
214 ZSI_SCHEMA_URI = 'http://www.zolera.com/schemas/ZSI/'