| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
# ====================================================================== |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com) |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# SOAP::Lite is free software; you can redistribute it |
|
6
|
|
|
|
|
|
|
# and/or modify it under the same terms as Perl itself. |
|
7
|
|
|
|
|
|
|
# |
|
8
|
|
|
|
|
|
|
# ====================================================================== |
|
9
|
|
|
|
|
|
|
package SOAP::Constants; |
|
10
|
25
|
|
|
25
|
|
149
|
use strict; |
|
|
25
|
|
|
|
|
52
|
|
|
|
25
|
|
|
|
|
982
|
|
|
11
|
25
|
|
|
25
|
|
174
|
use SOAP::Lite; |
|
|
25
|
|
|
|
|
57
|
|
|
|
25
|
|
|
|
|
1251
|
|
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
our $VERSION = 1.11; |
|
14
|
|
|
|
|
|
|
|
|
15
|
25
|
|
|
25
|
|
212
|
use constant URI_1999_SCHEMA_XSD => "http://www.w3.org/1999/XMLSchema"; |
|
|
25
|
|
|
|
|
49
|
|
|
|
25
|
|
|
|
|
1793
|
|
|
16
|
25
|
|
|
25
|
|
137
|
use constant URI_1999_SCHEMA_XSI => "http://www.w3.org/1999/XMLSchema-instance"; |
|
|
25
|
|
|
|
|
60
|
|
|
|
25
|
|
|
|
|
1250
|
|
|
17
|
25
|
|
|
25
|
|
141
|
use constant URI_2000_SCHEMA_XSD => "http://www.w3.org/2000/10/XMLSchema"; |
|
|
25
|
|
|
|
|
44
|
|
|
|
25
|
|
|
|
|
1379
|
|
|
18
|
25
|
|
|
25
|
|
127
|
use constant URI_2000_SCHEMA_XSI => "http://www.w3.org/2000/10/XMLSchema-instance"; |
|
|
25
|
|
|
|
|
69
|
|
|
|
25
|
|
|
|
|
1249
|
|
|
19
|
25
|
|
|
25
|
|
131
|
use constant URI_2001_SCHEMA_XSD => "http://www.w3.org/2001/XMLSchema"; |
|
|
25
|
|
|
|
|
52
|
|
|
|
25
|
|
|
|
|
1158
|
|
|
20
|
25
|
|
|
25
|
|
123
|
use constant URI_2001_SCHEMA_XSI => "http://www.w3.org/2001/XMLSchema-instance"; |
|
|
25
|
|
|
|
|
44
|
|
|
|
25
|
|
|
|
|
1062
|
|
|
21
|
25
|
|
|
25
|
|
120
|
use constant URI_LITERAL_ENC => ""; |
|
|
25
|
|
|
|
|
55
|
|
|
|
25
|
|
|
|
|
1174
|
|
|
22
|
25
|
|
|
25
|
|
122
|
use constant URI_SOAP11_ENC => "http://schemas.xmlsoap.org/soap/encoding/"; |
|
|
25
|
|
|
|
|
49
|
|
|
|
25
|
|
|
|
|
1423
|
|
|
23
|
25
|
|
|
25
|
|
141
|
use constant URI_SOAP11_ENV => "http://schemas.xmlsoap.org/soap/envelope/"; |
|
|
25
|
|
|
|
|
87
|
|
|
|
25
|
|
|
|
|
7094
|
|
|
24
|
25
|
|
|
25
|
|
127
|
use constant URI_SOAP11_NEXT_ACTOR => "http://schemas.xmlsoap.org/soap/actor/next"; |
|
|
25
|
|
|
|
|
43
|
|
|
|
25
|
|
|
|
|
1101
|
|
|
25
|
25
|
|
|
25
|
|
123
|
use constant URI_SOAP12_ENC => "http://www.w3.org/2003/05/soap-encoding"; |
|
|
25
|
|
|
|
|
72
|
|
|
|
25
|
|
|
|
|
1027
|
|
|
26
|
25
|
|
|
25
|
|
121
|
use constant URI_SOAP12_ENV => "http://www.w3.org/2003/05/soap-envelope"; |
|
|
25
|
|
|
|
|
49
|
|
|
|
25
|
|
|
|
|
1134
|
|
|
27
|
25
|
|
|
25
|
|
126
|
use constant URI_SOAP12_NOENC => "http://www.w3.org/2003/05/soap-envelope/encoding/none"; |
|
|
25
|
|
|
|
|
62
|
|
|
|
25
|
|
|
|
|
1249
|
|
|
28
|
25
|
|
|
25
|
|
124
|
use constant URI_SOAP12_NEXT_ACTOR => "http://www.w3.org/2003/05/soap-envelope/role/next"; |
|
|
25
|
|
|
|
|
47
|
|
|
|
25
|
|
|
|
|
1141
|
|
|
29
|
|
|
|
|
|
|
|
|
30
|
25
|
|
|
25
|
|
134
|
use vars qw($NSMASK $ELMASK); |
|
|
25
|
|
|
|
|
51
|
|
|
|
25
|
|
|
|
|
2521
|
|
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
$NSMASK = '[a-zA-Z_:][\w.\-:]*'; |
|
33
|
|
|
|
|
|
|
$ELMASK = '^(?![xX][mM][lL])[a-zA-Z_][\w.\-]*$'; |
|
34
|
|
|
|
|
|
|
|
|
35
|
25
|
|
|
|
|
23624
|
use vars qw($NEXT_ACTOR $NS_ENV $NS_ENC $NS_APS |
|
36
|
|
|
|
|
|
|
$FAULT_CLIENT $FAULT_SERVER $FAULT_VERSION_MISMATCH |
|
37
|
|
|
|
|
|
|
$HTTP_ON_FAULT_CODE $HTTP_ON_SUCCESS_CODE $FAULT_MUST_UNDERSTAND |
|
38
|
|
|
|
|
|
|
$NS_XSI_ALL $NS_XSI_NILS %XML_SCHEMAS $DEFAULT_XML_SCHEMA |
|
39
|
|
|
|
|
|
|
$DEFAULT_HTTP_CONTENT_TYPE |
|
40
|
|
|
|
|
|
|
$SOAP_VERSION %SOAP_VERSIONS $WRONG_VERSION |
|
41
|
|
|
|
|
|
|
$NS_SL_HEADER $NS_SL_PERLTYPE $PREFIX_ENV $PREFIX_ENC |
|
42
|
|
|
|
|
|
|
$DO_NOT_USE_XML_PARSER $DO_NOT_CHECK_MUSTUNDERSTAND |
|
43
|
|
|
|
|
|
|
$DO_NOT_USE_CHARSET $DO_NOT_PROCESS_XML_IN_MIME |
|
44
|
|
|
|
|
|
|
$DO_NOT_USE_LWP_LENGTH_HACK $DO_NOT_CHECK_CONTENT_TYPE |
|
45
|
|
|
|
|
|
|
$MAX_CONTENT_SIZE $PATCH_HTTP_KEEPALIVE $DEFAULT_PACKAGER |
|
46
|
|
|
|
|
|
|
@SUPPORTED_ENCODING_STYLES $OBJS_BY_REF_KEEPALIVE |
|
47
|
|
|
|
|
|
|
$DEFAULT_CACHE_TTL |
|
48
|
|
|
|
|
|
|
%XML_SCHEMA_OF |
|
49
|
|
|
|
|
|
|
$HAS_ENCODE |
|
50
|
25
|
|
|
25
|
|
129
|
); |
|
|
25
|
|
|
|
|
39
|
|
|
51
|
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
$FAULT_CLIENT = 'Client'; |
|
53
|
|
|
|
|
|
|
$FAULT_SERVER = 'Server'; |
|
54
|
|
|
|
|
|
|
$FAULT_VERSION_MISMATCH = 'VersionMismatch'; |
|
55
|
|
|
|
|
|
|
$FAULT_MUST_UNDERSTAND = 'MustUnderstand'; |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
$HTTP_ON_SUCCESS_CODE = 200; # OK |
|
58
|
|
|
|
|
|
|
$HTTP_ON_FAULT_CODE = 500; # INTERNAL_SERVER_ERROR |
|
59
|
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
@SUPPORTED_ENCODING_STYLES = ( URI_LITERAL_ENC,URI_SOAP11_ENC,URI_SOAP12_ENC,URI_SOAP12_NOENC ); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
$WRONG_VERSION = 'Wrong SOAP version specified.'; |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
$SOAP_VERSION = '1.1'; |
|
65
|
|
|
|
|
|
|
%SOAP_VERSIONS = ( |
|
66
|
|
|
|
|
|
|
1.1 => { |
|
67
|
|
|
|
|
|
|
NEXT_ACTOR => URI_SOAP11_NEXT_ACTOR, |
|
68
|
|
|
|
|
|
|
NS_ENV => URI_SOAP11_ENV, |
|
69
|
|
|
|
|
|
|
NS_ENC => URI_SOAP11_ENC, |
|
70
|
|
|
|
|
|
|
DEFAULT_XML_SCHEMA => URI_2001_SCHEMA_XSD, |
|
71
|
|
|
|
|
|
|
DEFAULT_HTTP_CONTENT_TYPE => 'text/xml', |
|
72
|
|
|
|
|
|
|
}, |
|
73
|
|
|
|
|
|
|
1.2 => { |
|
74
|
|
|
|
|
|
|
NEXT_ACTOR => URI_SOAP12_NEXT_ACTOR, |
|
75
|
|
|
|
|
|
|
NS_ENV => URI_SOAP12_ENV, |
|
76
|
|
|
|
|
|
|
NS_ENC => URI_SOAP12_ENC, |
|
77
|
|
|
|
|
|
|
DEFAULT_XML_SCHEMA => URI_2001_SCHEMA_XSD, |
|
78
|
|
|
|
|
|
|
DEFAULT_HTTP_CONTENT_TYPE => 'application/soap+xml', |
|
79
|
|
|
|
|
|
|
}, |
|
80
|
|
|
|
|
|
|
); |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
# schema namespaces |
|
83
|
|
|
|
|
|
|
%XML_SCHEMAS = ( # The '()' is necessary to put constants in SCALAR form |
|
84
|
|
|
|
|
|
|
URI_1999_SCHEMA_XSD() => 'SOAP::XMLSchema1999', |
|
85
|
|
|
|
|
|
|
URI_2001_SCHEMA_XSD() => 'SOAP::XMLSchema2001', |
|
86
|
|
|
|
|
|
|
URI_SOAP11_ENC() => 'SOAP::XMLSchemaSOAP1_1', |
|
87
|
|
|
|
|
|
|
URI_SOAP12_ENC() => 'SOAP::XMLSchemaSOAP1_2', |
|
88
|
|
|
|
|
|
|
); |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
# schema namespaces |
|
91
|
|
|
|
|
|
|
%XML_SCHEMA_OF = ( # The '()' is necessary to put constants in SCALAR form |
|
92
|
|
|
|
|
|
|
URI_1999_SCHEMA_XSD() => 'XMLSchema1999', |
|
93
|
|
|
|
|
|
|
URI_2001_SCHEMA_XSD() => 'XMLSchema2001', |
|
94
|
|
|
|
|
|
|
URI_SOAP11_ENC() => 'XMLSchemaSOAP1_1', |
|
95
|
|
|
|
|
|
|
URI_SOAP12_ENC() => 'XMLSchemaSOAP1_2', |
|
96
|
|
|
|
|
|
|
); |
|
97
|
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
$NS_XSI_ALL = join join('|', map {"$_-instance"} grep {/XMLSchema/} keys %XML_SCHEMAS), '(?:', ')'; |
|
100
|
|
|
|
|
|
|
$NS_XSI_NILS = join join('|', map { my $class = $XML_SCHEMAS{$_} . '::Serializer'; "\{($_)-instance\}" . $class->nilValue |
|
101
|
|
|
|
|
|
|
} grep {/XMLSchema/} keys %XML_SCHEMAS), |
|
102
|
|
|
|
|
|
|
'(?:', ')'; |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
# ApacheSOAP namespaces |
|
105
|
|
|
|
|
|
|
$NS_APS = 'http://xml.apache.org/xml-soap'; |
|
106
|
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
# SOAP::Lite namespace |
|
108
|
|
|
|
|
|
|
$NS_SL_HEADER = 'http://namespaces.soaplite.com/header'; |
|
109
|
|
|
|
|
|
|
$NS_SL_PERLTYPE = 'http://namespaces.soaplite.com/perl'; |
|
110
|
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
# default prefixes |
|
112
|
|
|
|
|
|
|
$PREFIX_ENV = 'soap'; |
|
113
|
|
|
|
|
|
|
$PREFIX_ENC = 'soapenc'; |
|
114
|
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
# others |
|
116
|
|
|
|
|
|
|
$DO_NOT_USE_XML_PARSER = 0; |
|
117
|
|
|
|
|
|
|
$DO_NOT_CHECK_MUSTUNDERSTAND = 0; |
|
118
|
|
|
|
|
|
|
$DO_NOT_USE_CHARSET = 0; |
|
119
|
|
|
|
|
|
|
$DO_NOT_PROCESS_XML_IN_MIME = 0; |
|
120
|
|
|
|
|
|
|
$DO_NOT_USE_LWP_LENGTH_HACK = 0; |
|
121
|
|
|
|
|
|
|
$DO_NOT_CHECK_CONTENT_TYPE = 0; |
|
122
|
|
|
|
|
|
|
$PATCH_HTTP_KEEPALIVE = 1; |
|
123
|
|
|
|
|
|
|
$OBJS_BY_REF_KEEPALIVE = 600; # seconds |
|
124
|
|
|
|
|
|
|
|
|
125
|
|
|
|
|
|
|
# TODO - use default packager constant somewhere |
|
126
|
|
|
|
|
|
|
$DEFAULT_PACKAGER = "SOAP::Packager::MIME"; |
|
127
|
|
|
|
|
|
|
$DEFAULT_CACHE_TTL = 0; |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
$HAS_ENCODE = eval "require Encode; 1"; |
|
130
|
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
1; |
|
132
|
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
__END__ |