1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
#!/usr/bin/env python
#
# Generated Fri May 27 17:30:44 2011 by parse_xsd.py version 0.4.
#
import saml2
from saml2 import SamlBase
#import soapenv as S
NAMESPACE = 'urn:liberty:paos:2003-08'
class RequestType_(SamlBase):
"""The urn:liberty:paos:2003-08:RequestType element """
c_tag = 'RequestType'
c_namespace = NAMESPACE
c_children = SamlBase.c_children.copy()
c_attributes = SamlBase.c_attributes.copy()
c_child_order = SamlBase.c_child_order[:]
c_cardinality = SamlBase.c_cardinality.copy()
c_attributes['responseConsumerURL'] = ('response_consumer_url', 'anyURI', True)
c_attributes['service'] = ('service', 'anyURI', True)
c_attributes['messageID'] = ('message_id', 'None', False)
c_attributes['{http://schemas.xmlsoap.org/soap/envelope/}mustUnderstand'] = ('must_understand', 'None', True)
c_attributes['{http://schemas.xmlsoap.org/soap/envelope/}actor'] = ('actor', 'None', True)
def __init__(self,
response_consumer_url=None,
service=None,
message_id=None,
must_understand=None,
actor=None,
text=None,
extension_elements=None,
extension_attributes=None,
):
SamlBase.__init__(self,
text=text,
extension_elements=extension_elements,
extension_attributes=extension_attributes,
)
self.response_consumer_url=response_consumer_url
self.service=service
self.message_id=message_id
self.must_understand=must_understand
self.actor=actor
def request_type__from_string(xml_string):
return saml2.create_class_from_xml_string(RequestType_, xml_string)
class ResponseType_(SamlBase):
"""The urn:liberty:paos:2003-08:ResponseType element """
c_tag = 'ResponseType'
c_namespace = NAMESPACE
c_children = SamlBase.c_children.copy()
c_attributes = SamlBase.c_attributes.copy()
c_child_order = SamlBase.c_child_order[:]
c_cardinality = SamlBase.c_cardinality.copy()
c_attributes['refToMessageID'] = ('ref_to_message_id', 'None', False)
c_attributes['{http://schemas.xmlsoap.org/soap/envelope/}mustUnderstand'] = ('must_understand', 'None', True)
c_attributes['{http://schemas.xmlsoap.org/soap/envelope/}actor'] = ('actor', 'None', True)
def __init__(self,
ref_to_message_id=None,
must_understand=None,
actor=None,
text=None,
extension_elements=None,
extension_attributes=None,
):
SamlBase.__init__(self,
text=text,
extension_elements=extension_elements,
extension_attributes=extension_attributes,
)
self.ref_to_message_id=ref_to_message_id
self.must_understand=must_understand
self.actor=actor
def response_type__from_string(xml_string):
return saml2.create_class_from_xml_string(ResponseType_, xml_string)
class Request(RequestType_):
"""The urn:liberty:paos:2003-08:Request element """
c_tag = 'Request'
c_namespace = NAMESPACE
c_children = RequestType_.c_children.copy()
c_attributes = RequestType_.c_attributes.copy()
c_child_order = RequestType_.c_child_order[:]
c_cardinality = RequestType_.c_cardinality.copy()
def request_from_string(xml_string):
return saml2.create_class_from_xml_string(Request, xml_string)
class Response(ResponseType_):
"""The urn:liberty:paos:2003-08:Response element """
c_tag = 'Response'
c_namespace = NAMESPACE
c_children = ResponseType_.c_children.copy()
c_attributes = ResponseType_.c_attributes.copy()
c_child_order = ResponseType_.c_child_order[:]
c_cardinality = ResponseType_.c_cardinality.copy()
def response_from_string(xml_string):
return saml2.create_class_from_xml_string(Response, xml_string)
ELEMENT_FROM_STRING = {
Request.c_tag: request_from_string,
RequestType_.c_tag: request_type__from_string,
Response.c_tag: response_from_string,
ResponseType_.c_tag: response_type__from_string,
}
ELEMENT_BY_TAG = {
'Request': Request,
'RequestType': RequestType_,
'Response': Response,
'ResponseType': ResponseType_,
}
def factory(tag, **kwargs):
return ELEMENT_BY_TAG[tag](**kwargs)
|