SOAP-Lite

 view release on metacpan or  search on metacpan

lib/SOAP/Constants.pm  view on Meta::CPAN

# ======================================================================
#
# Copyright (C) 2000-2004 Paul Kulchenko (paulclinger@yahoo.com)
#
# SOAP::Lite is free software; you can redistribute it
# and/or modify it under the same terms as Perl itself.
#
# ======================================================================
package SOAP::Constants;
use strict;
use SOAP::Lite;

our $VERSION = '1.27'; # VERSION

use constant    URI_1999_SCHEMA_XSD    => "http://www.w3.org/1999/XMLSchema";
use constant    URI_1999_SCHEMA_XSI    => "http://www.w3.org/1999/XMLSchema-instance";
use constant    URI_2000_SCHEMA_XSD    => "http://www.w3.org/2000/10/XMLSchema";
use constant    URI_2000_SCHEMA_XSI    => "http://www.w3.org/2000/10/XMLSchema-instance";
use constant    URI_2001_SCHEMA_XSD    => "http://www.w3.org/2001/XMLSchema";
use constant    URI_2001_SCHEMA_XSI    => "http://www.w3.org/2001/XMLSchema-instance";
use constant    URI_LITERAL_ENC        => "";
use constant    URI_SOAP11_ENC         => "http://schemas.xmlsoap.org/soap/encoding/";
use constant    URI_SOAP11_ENV         => "http://schemas.xmlsoap.org/soap/envelope/";
use constant    URI_SOAP11_NEXT_ACTOR  => "http://schemas.xmlsoap.org/soap/actor/next";
use constant    URI_SOAP12_ENC         => "http://www.w3.org/2003/05/soap-encoding";
use constant    URI_SOAP12_ENV         => "http://www.w3.org/2003/05/soap-envelope";
use constant    URI_SOAP12_NOENC       => "http://www.w3.org/2003/05/soap-envelope/encoding/none";
use constant    URI_SOAP12_NEXT_ACTOR  => "http://www.w3.org/2003/05/soap-envelope/role/next";

use vars qw($NSMASK $ELMASK);

$NSMASK = '[a-zA-Z_:][\w.\-:]*';
$ELMASK = '^(?![xX][mM][lL])[a-zA-Z_][\w.\-]*$';

use vars qw($NEXT_ACTOR $NS_ENV $NS_ENC $NS_APS
    $FAULT_CLIENT $FAULT_SERVER $FAULT_VERSION_MISMATCH
    $HTTP_ON_FAULT_CODE $HTTP_ON_SUCCESS_CODE $FAULT_MUST_UNDERSTAND
    $NS_XSI_ALL $NS_XSI_NILS %XML_SCHEMAS $DEFAULT_XML_SCHEMA
    $DEFAULT_HTTP_CONTENT_TYPE
    $SOAP_VERSION %SOAP_VERSIONS $WRONG_VERSION
    $NS_SL_HEADER $NS_SL_PERLTYPE $PREFIX_ENV $PREFIX_ENC
    $DO_NOT_USE_XML_PARSER $DO_NOT_CHECK_MUSTUNDERSTAND
    $DO_NOT_USE_CHARSET $DO_NOT_PROCESS_XML_IN_MIME
    $DO_NOT_USE_LWP_LENGTH_HACK $DO_NOT_CHECK_CONTENT_TYPE
    $MAX_CONTENT_SIZE $PATCH_HTTP_KEEPALIVE $DEFAULT_PACKAGER
    @SUPPORTED_ENCODING_STYLES $OBJS_BY_REF_KEEPALIVE
    $DEFAULT_CACHE_TTL
    %XML_SCHEMA_OF
    $HAS_ENCODE
);

$FAULT_CLIENT           = 'Client';
$FAULT_SERVER           = 'Server';
$FAULT_VERSION_MISMATCH = 'VersionMismatch';
$FAULT_MUST_UNDERSTAND  = 'MustUnderstand';

$HTTP_ON_SUCCESS_CODE = 200; # OK
$HTTP_ON_FAULT_CODE   = 500; # INTERNAL_SERVER_ERROR

@SUPPORTED_ENCODING_STYLES = ( URI_LITERAL_ENC,URI_SOAP11_ENC,URI_SOAP12_ENC,URI_SOAP12_NOENC );

$WRONG_VERSION = 'Wrong SOAP version specified.';

$SOAP_VERSION = '1.1';
%SOAP_VERSIONS = (
    1.1 => {
        NEXT_ACTOR                => URI_SOAP11_NEXT_ACTOR,
        NS_ENV                    => URI_SOAP11_ENV,
        NS_ENC                    => URI_SOAP11_ENC,
        DEFAULT_XML_SCHEMA        => URI_2001_SCHEMA_XSD,
        DEFAULT_HTTP_CONTENT_TYPE => 'text/xml',
    },
    1.2 => {
        NEXT_ACTOR                => URI_SOAP12_NEXT_ACTOR,
        NS_ENV                    => URI_SOAP12_ENV,
        NS_ENC                    => URI_SOAP12_ENC,
        DEFAULT_XML_SCHEMA        => URI_2001_SCHEMA_XSD,
        DEFAULT_HTTP_CONTENT_TYPE => 'application/soap+xml',
    },
);

# schema namespaces
%XML_SCHEMAS = ( # The '()' is necessary to put constants in SCALAR form
    URI_1999_SCHEMA_XSD() => 'SOAP::XMLSchema1999',
    URI_2001_SCHEMA_XSD() => 'SOAP::XMLSchema2001',
    URI_SOAP11_ENC()      => 'SOAP::XMLSchemaSOAP1_1',
    URI_SOAP12_ENC()      => 'SOAP::XMLSchemaSOAP1_2',

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 0.833 second using v1.00-cache-2.02-grep-82fe00e-cpan-c30982ac1bc3 )