Commit Graph

52 Commits

Author SHA1 Message Date
Kent Sibilev
abe8fa73a9 Added support for decimal types. Closes #6676.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5670 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-12-03 20:30:34 +00:00
Kent Sibilev
98a9b65218 Removed deprecated end_form_tag helper.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-31 03:13:28 +00:00
Kent Sibilev
f1d1f01b6d Removed deprecated @request and @response usages.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-10-01 15:46:00 +00:00
Jeremy Kemper
be54075956 set ActiveSupport::Deprecation.debug = true to see backtraces for deprecation callers. off by default. on for Rails tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 03:38:13 +00:00
Kent Sibilev
9b18c1cb57 Shouldn't use deprecated stuff
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4957 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 23:55:12 +00:00
Kent Sibilev
b5521a2651 ActionWebService WSDL generation ignores HTTP_X_FORWARDED_HOST
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4891 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-01 02:18:52 +00:00
Jeremy Kemper
12ff554cd4 Tighten rescue clauses. Closes #5985.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4885 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-31 03:16:28 +00:00
Kent Sibilev
d37604f03e Fixed XMLRPC multicall when one of the called methods returns a struct object.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4810 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-23 09:34:46 +00:00
David Heinemeier Hansson
461dce13ae Fix AWS tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4761 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-14 23:14:08 +00:00
Marcel Molina
68a320ad20 Fix invoke_layered since api_method didn't declare :expects. Closes #4720. [Kevin Ballard <kevin@sb.org>, Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4497 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-27 19:41:14 +00:00
Marcel Molina
df26041c89 Fix test database name typo. [Marcel Molina Jr.]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-29 18:02:37 +00:00
David Heinemeier Hansson
f2790d0390 invoke / invoke_delegated / invoke_layered check for correct number of args (closes #4610) [jerrett@bravenet.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-04-06 02:52:01 +00:00
David Heinemeier Hansson
c4f1979db5 Make ActiveWebService::Struct type reloadable. Fix scaffolding action when one of the members of a structural type has date or time type. Remove extra index hash when generating scaffold html for parameters of structural type (closes #4374) [joe@mjg2.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4054 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-26 21:26:13 +00:00
David Heinemeier Hansson
4a968d464b Fixed that AWS Scaffold Fails with Struct as a Parameter (closes #4363) [joe@mjg2.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4017 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-23 16:07:03 +00:00
David Heinemeier Hansson
d4b27a0b36 Fix soap type registration of multidimensional arrays (closes #4232) [Kent]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-17 22:20:09 +00:00
David Heinemeier Hansson
9ed7430b94 Fixed test
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3752 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-03 05:59:04 +00:00
David Heinemeier Hansson
3d4965765c Fix a ton of issues with AWS (yes, Kent saved it from being unbundled in 1.1) #4038 [Kent Sibilev]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3750 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-03 03:19:37 +00:00
Leon Breedt
98ae24b967 Fix that XML-RPC date/time values did not have well-defined behaviour (#2516, #2534). This fix has one caveat, in that we can't support pre-1970 dates from XML-RPC clients.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2945 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-09 05:29:08 +00:00
Leon Breedt
fbba128f73 special-case non-existent target method handling for 'system.multicall' calls when the
method does not exist, to conform to the RFC and return the error inline in the multicall response.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2023 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-16 05:54:12 +00:00
Leon Breedt
9d79880e81 add 'system.multicall' support to XML-RPC. boxcarred methods must still exist
on the target service(s), value casting will still be performed, and recursive
'system.multicall' calls are not allowed.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2021 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-16 05:45:03 +00:00
Leon Breedt
b7f3751ce0 make sure that we get back a SOAPString when $KCODE is UTF-8
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1823 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-13 06:25:45 +00:00
Leon Breedt
dfc422b784 always send back SOAP responses as UTF-8, we can't guarantee that SOAP4R
supports any encoding sent by caller.

add documentation describing how to ensure :string types don't get converted
into :base64 by SOAP4R when containing non-ASCII chars and $KCODE is not set
to a value.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-13 06:05:13 +00:00
Leon Breedt
d01c44d550 fix bug in unit test causing spurious failures, and make sure the
unit test requires the Rails libraries from *Source Control* first, or
we'll get false positives. add ActiveRecord require to abstract_unit.rb.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 21:50:27 +00:00
Leon Breedt
ebb6fb0928 fix WSDL generation, change the way protocols are instantiated, and add
the ability to override the namespace used in WSDL instead of always forcing
'urn:ActionWebService'


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1501 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-25 06:27:39 +00:00
Leon Breedt
887e67c80e Fix moduled controller URLs in WSDL, and add unit test to verify the generated URL.
See ticket #1428.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1408 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-13 02:58:44 +00:00
Leon Breedt
979880dd24 add test to ensure the bug fixed by [1295] can't occur again.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1296 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-08 19:58:15 +00:00
Leon Breedt
884fd4792d support using invocation filters in :direct controllers as well, for
consistency. action pack filters don't necessarily include enough information
about the request since they occur before AWS actually sees the request and
unpacks it.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1294 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-07 23:49:45 +00:00
Leon Breedt
47a7084b94 add base64 signature type (thanks, Shugo Maeda!)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1293 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-07 22:57:08 +00:00
Leon Breedt
421045e2ff remove usages of @request, @response, @params, and replace with #request, #response, #params,
except for test_invoke (values come from the test case) and one scaffold RHTML template.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1287 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-05 16:59:07 +00:00
Leon Breedt
a080b1a231 add support for structured types as input parameters to scaffolding,
fixes scaffolding for APIs like metaWeblog that require an input
struct (by dropping structs in nested <ul> lists).


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1265 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-01 05:07:37 +00:00
Leon Breedt
8694a79bb2 default to using UTF-8 as response encoding for SOAP if none is
supplied, but if an encoding is supplied by caller, use that for the
response instead (NAKAMURA Hiroshi)


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1245 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-28 17:55:34 +00:00
Leon Breedt
3cf461323c Fix regression where nil values were incorrectly being cast into the
default values for their base types.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-19 19:00:06 +00:00
Leon Breedt
c11cc309fa add backwards compatibility for the public API change made to #api_methods, as it is
being used in some apps.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-17 17:20:44 +00:00
Leon Breedt
7f32666924 Remove a cause of casting failure for XML-RPC by ignoring structure members not
defined in the target type, and perform more sanity checks to make more obvious
what the resolution should be when neglecting to provide a valid signature or
failing to attach an API to a service implementation class.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-16 19:29:42 +00:00
Leon Breedt
1155ea0aa3 initial go at making :layered dispatching generate WSDL for SOAP, and have
:layered process SOAP method calls correctly as well, may be unstable


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1097 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-05 21:37:48 +00:00
Leon Breedt
9b42cd8cc1 add API::Method#expects_to_hash convenience as well
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1092 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-05 16:00:28 +00:00
Leon Breedt
7a5bac1de0 add API::Method#expects_index_of helper to get the index of
a named parameter


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-05 15:41:04 +00:00
Leon Breedt
d7a7d85dbd * Fix casting of nested members in structured types if we have a signature
type available for it even if they are already of the desired type as
   SOAP/XML-RPC unmarshaling may have gotten it wrong: SOAP likes to always
   use DateTime no matter what, for example, whereas we allow a distinction
   between Date, DateTime and Time in the signature for convenience casting
 * Fix raising of exceptions by test_invoke so functional tests fail properly on exception
   instead of returning the exception object
 * Fix Struct#each_pair to yield the value and not the member type


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-04 22:58:02 +00:00
Leon Breedt
aaea48fe98 * collapse 'ws' back into protocols, it just added complexity and indirection, and was hard to extend.
* extract casting into seperate support file
* ensure casting always does the right thing for return values, should fix interoperability issues with Ecto and possibly other XML-RPC clients
* add functional unit tests for scaffolding
* represent signature items with classes instead of symbols/Class objects, much more flexible
* tweak logging to always show casted versions of parameters and return values, if possible.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1072 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-02 21:03:36 +00:00
Leon Breedt
b94bd32f31 first pass of web service scaffolding. add ability to quickly generate an
action pack request for a protocol, add missing log_error when we fail to parse
protocol messages. add RDoc for scaffolding and functional testing.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-29 12:31:39 +00:00
Leon Breedt
594063f23c generalize casting code to be used by both SOAP and XML-RPC (previously only XML-RPC). switch
to better model for API methods, and improve the ability to generate protocol requests/response,
will be required by upcoming scaffolding.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-28 03:20:13 +00:00
Leon Breedt
8032c4ffd4 allow direct dispatching methods to declare their parameters as well, for brevity's sake, it seems
to be counter-intuitive not to do so (closes #939). update gem require versions.
fix unit tests for exception de-shallowing changes.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-26 00:20:19 +00:00
Leon Breedt
4f2f408ba1 allow 0, 1, '0' or '1' to be cast to the appropriate values for boolean
values.

update XML-RPC example to work in :layered mode.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-10 11:53:29 +00:00
Leon Breedt
d43392a50b add action_web_service/test_invoke, will be used by for testing APIs in
a Rails project instance.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@830 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-04 10:07:53 +00:00
Leon Breedt
6b93952ae6 add allow_active_record_expects option to ActionWebService::API::Base,
but set the default to false so people don't use it without thinking about
the consequences.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@815 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-28 22:42:24 +00:00
Leon Breedt
100015cd80 Make all custom types and method calls are declared in the 'urn:ActionWebService'
namespace as a default, fixes SOAP marshaling for .NET, a regression since the merge.

Make array annotation be recursive in WS::Marshaling::SoapMarshaling, this makes
typed arrays buried in nested structures still be annotated correctly.

Support :layered dispatching mode for XML-RPC namespaced method names.

Change WS::ParamInfo.create signature to require type_binding, and update all
uses of this.

Restore #default_api_method functionality, fixes a regression since the merge.

Fix marshalling of ActiveRecord::Base derivatives, fixes a regression since the merge.

This changeset closes #676, #677, and #678.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-27 21:21:40 +00:00
Leon Breedt
6f5a7b2004 merged the changes for the upcoming 0.6.0:
seperate out protocol marshaling into a small 'ws' library in vendor, so that
AWS itself only does integration with ActionPack, and so we can keep protocol
specific code in AWS proper to a minimum. refactor unit tests to get 95%
code coverage (for a baseline).

be far more relaxed about the types given to us by the remote side, don't do
any poor man's type checking, just try to cast and marshal to the correct types if
possible, and if not, return what they gave us anyway. this should make interoperating
with fuzzy XML-RPC clients easier.

if exception reporting is turned on, do best-effort error responses, so that
we can avoid "Internal protocol error" with no details if there is a bug in
AWS itself.

also perform extensive cleanups on AWS proper.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@800 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-25 23:39:39 +00:00
Leon Breedt
6a7fc51c66 add code coverage testing scripts, remove dead code
detected by said scripts


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@708 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-20 01:07:54 +00:00
Leon Breedt
5f3f44e76f ensure clients can handle APIs with named parameter signatures,
and test for this


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@680 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-19 09:07:35 +00:00
Leon Breedt
418d487020 refactoring:
* move dispatching out of the Container into Dispatcher, it makes more sense
    for Container to only contain the list of web services defined
    in it.

  * collapse Wsdl and ActionController "routers" into
    an ActionController-specific module, no advantage
    to having them seperate as they were quite tightly
    coupled. rename to Dispatcher, to avoi
    confusion with Routing.

  * add a "_thing" suffix to concept-specific filenames. this is so that
    we don't end up with many soap.rb files, for example.

  * remove "virtual invocation" support. adds complexity, and it doesn't
    seem to add any value.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@679 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-19 08:29:42 +00:00