=head1 NAME
XML::Compile::SOAP11 - base class for SOAP1.1 implementation
=head1 INHERITANCE
XML::Compile::SOAP11
is a XML::Compile::SOAP
XML::Compile::SOAP11 is extended by
XML::Compile::SOAP11::Client
XML::Compile::SOAP11::Server
=head1 SYNOPSIS
=head1 DESCRIPTION
This module handles the SOAP protocol version 1.1.
See F).
The implementation tries to behave like described in
F
Two extensions are made: the SOAP11 client
L.
and server in L.
=head1 METHODS
=head2 Constructors
$obj-EB(OPTIONS)
=over 4
To simplify the URIs of the actors, as specified with the C
option, you may use the STRING C. It will be replaced by the
right URI.
Option --Defined in --Default
encoding_ns XML::Compile::SOAP http://schemas.xmlsoap.org/soap/encoding/
envelope_ns XML::Compile::SOAP http://schemas.xmlsoap.org/soap/envelope/
media_type XML::Compile::SOAP application/soap+xml
schema_instance_ns XML::Compile::SOAP $schema_ns . '-instance'
schema_ns XML::Compile::SOAP http://www.w3.org/2001/XMLSchema
schemas XML::Compile::SOAP created internally
version XML::Compile::SOAP 'SOAP11'
. encoding_ns => URI
. envelope_ns => URI
. media_type => MIMETYPE
. schema_instance_ns => URI
. schema_ns => URI
. schemas => C object
. version => STRING
=back
=head2 Accessors
$obj-EB
=over 4
See L
=back
$obj-EB
=over 4
See L
=back
$obj-EB(TABLE, NEW, [USED])
=over 4
See L
=back
$obj-EB(() {shift->{schemains}})
=over 4
See L
=back
$obj-EB
=over 4
See L
=back
$obj-EB
=over 4
See L
=back
$obj-EB
=over 4
See L
=back
=head2 Single messages
$obj-EB(('SENDER'|'RECEIVER'), OPTIONS)
=over 4
Option --Defined in --Default
body XML::Compile::SOAP []
destination XML::Compile::SOAP []
faults XML::Compile::SOAP []
header XML::Compile::SOAP undef
headerfault []
mustUnderstand XML::Compile::SOAP []
prefixes XML::Compile::SOAP {}
role XML::Compile::SOAP ULTIMATE
roles XML::Compile::SOAP []
style XML::Compile::SOAP 'document'
. body => ENTRIES
. destination => ARRAY
. faults => ENTRIES
. header => ENTRIES
. headerfault => ENTRIES
=over 4
ARRAY of simple name with element references, for all expected
faults. There can be unexpected faults, which will not get
decoded automatically.
=back
. mustUnderstand => STRING|ARRAY-OF-STRING
. prefixes => HASH
. role => URI|ARRAY-OF-URI
. roles => ARRAY-OF-URI
. style => 'document'|'rpc-literal'|'rpc-encoded'
=back
$obj-EB(XMLDATA, OPTIONS)
=over 4
See L
=back
$obj-EB(XML)
XML::Compile::SOAP11-EB(XML)
=over 4
See L
=back
=head2 Sender (internals)
$obj-EB(ARGS)
=over 4
See L
=back
$obj-EB(BODY-DEFS, NAMESPACE-TABLE, OPTS)
=over 4
See L
=back
$obj-EB(FAULT-DEFS, NAMESPACE-TABLE, FAULTTYPE)
=over 4
See L
=back
$obj-EB(HEADER-DEFS, NS-TABLE, UNDERSTAND, DESTINATION, OPTS)
=over 4
See L
=back
$obj-EB(NAMESPACE-TABLE)
=over 4
See L
=back
$obj-EB(NAMESPACE-TABLE)
=over 4
See L
=back
$obj-EB(NAMESPACE-TABLE)
=over 4
See L
=back
$obj-EB(NAMESPACE, LOCAL, ACTIONS)
=over 4
See L
=back
=head2 Receiver (internals)
$obj-EB
=over 4
See L
=back
$obj-EB(NAMESPACE, LOCAL, ACTIONS)
=over 4
See L
=back
$obj-EB(BODYDEF, OPTS)
=over 4
See L
=back
$obj-EB(FAULTSDEF)
=over 4
The decoders for the possible "faults" are compiled. Returned is a code
reference which can handle it. See fault handler specifics in the
C chapter below.
=back
$obj-EB(HEADERDEF, OPTS)
=over 4
See L
=back
$obj-EB(ARGS)
=over 4
See L
=back
=head2 Helpers
=head2 Transcoding
$obj-EB(TYPE)
=over 4
See L
=back
$obj-EB(URI)
=over 4
See L
=back
$obj-EB(URI|STRING)
=over 4
See L
=back
=head1 DETAILS
=head2 SOAP introduction
=head2 Naming types and elements
=head2 Client, Proxy and Server implementations
=head2 Receiving faults in SOAP1.1
When faults are received, they will be returned with the C key
in the data structure. So:
my $answer = $call->($question);
if($answer->{Faults}) { ... }
As extra service, for each of the fault types, as defined with
L, a decoded structure is included. The name
of that structure can be found like this:
if(my $faults = $answer->{Faults})
{ my $name = $faults->{_NAME};
my $decoded = $answer->{$name};
...
}
The untranslated C<$faults> HASH looks like this:
Fault =>
{ faultcode => '{http://schemas.xmlsoap.org/soap/envelope/}Server.first'
, faultstring => 'my mistake'
, faultactor => 'http://schemas.xmlsoap.org/soap/actor/next'
, detail => { '{http://test-types}fault_one' => [ XMLNODES ] }
, _NAME => 'fault1'
(
}
The C<_NAME> originates from the L option:
$soap->compileMessage('RECEIVER', ...
, faults => [ fault1 => '{http://test-types}fault_one' ] );
Now, automatically the answer will contain the decoded fault
structure as well:
fault1 =>
{ code => '{http://schemas.xmlsoap.org/soap/envelope/}Server.first'
, class => [ 'http://schemas.xmlsoap.org/soap/envelope/'
, 'Receiver', 'first' ]
, reason => 'my mistake',
, role => 'NEXT'
, detail => { help => 'please ignore' }
}
The C is the decoding of the XMLNODES, which are defined to
be of type C<< {http://test-types}fault_one >>.
The C is an unpacked version of the code. SOAP1.2 is using the
(better) terms C and C.
C is constructed by decoding the C using
L. The names are closer to the SOAP1.2 specification.
If the received fault is of an unpredicted type, then key C
is used, and the C will list the unparsed XMLNODEs. When there
are no details, (according to the specs) the error must be caused by
a header problem, so the C key is used.
=head1 SEE ALSO
This module is part of XML-Compile-SOAP distribution version 0.77,
built on August 15, 2008. Website: F
All modules in this suite:
L,
L,
L,
L,
L,
L,
L.
Please post questions or ideas to the mailinglist at
F
For life contact with other developers, visit the C<#xml-compile> channel
on C.
=head1 LICENSE
Copyrights 2007-2008 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F