[Catalyst-commits] r7173 - in Catalyst-Controller-SOAP/1.0/trunk: .
lib/Catalyst/Controller t t/PostApp t/PostApp/lib
t/PostApp/lib/PostApp/Controller t/PostApp/root
t/PostApp/root/static/images t/PostApp/script t/PostApp/t
t/lib/TestApp/Controller
ruoso at dev.catalyst.perl.org
ruoso at dev.catalyst.perl.org
Tue Nov 27 11:01:36 GMT 2007
Author: ruoso
Date: 2007-11-27 11:01:36 +0000 (Tue, 27 Nov 2007)
New Revision: 7173
Added:
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t
Removed:
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Changes
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Makefile.PL
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/README
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/favicon.ico
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_built.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_built_shadow.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_powered.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_powered_shadow.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_built.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_built_shadow.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_powered.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_powered_shadow.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/catalyst_logo.png
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_create.pl
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_fastcgi.pl
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/01app.t
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/02pod.t
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/03podcoverage.t
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/controller_WS.t
Modified:
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.pm
Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp.pm
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/Root.pm
Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/post.pl
Catalyst-Controller-SOAP/1.0/trunk/t/lib/TestApp/Controller/Root.pm
Log:
[C-C-SOAP] [git2svn] Wed Nov 21 18:33:13 2007 +0000 -- now do not depend on renderview in the test. Also declare the versioned dependency on the Catalyst::Runtime The PostApp app is now used in a test.. Better README and Changes file.. Make the test more cross-platform.. marking a new release..
Modified: Catalyst-Controller-SOAP/1.0/trunk/Changes
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/Changes 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/Changes 2007-11-27 11:01:36 UTC (rev 7173)
@@ -4,3 +4,92 @@
- original version; created by h2xs 1.23 with options
-n Catalyst::Controller::SOAP
+commit 865fcd5df2222b9034690fef7f4f6c800c9a75d4
+Author: Daniel Ruoso <daniel at ruoso.com>
+Date: Wed Nov 21 18:21:23 2007 +0000
+
+ The PostApp app is now used in a test...
+
+commit 16f12fb6cda352faa2e88dacf6e468c3778d3a52
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Sun Nov 18 16:50:54 2007 +0000
+
+ now do not depend on renderview in the test. Also declare the versioned dependency on the Catalyst::Runtime
+
+commit dcdeecc9b1add94f68aa1905957cd9b9ae96c761
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Thu Nov 15 09:59:28 2007 +0000
+
+ marking new release
+
+commit a201321dde6a2575d95b88fbf854caf424ca0ccf
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Thu Nov 15 09:54:21 2007 +0000
+
+ fixing naming of modules in documentation...
+
+commit 7c2b71c1a19a521768c6debf07aaea149549195e
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 19:13:24 2007 +0000
+
+ marking new release
+
+commit e9bd4bbe2c3d3e678b7fc1440b5f72766b3307a6
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 19:12:53 2007 +0000
+
+ rpc endpoint now working
+
+commit 8baa49622fadce26d5e67ab3e1a215573b544b29
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 18:49:51 2007 +0000
+
+ inserting an application inside it as to become more easily testeable
+
+commit cbb6c48df9344176d1b7a7ca913358762758216f
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 17:44:53 2007 +0000
+
+ commenting out the post test, as I am not being able to actually test it.
+
+commit 255b3e5ecfd72b6ee80efd13352ec339bb8544b0
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 15:19:25 2007 +0000
+
+ trying to make the test POST to work
+
+commit 05f68c21b35b7e935a1cbf69841550ef4a941726
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 14:22:14 2007 +0000
+
+ fixing the attribute parsing method. HTTPGet working, POST test failing because the post data is not reaching the destination...
+
+commit ae3039a74cfe706bd3580a36f53a6221fbe7f39d
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Wed Nov 14 12:56:34 2007 +0000
+
+ Implementing a test application
+
+commit 9df23a3e824051f9b53c372c423dd40407af9b23
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Tue Nov 13 18:57:31 2007 +0000
+
+ HTTP Get implementation.
+
+commit fb83167aacbc590632158e8a4469c6d99d635887
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Tue Nov 13 18:04:29 2007 +0000
+
+ Implements minimal response generation
+
+commit 8172902febdd3686d6be6ecbc4daad5a139d383b
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Tue Nov 13 17:10:53 2007 +0000
+
+ XML::DOM doesn't support namespaces, let's move to XML::LibXML instead
+
+commit 4635f7dc730316da5952d3e533e439288508fb21
+Author: Daniel Ruoso <ruoso at pitombeira.(none)>
+Date: Tue Nov 13 15:17:41 2007 +0000
+
+ initial revision
Modified: Catalyst-Controller-SOAP/1.0/trunk/MANIFEST
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/MANIFEST 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/MANIFEST 2007-11-27 11:01:36 UTC (rev 7173)
@@ -4,9 +4,24 @@
META.yml
README
t/Catalyst-Controller-SOAP.t
+t/PostApp.t
t/lib/TestApp/Controller/WS.pm
t/lib/TestApp/Controller/Root.pm
t/lib/TestApp.pm
+t/PostApp
+t/PostApp/script
+t/PostApp/script/postapp_cgi.pl
+t/PostApp/script/postapp_test.pl
+t/PostApp/script/post.pl
+t/PostApp/script/postapp_server.pl
+t/PostApp/lib
+t/PostApp/lib/PostApp
+t/PostApp/lib/PostApp/Controller
+t/PostApp/lib/PostApp/Controller/WS.pm
+t/PostApp/lib/PostApp/Controller/Root.pm
+t/PostApp/lib/PostApp/Controller/WS2.pm
+t/PostApp/lib/PostApp.pm
+t/PostApp/postapp.yml
lib/Catalyst/Action/SOAP.pm
lib/Catalyst/Action/SOAP/DocumentLiteral.pm
lib/Catalyst/Action/SOAP/HTTPGet.pm
Modified: Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/Makefile.PL 2007-11-27 11:01:36 UTC (rev 7173)
@@ -5,7 +5,7 @@
WriteMakefile(
NAME => 'Catalyst::Controller::SOAP',
VERSION_FROM => 'lib/Catalyst/Controller/SOAP.pm', # finds $VERSION
- PREREQ_PM => { Catalyst::Controller => 0, XML::LibXML => 0}, # e.g., Module::Name => 1.1
+ PREREQ_PM => { Catalyst::Runtime => 5.7011, XML::LibXML => 0}, # 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 <daniel.ruoso at verticalone.pt>') : ()),
Modified: Catalyst-Controller-SOAP/1.0/trunk/README
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/README 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/README 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,40 +1,114 @@
-Catalyst-Controller-SOAP version 0.01
-=====================================
+NAME
+ Catalyst::Controller::SOAP - Catalyst SOAP Controller
-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.
+SYNOPSIS
+ package MyApp::Controller::Example;
+ use base 'Catalyst::Controller::SOAP';
-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.
+ # available in "/example" as operation "echo"
+ # parsing the arguments as soap-encoded.
+ sub echo : SOAP('RPCEncoded') {
+ my ( $self, $c, @args ) = @_;
+ }
-INSTALLATION
+ # available in "/example" as operation "ping". The arguments are
+ # treated as a literal document and passed to the method as a
+ # XML::LibXML object
+ sub ping : SOAP('RPCLiteral') {
+ my ( $self, $c, $xml) = @_;
+ my $name = $xml->findValue('some xpath expression');
+ }
-To install this module type the following:
+ # avaiable as "/example/world" in document context. The entire body
+ # is delivered to the method as a XML::LibXML object.
+ sub world : SOAP('DocumentLiteral') {
+ my ($self, $c, $doc) = @_;
+ }
- perl Makefile.PL
- make
- make test
- make install
+ # this is the endpoint from where the RPC operations will be
+ # dispatched. This code won't be executed at all.
+ sub index : SOAP('RPCEndpoint') {}
-DEPENDENCIES
+ABSTACT
+ Implements SOAP serving support in Catalyst.
-This module requires these other modules and libraries:
+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.
- blah blah blah
+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.
-COPYRIGHT AND LICENCE
+ 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.
-Put the correct copyright and licence information here.
+ See Catalyst::Action::SOAP::DocumentLiteral for an example.
-Copyright (C) 2007 by Daniel Ruoso
+ACCESSORS
+ Once you tagged one of the methods, you'll have an $c->stash->{soap}
+ accessor which will return an "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.
-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.
+ You can query this object as follows:
+ $c->stash->{soap}->envelope()
+ The original SOAP envelope as string.
+ $c->stash->{soap}->parsed_envelope()
+ The parsed envelope as an XML::LibXML object.
+
+ $c->stash->{soap}->arguments()
+ The arguments of a RPC call.
+
+ $c->stash->{soap}->fault({code => $code,reason => $reason, detail =>
+ $detail])
+ Allows you to set fault code and message. Optionally, you may define
+ the code itself as an arrayref where the first item will be this
+ code and the second will be the subcode, which recursively may be
+ another arrayref.
+
+ $c->stash->{soap}->encoded_return(\@data)
+ This method will prepare the return value to be a soap encoded data.
+
+ $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.
+
+ $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.
+
+ $c->stash->{soap}->string_return($non_xml_text)
+ In this case, the given text is encoded as CDATA inside the SOAP
+ message.
+
+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.
+
+SEE ALSO
+ Catalyst::Action::SOAP, XML::LibXML,
+ Catalyst::Action::SOAP::DocumentLiteral,
+ Catalyst::Action::SOAP::RPCEncoded, Catalyst::Action::SOAP::HTTPGet
+
+AUTHORS
+ Daniel Ruoso "daniel.ruoso at verticalone.pt"
+
+BUG REPORTS
+ Please submit all bugs regarding "Catalyst::Controller::SOAP" to
+ "bug-catalyst-controller-soap at rt.cpan.org"
+
+LICENSE
+ This library is free software, you can redistribute it and/or modify it
+ under the same terms as Perl itself.
+
Modified: Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/lib/Catalyst/Controller/SOAP.pm 2007-11-27 11:01:36 UTC (rev 7173)
@@ -5,7 +5,7 @@
use XML::LibXML;
use constant NS_SOAP_ENV => "http://www.w3.org/2003/05/soap-envelope";
- our $VERSION = '0.0.4';
+ our $VERSION = '0.0.6';
sub _parse_SOAP_attr {
my ($self, $c, $name, $value) = @_;
Modified: Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/Catalyst-Controller-SOAP.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,33 +1,10 @@
use Test::More tests => 2;
BEGIN { use_ok('Catalyst::Controller::SOAP') };
use Catalyst::Action::SOAP::DocumentLiteral;
-use lib qw(lib t/lib);
+use lib qw(t/lib);
use Catalyst::Test 'TestApp';
use Encode;
-#my $message = <<SOAP;
-#<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
-# <Body>World</Body>
-#</Envelope>
-#SOAP
-
-#my $response = post_soap('/ws/hello',$message);
-#my $response_content = $response->content;
-#ok($response_content =~ /Hello World/, 'Document Literal POST!');
-
my $response_content = get('/ws/foo?who=World');
ok($response_content =~ /Hello World/, 'Hello World!');
-sub post_soap {
- my $uri = shift;
- my $xml_content = shift;
- require HTTP::Request::AsCGI;
- my $request = Catalyst::Utils::request( $uri );
- $request->method('POST');
- $request->content_type('application/soap+xml');
- $request->content_encoding('utf8');
- $request->content(encode_utf8($xml_content));
- my $cgi = HTTP::Request::AsCGI->new( $request, %ENV )->setup;
- TestApp->handle_request;
- return $cgi->restore->response;
-}
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Changes
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Changes 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Changes 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,4 +0,0 @@
-This file documents the revision history for Perl extension PostApp.
-
-0.01 2007-11-14 18:25:49
- - initial revision, generated by Catalyst
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Makefile.PL
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Makefile.PL 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/Makefile.PL 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,16 +0,0 @@
-use inc::Module::Install;
-
-name 'PostApp';
-all_from 'lib/PostApp.pm';
-
-requires 'Catalyst::Runtime' => '5.7011';
-requires 'Catalyst::Plugin::ConfigLoader';
-requires 'Catalyst::Plugin::Static::Simple';
-requires 'Catalyst::Action::RenderView';
-requires 'YAML'; # This should reflect the config file format you've chosen
- # See Catalyst::Plugin::ConfigLoader for supported formats
-catalyst;
-
-install_script glob('script/*.pl');
-auto_install;
-WriteAll;
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/README
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/README 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/README 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1 +0,0 @@
-Run script/postapp_server.pl to test the application.
Modified: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/Root.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/Root.pm 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp/Controller/Root.pm 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,55 +1,10 @@
package PostApp::Controller::Root;
-
use strict;
use warnings;
use base 'Catalyst::Controller';
-
-#
-# Sets the actions in this controller to be registered with no prefix
-# so they function identically to actions created in MyApp.pm
-#
__PACKAGE__->config->{namespace} = '';
-
-=head1 NAME
-
-PostApp::Controller::Root - Root Controller for PostApp
-
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 METHODS
-
-=cut
-
-=head2 default
-
-=cut
-
sub default : Private {
my ( $self, $c ) = @_;
-
- # Hello World
- $c->response->body( $c->welcome_message );
+ $c->response->body( 'Unhandled message!' );
}
-
-=head2 end
-
-Attempt to render a view, if needed.
-
-=cut
-
-sub end : ActionClass('RenderView') {}
-
-=head1 AUTHOR
-
-Daniel Ruoso,,,
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
1;
Modified: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp.pm 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/lib/PostApp.pm 2007-11-27 11:01:36 UTC (rev 7173)
@@ -4,59 +4,9 @@
use warnings;
use Catalyst::Runtime '5.70';
-
-# Set flags and add plugins for the application
-#
-# -Debug: activates the debug mode for very useful log messages
-# ConfigLoader: will load the configuration from a YAML file in the
-# application's home directory
-# Static::Simple: will serve static files from the application's root
-# directory
-
-use Catalyst qw/-Debug ConfigLoader Static::Simple/;
-
+use Catalyst qw/ConfigLoader Static::Simple/;
our $VERSION = '0.01';
-
-# Configure the application.
-#
-# Note that settings in postapp.yml (or other external
-# configuration file that you set up manually) take precedence
-# over this when using ConfigLoader. Thus configuration
-# details given here can function as a default configuration,
-# with a external configuration file acting as an override for
-# local deployment.
-
__PACKAGE__->config( name => 'PostApp' );
-
-# Start the application
__PACKAGE__->setup;
-
-=head1 NAME
-
-PostApp - Catalyst based application
-
-=head1 SYNOPSIS
-
- script/postapp_server.pl
-
-=head1 DESCRIPTION
-
-[enter your description here]
-
-=head1 SEE ALSO
-
-L<PostApp::Controller::Root>, L<Catalyst>
-
-=head1 AUTHOR
-
-Daniel Ruoso,,,
-
-=head1 LICENSE
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
-
1;
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/favicon.ico
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_built.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_built_shadow.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_powered.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_120x50_powered_shadow.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_built.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_built_shadow.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_powered.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/btn_88x31_powered_shadow.png
===================================================================
(Binary files differ)
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/root/static/images/catalyst_logo.png
===================================================================
(Binary files differ)
Modified: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/post.pl
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/post.pl 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/post.pl 2007-11-27 11:01:36 UTC (rev 7173)
@@ -2,13 +2,11 @@
use strict;
use warnings;
-
use LWP::UserAgent;
use HTTP::Request;
use Encode;
-
my $ua = LWP::UserAgent->new();
-
+print "REQUEST: =============\n";
my $message = <<SOAP;
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body>World</Body>
@@ -19,10 +17,12 @@
$request->content_encoding('utf8');
$request->content(encode_utf8($message));
my $response = $ua->request($request);
-print "MENSAGEM 1============\n";
+print "RESPONSE: ============\n";
print $response->content;
print "======================\n";
+__END__
+
$message = <<SOAP;
<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
<Body><hello>World</hello></Body>
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_create.pl
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_create.pl 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_create.pl 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,75 +0,0 @@
-#!/usr/bin/perl -w
-
-use strict;
-use warnings;
-use Getopt::Long;
-use Pod::Usage;
-use Catalyst::Helper;
-
-my $force = 0;
-my $mech = 0;
-my $help = 0;
-
-GetOptions(
- 'nonew|force' => \$force,
- 'mech|mechanize' => \$mech,
- 'help|?' => \$help
- );
-
-pod2usage(1) if ( $help || !$ARGV[0] );
-
-my $helper = Catalyst::Helper->new( { '.newfiles' => !$force, mech => $mech } );
-
-pod2usage(1) unless $helper->mk_component( 'PostApp', @ARGV );
-
-1;
-
-=head1 NAME
-
-postapp_create.pl - Create a new Catalyst Component
-
-=head1 SYNOPSIS
-
-postapp_create.pl [options] model|view|controller name [helper] [options]
-
- Options:
- -force don't create a .new file where a file to be created exists
- -mechanize use Test::WWW::Mechanize::Catalyst for tests if available
- -help display this help and exits
-
- Examples:
- postapp_create.pl controller My::Controller
- postapp_create.pl controller My::Controller BindLex
- postapp_create.pl -mechanize controller My::Controller
- postapp_create.pl view My::View
- postapp_create.pl view MyView TT
- postapp_create.pl view TT TT
- postapp_create.pl model My::Model
- postapp_create.pl model SomeDB DBIC::Schema MyApp::Schema create=dynamic\
- dbi:SQLite:/tmp/my.db
- postapp_create.pl model AnotherDB DBIC::Schema MyApp::Schema create=static\
- dbi:Pg:dbname=foo root 4321
-
- See also:
- perldoc Catalyst::Manual
- perldoc Catalyst::Manual::Intro
-
-=head1 DESCRIPTION
-
-Create a new Catalyst Component.
-
-Existing component files are not overwritten. If any of the component files
-to be created already exist the file will be written with a '.new' suffix.
-This behavior can be suppressed with the C<-force> option.
-
-=head1 AUTHOR
-
-Sebastian Riedel, C<sri at oook.de>
-Maintained by the Catalyst Core Team.
-
-=head1 COPYRIGHT
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_fastcgi.pl
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_fastcgi.pl 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/script/postapp_fastcgi.pl 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,80 +0,0 @@
-#!/usr/bin/perl -w
-
-BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
-
-use strict;
-use warnings;
-use Getopt::Long;
-use Pod::Usage;
-use FindBin;
-use lib "$FindBin::Bin/../lib";
-use PostApp;
-
-my $help = 0;
-my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr );
-
-GetOptions(
- 'help|?' => \$help,
- 'listen|l=s' => \$listen,
- 'nproc|n=i' => \$nproc,
- 'pidfile|p=s' => \$pidfile,
- 'manager|M=s' => \$manager,
- 'daemon|d' => \$detach,
- 'keeperr|e' => \$keep_stderr,
-);
-
-pod2usage(1) if $help;
-
-PostApp->run(
- $listen,
- { nproc => $nproc,
- pidfile => $pidfile,
- manager => $manager,
- detach => $detach,
- keep_stderr => $keep_stderr,
- }
-);
-
-1;
-
-=head1 NAME
-
-postapp_fastcgi.pl - Catalyst FastCGI
-
-=head1 SYNOPSIS
-
-postapp_fastcgi.pl [options]
-
- Options:
- -? -help display this help and exits
- -l -listen Socket path to listen on
- (defaults to standard input)
- can be HOST:PORT, :PORT or a
- filesystem path
- -n -nproc specify number of processes to keep
- to serve requests (defaults to 1,
- requires -listen)
- -p -pidfile specify filename for pid file
- (requires -listen)
- -d -daemon daemonize (requires -listen)
- -M -manager specify alternate process manager
- (FCGI::ProcManager sub-class)
- or empty string to disable
- -e -keeperr send error messages to STDOUT, not
- to the webserver
-
-=head1 DESCRIPTION
-
-Run a Catalyst application as fastcgi.
-
-=head1 AUTHOR
-
-Sebastian Riedel, C<sri at oook.de>
-Maintained by the Catalyst Core Team.
-
-=head1 COPYRIGHT
-
-This library is free software, you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-=cut
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/01app.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/01app.t 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/01app.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,7 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 2;
-
-BEGIN { use_ok 'Catalyst::Test', 'PostApp' }
-
-ok( request('/')->is_success, 'Request should succeed' );
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/02pod.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/02pod.t 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/02pod.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,9 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-
-eval "use Test::Pod 1.14";
-plan skip_all => 'Test::Pod 1.14 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_files_ok();
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/03podcoverage.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/03podcoverage.t 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/03podcoverage.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,9 +0,0 @@
-use strict;
-use warnings;
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@;
-plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD};
-
-all_pod_coverage_ok();
Deleted: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/controller_WS.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/controller_WS.t 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp/t/controller_WS.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -1,10 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 3;
-
-BEGIN { use_ok 'Catalyst::Test', 'PostApp' }
-BEGIN { use_ok 'PostApp::Controller::WS' }
-
-ok( request('/ws')->is_success, 'Request should succeed' );
-
-
Added: Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t (rev 0)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/PostApp.t 2007-11-27 11:01:36 UTC (rev 7173)
@@ -0,0 +1,55 @@
+use Test::More tests => 2;
+use File::Spec::Functions;
+use HTTP::Response;
+use IPC::Open3;
+use Symbol;
+
+my $response;
+
+$response = soap_xml_post
+ ('/ws/hello',
+ '<Envelope><Body>World</Body></Envelope>'
+ );
+
+ok($response->content =~ /Hello World/, 'Document Literal correct response: '.$response->content);
+
+$response = soap_xml_post
+ ('/ws2',
+ '<Envelope><Body><hello>World</hello></Body></Envelope>'
+ );
+
+ok($response->content =~ /Hello World/, 'RPC Literal Correct response: '.$response->content);
+
+
+sub soap_xml_post {
+ my $path = shift;
+ my $content = shift;
+
+ local %ENV;
+ $ENV{REMOTE_ADDR} ='127.0.0.1';
+ $ENV{CONTENT_LENGTH} = length $content;
+ $ENV{CONTENT_TYPE} ='application/soap+xml';
+ $ENV{SCRIPT_NAME} = $path;
+ $ENV{QUERY_STRING} = '';
+ $ENV{CATALYST_DEBUG} = 0;
+ $ENV{REQUEST_METHOD} ='POST';
+ $ENV{SERVER_PORT} ='80';
+ $ENV{SERVER_NAME} ='pitombeira';
+
+ my ($writer, $reader, $error) = map { gensym() } 1..3;
+ my $pid = open3($writer, $reader, $error,
+ $^X, '-I'.catfile(qw(blib lib)), '-I'.catfile(qw(lib)), catfile(qw(t PostApp script postapp_cgi.pl)));
+
+ print {$writer} $content;
+ close $content;
+
+ my $response_str = join '', <$reader>;
+ map { warn '# '.$_ } <$error>;
+
+ close $reader;
+ close $error;
+ waitpid $pid, 0;
+ return HTTP::Response->parse($response_str);
+}
+
+1;
Modified: Catalyst-Controller-SOAP/1.0/trunk/t/lib/TestApp/Controller/Root.pm
===================================================================
--- Catalyst-Controller-SOAP/1.0/trunk/t/lib/TestApp/Controller/Root.pm 2007-11-27 10:58:24 UTC (rev 7172)
+++ Catalyst-Controller-SOAP/1.0/trunk/t/lib/TestApp/Controller/Root.pm 2007-11-27 11:01:36 UTC (rev 7173)
@@ -11,6 +11,4 @@
$c->response->body( 'default response' );
}
-sub end : ActionClass('RenderView') {}
-
1;
More information about the Catalyst-commits
mailing list