[Catalyst-commits] r7165 - in Catalyst-Controller-SOAP/1.0/trunk: . lib lib/Catalyst lib/Catalyst/Action lib/Catalyst/Action/SOAP lib/Catalyst/Controller lib/Catalyst/Controller/SOAP t

ruoso at dev.catalyst.perl.org ruoso at dev.catalyst.perl.org
Tue Nov 27 10:48:51 GMT 2007


Author: ruoso
Date: 2007-11-27 10:48:51 +0000 (Tue, 27 Nov 2007)
New Revision: 7165

Added:
   Catalyst-Controller-SOAP/1.0/trunk/Changes
   Catalyst-Controller-SOAP/1.0/trunk/MANIFEST
   Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL
   Catalyst-Controller-SOAP/1.0/trunk/README
   Catalyst-Controller-SOAP/1.0/trunk/lib/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/DocumentLiteral.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEncoded.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEndpoint.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCLiteral.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP/
   Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP/RPC.pm
   Catalyst-Controller-SOAP/1.0/trunk/t/
   Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t
Log:
[C-C-SOAP] [git2svn] Tue Nov 13 15:17:41 2007 +0000 -- initial revision

Added: Catalyst-Controller-SOAP/1.0/trunk/Changes
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/Changes	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/Changes	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,6 @@
+Revision history for Perl extension Catalyst::Controller::SOAP.
+
+0.01  Tue Nov  6 10:23:19 2007
+	- original version; created by h2xs 1.23 with options
+		-n Catalyst::Controller::SOAP
+

Added: Catalyst-Controller-SOAP/1.0/trunk/MANIFEST
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/MANIFEST	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/MANIFEST	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,10 @@
+Changes
+Makefile.PL
+MANIFEST
+ppport.h
+README
+SOAP.xs
+t/Catalyst-Controller-SOAP.t
+fallback/const-c.inc
+fallback/const-xs.inc
+lib/Catalyst/Controller/SOAP.pm

Added: Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,40 @@
+use 5.008008;
+use ExtUtils::MakeMaker;
+# See lib/ExtUtils/MakeMaker.pm for details of how to influence
+# the contents of the Makefile that is written.
+WriteMakefile(
+    NAME              => 'Catalyst::Controller::SOAP',
+    VERSION_FROM      => 'lib/Catalyst/Controller/SOAP.pm', # finds $VERSION
+    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
+    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
+      (ABSTRACT_FROM  => 'lib/Catalyst/Controller/SOAP.pm', # retrieve abstract from module
+       AUTHOR         => 'Daniel Ruoso <ruoso@>') : ()),
+    LIBS              => [''], # e.g., '-lm'
+    DEFINE            => '', # e.g., '-DHAVE_SOMETHING'
+    INC               => '-I.', # e.g., '-I. -I/usr/include/other'
+	# Un-comment this if you add C files to link with later:
+    # OBJECT            => '$(O_FILES)', # link all the C files too
+);
+if  (eval {require ExtUtils::Constant; 1}) {
+  # If you edit these definitions to change the constants used by this module,
+  # you will need to use the generated const-c.inc and const-xs.inc
+  # files to replace their "fallback" counterparts before distributing your
+  # changes.
+  my @names = (qw());
+  ExtUtils::Constant::WriteConstants(
+                                     NAME         => 'Catalyst::Controller::SOAP',
+                                     NAMES        => \@names,
+                                     DEFAULT_TYPE => 'IV',
+                                     C_FILE       => 'const-c.inc',
+                                     XS_FILE      => 'const-xs.inc',
+                                  );
+
+}
+else {
+  use File::Copy;
+  use File::Spec;
+  foreach my $file ('const-c.inc', 'const-xs.inc') {
+    my $fallback = File::Spec->catfile('fallback', $file);
+    copy ($fallback, $file) or die "Can't copy $fallback to $file: $!";
+  }
+}

