| 1 | package W3C::SOAP::WADL::Utils; | ||
| 2 | |||
| 3 | # Created on: 2013-06-27 17:13:29 | ||
| 4 | # Create by: Ivan Wills | ||
| 5 | # $Id$ | ||
| 6 | # $Revision$, $HeadURL$, $Date$ | ||
| 7 | # $Revision$, $Source$, $Date$ | ||
| 8 | |||
| 9 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 1 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | 1 | ▶ | use version; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | 1 | ▶ | use Scalar::Util; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 1 | ▶ | use List::Util; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | 1 | ▶ | use Data::Dumper qw/Dumper/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | 1 | ▶ | use English qw/ -no_match_vars /; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 1 | ▶ | use W3C::SOAP::WADL::Meta::Method; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | |||
| 19 | 1 | Moose::Exporter->setup_import_methods( | |
| 20 | with_meta => ['operation'], | ||
| 21 | ); | ||
| 22 | |||
| 23 | 1 | our $VERSION = version->new('0.006'); | |
| 24 | |||
| 25 | sub operation { | ||
| 26 | 0 | ▶ | my ( $meta, $name, %options ) = @_; |
|
Subroutine
operation: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 27 | $meta->add_method( | ||
| 28 | $name, | ||
| 29 | W3C::SOAP::WADL::Meta::Method->wrap( | ||
| 30 | 0 | ▶ | body => sub { shift->_request($name => @_) }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 31 | 0 | package_name => $meta->name, | |
| 32 | name => $name, | ||
| 33 | %options, | ||
| 34 | ) | ||
| 35 | ); | ||
| 36 | 0 | return; | |
| 37 | } | ||
| 38 | |||
| 39 | 1 | 1; | |
| 40 | |||
| 41 | __END__ | ||
| 42 | |||
| 43 | =head1 NAME | ||
| 44 | |||
| 45 | W3C::SOAP::WADL::Utils - WADL related utilities | ||
| 46 | |||
| 47 | =head1 VERSION | ||
| 48 | |||
| 49 | This documentation refers to W3C::SOAP::WADL::Utils version 0.006 | ||
| 50 | |||
| 51 | |||
| 52 | =head1 SYNOPSIS | ||
| 53 | |||
| 54 | use W3C::SOAP::WADL::Utils; | ||
| 55 | |||
| 56 | # In a WADL package to generate an operation method: | ||
| 57 | operation wsdl_op => ( | ||
| 58 | wsdl_operation => 'WsdlOp', | ||
| 59 | in_class +> 'MyApp::Some::XSD', | ||
| 60 | in_attribute +> 'wsdl_op_request', | ||
| 61 | out_class +> 'MyApp::Some::XSD', | ||
| 62 | out_attribute +> 'wsdl_op_response', | ||
| 63 | ); | ||
| 64 | |||
| 65 | =head1 DESCRIPTION | ||
| 66 | |||
| 67 | =head1 SUBROUTINES/METHODS | ||
| 68 | |||
| 69 | =head1 MOOSE HELPERS | ||
| 70 | |||
| 71 | =over 4 | ||
| 72 | |||
| 73 | =item C<operation ($name, %optisns)> | ||
| 74 | |||
| 75 | Generates a SOAP operation method with the name C<$name> | ||
| 76 | |||
| 77 | The options are: | ||
| 78 | |||
| 79 | =over 4 | ||
| 80 | |||
| 81 | =item C<wsdl_operation> | ||
| 82 | |||
| 83 | The name of the operation from the WADL | ||
| 84 | |||
| 85 | =item C<in_class> | ||
| 86 | |||
| 87 | The name of the XSD generated module that the inputs should be made against | ||
| 88 | |||
| 89 | =item C<in_attribute> | ||
| 90 | |||
| 91 | The particular element form the C<in_class> XSD | ||
| 92 | |||
| 93 | =item C<out_class> | ||
| 94 | |||
| 95 | The name of the XSD generated module that the outputs should be passed to | ||
| 96 | |||
| 97 | =item C<out_attribute> | ||
| 98 | |||
| 99 | The particular element form the C<out_class> XSD that contains the results. | ||
| 100 | |||
| 101 | =back | ||
| 102 | |||
| 103 | =back | ||
| 104 | |||
| 105 | =head1 DIAGNOSTICS | ||
| 106 | |||
| 107 | =head1 CONFIGURATION AND ENVIRONMENT | ||
| 108 | |||
| 109 | =head1 DEPENDENCIES | ||
| 110 | |||
| 111 | =head1 INCOMPATIBILITIES | ||
| 112 | |||
| 113 | There are no known bugs in this module. | ||
| 114 | |||
| 115 | Please report problems to Ivan Wills (ivan.wills@gmail.com). | ||
| 116 | |||
| 117 | Patches are welcome. | ||
| 118 | |||
| 119 | =head1 AUTHOR | ||
| 120 | |||
| 121 | Ivan Wills - (ivan.wills@gmail.com) | ||
| 122 | |||
| 123 | =head1 LICENSE AND COPYRIGHT | ||
| 124 | |||
| 125 | Copyright (c) 2013 Ivan Wills (14 Mullion Close, Hornsby Heights, NSW Australia 2077). | ||
| 126 | All rights reserved. | ||
| 127 | |||
| 128 | This module is free software; you can redistribute it and/or modify it under | ||
| 129 | the same terms as Perl itself. See L<perlartistic>. This program is | ||
| 130 | distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; | ||
| 131 | without even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
| 132 | PARTICULAR PURPOSE. | ||
| 133 | |||
| 134 | =cut | ||