Empty String API arguments for actionwebservice received as "SOAP::Mapping::Object" instead of ""

Posted by user311985 on Stack Overflow See other posts from Stack Overflow or by user311985
Published on 2010-04-08T14:29:04Z Indexed on 2010/04/08 15:13 UTC
Read the original article Hit count: 145

Filed under:
|

I've built an API using actionwebservice and when a client calls a method to pass in an empty string (""), it's to_s value is # instead of "". But when the client passes in "hello", it's to_s value is "hello".

class UsersApiController < ApiController

  web_service_api UserApi

  def create_or_update(arg1)
    Rails.logger.info arg1.to_s # Displays "#<SOAP::Mapping::Object:0x3a89c08>" if arg1 is an empty string
  end
end

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about rails