Displaying 20 results from an estimated 10000 matches similar to: "CDATA as api_method expected parameter"
2006 May 31
2
Rails Bug when loading required files for API?
Hello,
I have seen some odd behaviour of my Web Services code plus some
''similar'' postings to this list, so I believe this may be a bug in
Rails. But I''m failry new to RoR, so maybe I''m doing something wrong.
I''ll explain:
I have a WS API defined, communicating with a remote system that
expects a stucture:
When defined like this (all
2006 Jul 24
1
XMLRPC WebService and Structs
Hi
First off, I apologise if this is covered somewhere and I just don''t
get it... I''ve looked far and wide ....
As a part of my current project I need to hook up to a particular
XMLRPC webservice that won''t be available for me to use until close
to launch date... So I am trying to recreate the webservice that
mirrors the live one so I can test my application
2007 Jun 06
0
ActionWebService API ignoring multiple return values?
I''m using ActionWebService and defining the following API method:
api_method(:validate,
:expects => [{:id => :int}, {:value => :string}],
:returns => [{:valid => :boolean}, {:error_message
=> :string}])
if I implement this method as follows:
def validate(id, value)
return true, ''no error''
end
I get the following error
2006 May 24
2
array parameters in web services
I''m working in a web service, actually, I have:
class UnifiedLoginApi < ActionWebService::API::Base
class CLL_Metadata < ActionWebService::Struct
member :key, :string
member :type, :string
member :value, :string
member :webapplication_id, :string
member :user_tenfold_id, :string
member :login_username, :string
2006 Jan 12
1
activewebservice::struct
So I''m playing with AWS. I''ve got a thing called a gallery. I''d like
to return a list of them. I can do this fine if I want to return my
ActiveRecord objects:
class WxApiApi < ActionWebService::API::Base
api_method :list_galleries,
:expects=>[{:login=>:string}],
:returns => [[Gallery]]
end
But the ActiveRecord object exposes a
2006 Nov 04
1
layere dispatching - please help!
Hi Folks,
I''m having trouble with setting up web services with layered
dispatching.
I''ve defined my controller (backend_controller.rb) as:
class BackendController < ApplicationController
web_service_dispatching_mode :layered
web_service_scaffold :invoke
web_service (:car) {CarService.new}
end
and my service (node_service.rb) as:
2005 Dec 30
5
AWS api_method :returns not accepting ActiveRecord::Base
I''m trying to use the feature of AWS where it will take an object derived
from ActiveRecord::Base instead of an AWS::Struct object. Whenever I try
it, though, I get the craziest error:
NoMethodError: You have a nil object when you didn''t expect it!
The error occured while evaluating nil.new
/usr/lib/.../actionwebservice/lib/action_web_service/casting.rb:105:in
2005 May 31
2
Rails Web Services
This deals with the Rails book, but ActionWebService in general.
I''m having trouble getting the Rails book''s example in the Web Service
chapter working. Everything else works (all the ''depot'' site features up
to that point have been built and work). I don''t think it''s an issue
with the book code being wrong, because the ActionWebService API
2006 May 08
0
Including common code among multiple web services issue?
Hi all -
I''m implementing some web services and every one has at the very least a
"find_newer_than" method.
In my models, I''ve split things up like this and it works great.
----------------------------------------------------------------------------------
class XyzService < WebService
web_service_api XyzApi
.... service specific methods go here...
end
class
2006 Jul 22
0
multiple return values in action web service
Hi all,
Does anyone have any advice about returning multiple values from an
ActionWebService? That is, I''d like to implement something like the
following.
api_method :do_something,
:expects => [{:id => :string}],
:returns => [{:return_code => :int},
{:return_text => :string}]
The easy way to do it would be to
2006 Jan 11
1
HELP!! - ActiveRecord derivates in AWS :expects method
Hi,
I have a strange problem while using WebService API which expects an
ActiveRecord derivate.
This is the code of the API ...
------
class HarvesterApi < ActionWebService::API::Base
api_method :send_measurand,
:expects => [{:measurand => Measurand}, {:eaiSystemName =>
:string}]
end
------
... and this of my Model
------
class Measurand < ActiveRecord::Base
2006 Aug 14
1
various returns parameters in action web service
I''m working with ActionWebService, building a SOAP Service.
I realize that I can returns various values, in example:
api_method :foo,
:expects [ { :value1 => :int },
{ :value2 => :int } ],
:returns [ { :return_value_1 => :int},
{ :return_value_2 => :string},
{ :return_value_3 =>
2006 Jun 15
2
AWS Client - There has to be a better way
I''m working on building a SOAP client with AWS, i.e:
class PersonAPI < ActionWebService::API::Base
api_method :find_all, :returns => [[Person]]
end
soap_client = ActionWebService::Client::Soap.new(PersonAPI,
"http://...")
persons = soap_client.find_all
This works well but I think it breaks down quickly when you try to do
real world work. Lets take a moderately
2006 Jan 31
0
webservice problem (cant make client)
hey, i have made a webservice
http://twodecode.pilot.localhost.be:3000/backend/wsdl
here i can see the wsdl file
i have a method string Authenticate(string twa, string login, string pass)
when i do /invoke i can test it, this all works
backend_api.rb
class BackendApi < ActionWebService::API::Base
api_method :authenticate,
:expects => [{:twa =>:string},{:login
2006 Mar 28
11
ActionWebService date casting error
I have defined a web service to return information from a database as follows.
class BackendApi < ActionWebService::API::Base
api_method :find_all_vobs,
:returns => [[:int]]
api_method :find_vob_by_id,
:expects => [:int],
:returns => [Vob]
class BackendController < ApplicationController
wsdl_service_name ''Backend''
2007 Oct 10
1
rxml cdata problem!!!!!
source)
xml.list {xml.cdata! "test"}
result)
<list>
<![CDATA[test]]>
</list>
but I want to
<list><![CDATA[test]]></list>
(because firefox don''t understand first result)
how to?????
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2010 Oct 31
0
Loading xml document using Nokogiri and retrieving CDATA element
This is an extension of my last post (problems with REXML) which has me
looking to Nokogiri again. The reason I am not using Nokogiri is I can not
seem to find a way to get CDATA out of a Nokogiri document.
First, can you tell me if I am loading my document correctly, because when I
call my_document.to_xml, I only get one line back:
(rdb:1) test_file = Nokogiri::XML(mismo_xml_file)
2006 May 31
0
web service parameters
Can I return an structure array from a web service in rails?
I have this:
class CLL_Metadata < ActionWebService::Struct
member :key, :string
member :type, :string
end
and I want to do this:
class UnifiedLoginApi < ActionWebService::API::Base
api_method :GetMetadata,
:returns => [ [CLL_ Metadata] ]
but when I do:
2006 Jun 07
0
Logger in ActionWebService::Base?
I''d like to split up my directly dispatched controller into a layered
dispatch setup with one controller and two services derived from
ActionWebService::Base. However, in doing this I found that logger is
not a class_variable of AWS::Base. This kind of scares me away from
using the layered dispatch mode, as I''d like to have logging in the
method implementations. Is there a clean
2008 May 07
1
uninitialized constant HelloadminController::HelloApi
I have built up a simple allication for web service interaction. But the
following error message occured:
uninitialized constant HelloadminController::HelloApi
service api
class HelloApi < ActionWebService::API::Base
api_method :getMsg, :expects => [:name=>:string], :returns =>
[:string]
end
service controller
class HelloController < ApplicationController