=head1 NAME

XML::Compile::FAQ - frequently asked questions

=head1 DESCRIPTION

On this page, a wild collection of questions are answered related to
the XML::Compile::SOAP modules.  Or better said: let's hope there will
be more in the future. If you have contributions either in question or
as answer, then please contribute via the xml mailinglist.

See also L<XML::Compile::FAQ|XML::Compile::FAQ>.

=head2 Modifing the messages

=head3 add header fields

Although WSDLs offer a nice way to define header-fields explicitly, quite
a number of applications require fields which are not described. Also
some W3C standards play this game.  See L<XML::Compile::SOAP::WSA|XML::Compile::SOAP::WSA>
for a complex example. A simple example follows here.

  use warnings;
  use strict;

  package XML::Compile::SOAP::MYEXT;
  use base 'XML::Compile::SOAP::Extension';

  use Log::Report;
  use XML::Compile::SOAP::Util      qw/WSDL11/;
  use XML::Compile::Util            qw/pack_type/;

  my $my_ns = 'http://..../';
  my $my_schema_fie = 'aaa.xsd';

  sub wsdl11Init($@)
  {   my ($self, $wsdl, $args) = @_;
      $wsdl->prefixes(myprefix => $my_ns);
      $wsdl->importDefinitions($my_schema_file);
      $self;
  }

  sub soap11Operation$$)
  {   my ($self, $op, $args) = @_;
      # towards the server
      $op->addHeader(INPUT
        => "myprefix_$fieldname" => "{$my_ns}$fieldtype");

      # in server answers
      $op->addHeader(OUTPUT => ...);
  }

With C<soap11ClientWrapper()> and C<soap11HandlerWrapper()>
you can influence the client respectively server processing, for
instance to fill-in default values.

=head1 SEE ALSO

This module is part of XML-Compile-SOAP distribution version 2.21,
built on December 25, 2010. Website: F<http://perl.overmeer.net/xml-compile/>

Other distributions in this suite:
L<XML::Compile>,
L<XML::Compile::SOAP>,
L<XML::Compile::SOAP12>,
L<XML::Compile::SOAP::Daemon>,
L<XML::Compile::SOAP::WSA>,
L<XML::Compile::Tester>,
L<XML::Compile::Cache>,
L<XML::Compile::Dumper>,
L<XML::Compile::RPC>,
L<XML::Rewrite>,
L<XML::eXistDB>,
and
L<XML::LibXML::Simple>.

Please post questions or ideas to the mailinglist at
F<http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile>
For live contact with other developers, visit the C<#xml-compile> channel
on C<irc.perl.org>.

=head1 LICENSE

Copyrights 2007-2010 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<http://www.perl.com/perl/misc/Artistic.html>