Added: Catalyst-Controller-SOAP/1.0/trunk/README
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/README	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/README	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,40 @@
+Catalyst-Controller-SOAP version 0.01
+=====================================
+
+The README is used to introduce the module and provide instructions on
+how to install the module, any machine dependencies it may have (for
+example C compilers and installed libraries) and any other information
+that should be provided before the module is installed.
+
+A README file is required for CPAN modules since CPAN extracts the
+README file from a module distribution so that people browsing the
+archive can use it get an idea of the modules uses. It is usually a
+good idea to provide version information here so that people can
+decide whether fixes for the module are worth downloading.
+
+INSTALLATION
+
+To install this module type the following:
+
+   perl Makefile.PL
+   make
+   make test
+   make install
+
+DEPENDENCIES
+
+This module requires these other modules and libraries:
+
+  blah blah blah
+
+COPYRIGHT AND LICENCE
+
+Put the correct copyright and licence information here.
+
+Copyright (C) 2007 by Daniel Ruoso
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.8 or,
+at your option, any later version of Perl 5 you may have available.
+
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/DocumentLiteral.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/DocumentLiteral.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/DocumentLiteral.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,56 @@
+{ package Catalyst::Action::SOAP::DocumentLiteral;
+
+  use base qw/Catalyst::Action::SOAP/;
+
+  sub execute {
+      my $self = shift;
+      my ( $controller, $c ) = @_;
+      $self->prepare_soap_helper($c);
+      $self->prepare_soap_xml_post($c);
+      unless ($c->stash->{soap}->fault) {
+          my $envelope = $c->stash->{soap}->parsed_envelope;
+          my ($body) = $envelope->getElementsByTagName('body',0);
+          $self->NEXT::execute($controller, $c, $body);
+      }
+  }
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Action::SOAP::DocumentLiteral - Document Literal service
+
+=head1 SYNOPSIS
+
+  # not used directly.
+
+=head1 DESCRIPTION
+
+This action implements a simple parse of the envelope and passing the
+body to the service as a xml object.
+
+=head1 TODO
+
+Almost all the SOAP protocol is unsupported, only the method
+dispatching and, optionally, the soap-decoding of the arguments are
+made.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEncoded.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEncoded.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEncoded.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,55 @@
+{ package Catalyst::Action::SOAP::RPCEncoded;
+
+  use base qw/Catalyst::Action::SOAP/;
+
+  __PACKAGE__->mk_accessors(qw/operations/);
+
+  sub execute {
+      my $self = shift;
+      my ( $controller, $c ) = @_;
+
+      
+
+  }
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Action::SOAP::RPCEncoded - RPC Encoded service
+
+=head1 SYNOPSIS
+
+  # not used directly.
+
+=head1 DESCRIPTION
+
+This class implements the soap encoding dispatch on the service, which
+means that the arguments are passed to the service as an list of the
+parsed arguments.
+
+=head1 TODO
+
+Almost all the SOAP protocol is unsupported, only the method
+dispatching and, optionally, the soap-decoding of the arguments are
+made.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEndpoint.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEndpoint.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCEndpoint.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,80 @@
+{ package Catalyst::Action::SOAP::RPCEndpoint;
+
+  use base qw/Catalyst::Action::SOAP/;
+
+  sub execute {
+      my $self = shift;
+      my ( $controller, $c ) = @_;
+
+      $self->prepare_soap_helper($c);
+      $self->prepare_soap_xml_post($c);
+      unless ($c->stash->{soap}->fault) {
+          my $envelope = $c->stash->{soap}->parsed_envelope;
+          my ($body) = $envelope->getElementsByTagName('body',0)
+          my @children = $body->getChildNodes();
+          if (scalar @children != 1) {
+              $c->stash->{soap}->fault
+                ({ code => { 'env:Sender' => 'env:Body' },
+                   reason => 'Bad Body', detail =>
+                   'RPC messages should contain only one element inside body'})
+            } else {
+                my $operation = $children[0]->getNodeName();
+                my $arguments = $children[0]->getChildNodes();
+                $c->stash->{soap}->arguments($arguments);
+                if ($controller->action_for($operation)->attributes->{ActionClass} !~ /RPC(Encoded|Literal)/) {
+                    $c->stash->{soap}->fault
+                      ({ code => { env:Sender => 'env:Body' },
+                         reason => 'Bad Operation', detail =>
+                         'Invalid Operation'})
+                } else {
+                    # this is our RPC action
+                    $c->forward($operation);
+                }
+            }
+      }
+  }
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::SOAP::Action::RPCEndpoint - RPC Dispatcher
+
+=head1 SYNOPSIS
+
+  # not used directly.
+
+=head1 DESCRIPTION
+
+This class is used by L<Catalyst::Controller::SOAP> to dispatch to the
+RPC operations inside a controller. These operations are quite
+different from the others, as they are seen by Catalyst as this single
+action. During the registering phase, the soap rpc operations are
+included in the hash that is sent to this object, so they can be
+invoked later.
+
+=head1 TODO
+
+Almost all the SOAP protocol is unsupported, only the method
+dispatching and, optionally, the soap-decoding of the arguments are
+made.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCLiteral.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCLiteral.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP/RPCLiteral.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,51 @@
+{ package Catalyst::Action::SOAP::RPCLiteral;
+
+  use base qw/Catalyst::Action::SOAP/;
+
+  sub execute {
+      my $self = shift;
+      my ( $controller, $c ) = @_;
+      $self->NEXT::execute($controller, $c, $c->stash->{soap}->arguments);
+  }
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Action::SOAP::RPCLiteral - RPC style Literal encoding service
+
+=head1 SYNOPSIS
+
+  # not used directly.
+
+=head1 DESCRIPTION
+
+This class implements the literal encoding dispatch on the service,
+which means that the arguments are passed to the service as a xml
+object in the parameters.
+
+=head1 TODO
+
+Almost all the SOAP protocol is unsupported, only the method
+dispatching and, optionally, the soap-decoding of the arguments are
+made.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Action/SOAP.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,75 @@
+{ package Catalyst::Action::SOAP;
+
+  use base qw/Catalyst::Action/;
+  use XML::DOM::XPath;
+
+  __PACKAGE__->mk_accessors(qw/xml_parser/);
+
+  sub new {
+      my $class = shift;
+      my $self = $class->SUPER::new(@_);
+      $self->xml_parser(XML::DOM::Parser->new());
+      return $self;
+  }
+
+  sub prepare_soap_helper {
+      my ($self, $c) = @_;
+      $c->stash->{soap} = Catalyst::Controller::SOAP::Helper->new();
+  }
+
+  sub prepare_soap_xml_post {
+      my ($self, $c) = @_;
+      if ($c->req->content_type =~ /application\/soap\+xml/ &&
+          $c->req->method eq 'POST') {
+          my $xml_str = $c->req->body;
+          eval {
+              $c->stash->{soap}->envelope($xml_str);
+              $c->stash->{soap}->parsed_envelope($self->xml_parser->parse($xml_str));
+          };
+          if ($@) {
+              $c->stash->{soap}->fault({ code => 'env:Sender', reason => 'Bad XML Message', detail => $@});
+          }
+      } else {
+          $c->stash->{soap}->fault({ code => 'env:Sender', reason => 'Bad content-type/method'});
+      }
+  }
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::SOAP::Action - Action superclass
+
+=head1 SYNOPSIS
+
+  # not used directly.
+
+=head1 DESCRIPTION
+
+This is the superclass used by the Document and the RPC actions.
+
+=head1 TODO
+
+Almost all the SOAP protocol is unsupported, only the method
+dispatching and, optionally, the soap-decoding of the arguments are
+made.
+
+=head1 AUTHORS
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP/RPC.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP/RPC.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP/RPC.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,46 @@
+{ package Catalyst::Controller::SOAP::RPC;
+  use strict;
+  use base qw(Catalyst::Controller::SOAP);
+  sub rpc_endpoint :Path('') :SOAPRPCEndpoint { };
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::SOAP::RPC - Helper controller for SOAP
+
+=head1 SYNOPSIS
+
+ use base qw(Catalyst::Controller::SOAP::RPC);
+
+=head1 DESCRIPTION
+
+This is a direct subclass of Catalyst::Controller::SOAP that
+predefines a rpc_endpoint method which is dispatched in the URI of the
+controller as the RPC endpoint. It's simply inteded to save you the
+job of defining that in each SOAP RPC controller you implement,
+considering that is the standard behaviour.
+
+=head1 TODO
+
+Well, here? nothing, all the work is done in the superclass.
+
+=head1 AUTHOR
+
+Daniel Ruoso <daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut
+

Added: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,168 @@
+{ package Catalyst::Controller::SOAP;
+
+    use strict;
+    use base qw/Catalyst::Controller/;
+
+    our $VERSION = '0.0.1';
+
+    sub _parse_SOAP_Attr {
+        my ($self, $c, $name, $value) = @_;
+        my $actionclass = $value =~ /^+/ ? $value :
+          'SOAP::'.$value;
+        (
+         ActionClass => $actionclass,
+        )
+    }
+
+};
+
+{ package Catalyst::Controller::SOAP::Helper;
+
+  use base qw(Class::Accessor::Fast);
+
+  __PACKAGE__->mk_accessors(qw{envelope parsed_envelope arguments error
+                               encoded_return literal_return
+                               literal_string_return string_return});
+
+};
+
+1;
+
+__END__
+
+=head1 NAME
+
+Catalyst::Controller::SOAP -- Catalyst SOAP Controller
+
+=head1 SYNOPSIS
+
+    package MyApp::Controller::Example;
+    use base 'Catalyst::Controller::SOAP';
+
+    # available in "/example" as operation "echo"
+    # parsing the arguments as soap-encoded.
+    sub echo : SOAP('RPCEncoded') {
+        my ( $self, $c, @args ) = @_;
+    }
+
+    # available in "/example" as operation "ping". The arguments are
+    # treated as a literal document and passed to the method as a
+    # XML::DOM::XPath object
+    sub ping : SOAP('RPCLiteral') {
+        my ( $self, $c, $xml) = @_;
+        my $name = $xml->findValue('some xpath expression');
+    }
+
+    # avaiable as "/example/world" in document context. The entire body
+    # is delivered to the method as a XML::DOM::XPath object.
+    sub world : SOAP('DocLiteral') {
+        my ($self, $c, $doc) = @_;
+    }
+
+    # this is the endpoint from where the RPC operations will be
+    # dispatched. This code won't be executed at all.
+    sub index : SOAP('RPCEndpoint') {}
+
+=head1 DESCRIPTION
+
+SOAP Controller for Catalyst which we tried to make compatible with
+the way Catalyst works with URLS.
+
+It is important to notice that this controller declares by default an
+index operation which will dispatch the RPC operations under this
+class.
+
+=back
+
+=head1 ATTRIBUTES
+
+This class implements the SOAP attribute wich is used to do the
+mapping of that operation to the apropriate action class. The name of
+the class used is formed as Catalyst::Action::SOAP::$value, unless the
+parameter of the attribute starts with a '+', which implies complete
+namespace.
+
+The implementation of SOAP Action classes helps delivering specific
+SOAP scenarios, like HTTP GET, RPC Encoded, RPC Literal or Document
+Literal, or even Document RDF or just about any required combination.
+
+See L<Catalyst::Action::SOAP::DocLiteral> for an example.
+
+=head1 ACCESSORS
+
+Once you tagged one of the methods, you'll have an $c->stash->{soap}
+accessor which will return an C<Catalyst::Controller::SOAP::Helper>
+object. It's important to notice that this is achieved by the fact
+that all the SOAP Action classes are subclasses of
+Catalyst::Action::SOAP, which implements most of that.
+
+You can query this object as follows:
+
+=over 4
+
+=item $c->stash->{soap}->envelope()
+
+The original SOAP envelope as string.
+
+=item $c->stash->{soap}->parsed_envelope()
+
+The parsed envelope as an XML::DOM::XPath object.
+
+=item $c->stash->{soap}->arguments()
+
+The arguments of a RPC call.
+
+=item $c->stash->{soap}->error($c,[$code,$message])
+
+Allows you to set fault code and message
+
+=item $c->stash->{soap}->encoded_return(\@data)
+
+This method will prepare the return value to be a soap encoded data.
+
+=item $c->stash->{soap}->literal_return($xml_node)
+
+This method will prepare the return value to be a literal XML
+document, in this case, you can pass just the node that will be the
+root in the return message.
+
+=item $c->stash->{soap}->literal_string_return($xml_text)
+
+In this case, the argument is used literally inside the message. It is
+supposed to already contain all namespace definitions in it.
+
+=item $c->stash->{soap}->string_return($non_xml_text)
+
+In this case, the given text is encoded as CDATA inside the SOAP
+message.
+
+=back
+
+=head1 TODO
+
+At this moment, this is a very early release. So almost everything is
+still to be done. The only thing done right now is getting the body
+from the message and dispatching the correct method.
+
+=head1 SEE ALSO
+
+L<Catalyst::Action::SOAP>, L<XML::DOM::XPath>,
+L<Catalyst::Action::SOAP::DocLiteral>,
+L<Catalyst::Action::SOAP::RPCEncoded>,
+L<Catalyst::Action::SOAP::HTTPGet>
+
+=head1 AUTHORS
+
+Daniel Ruoso C<daniel.ruoso at verticalone.pt>
+
+=head1 BUG REPORTS
+
+Please submit all bugs regarding C<Catalyst::Controller::SOAP> to
+C<bug-catalyst-controller-soap at rt.cpan.org>
+
+=head1 LICENSE
+
+This library is free software, you can redistribute it and/or modify
+it under the same terms as Perl itself.
+
+=cut

Added: Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t	                        (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t	2007-11-27 10:48:51 UTC (rev 7165)
@@ -0,0 +1,15 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl Catalyst-Controller-SOAP.t'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use Test::More tests => 1;
+BEGIN { use_ok('Catalyst::Controller::SOAP') };
+
+#########################
+
+# Insert your test code below, the Test::More module is use()ed here so read
+# its man page ( perldoc Test::More ) for help writing this test script.
+




More information about the Catalyst-commits mailing list