invalid date

Hi!!

Somebody knows why throws me an exception??

invalid date
C:/Ruby/lib/ruby/1.8/date.rb:1482:in `civil'
C:/Ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.4/lib/active_support/
core_ext/string/conversions.rb:23:in
`to_datetime'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/datatypes.rb:
579:in
`screen_data'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/datatypes.rb:
141:in
`set'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/datatypes.rb:
158:in
`init'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/xsd/datatypes.rb:
670:in
`initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:53:in
`initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:93:in
`initialize'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:33:in
`new'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:33:in
`to_data'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
registry.rb:284:in
`base2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:303:in
`elesoapchild2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:280:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:
738:in
`each'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:277:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:250:in
`elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:232:in
`any2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:305:in
`elesoapchild2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:280:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:
738:in
`each'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:277:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:250:in
`elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:232:in
`any2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:305:in
`elesoapchild2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:280:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:
738:in
`each'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:277:in
`add_elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:250:in
`elesoap2stubobj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:232:in
`any2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
literalregistry.rb:53:in
`soap2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:150:in
`_soap2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:65:in
`soap2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:592:in
`protect_mapping'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:565:in
`protect_threadvars'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:581:in
`protect_mapping'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/mapping/
mapping.rb:64:in
`soap2obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
568:in
`response_doc_lit'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:
232:in
`collect'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/baseData.rb:
618:in
`each'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
567:in
`collect'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
567:in
`response_doc_lit'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
533:in
`response_doc'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
425:in
`response_obj'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/proxy.rb:
157:in
`call'
C:/Ruby/lib/ruby/gems/1.8/gems/soap4r-1.5.8/lib/soap/rpc/driver.rb:
181:in
`call'
(eval):6:in `directoryOfAgentsByCity'
C:/Users/usuario/Desktop/Servidor/servidor3/app/controllers/
enterprise_controller.rb:727:in
`get_agent_by_city'

The clue's in the error message... what's going on at line 727 (! not
so skinny-controller) of the enterprise controller?

maybe you in windows right?
it was happening with me on windows ... so i loaded an linux
virtualbox and all works fine...
till now i didnt found any solution to make it works in windows...
if you find please tellme

Humberto Ribeiro wrote in post #964474:

maybe you in windows right?
it was happening with me on windows ... so i loaded an linux
virtualbox and all works fine...
till now i didnt found any solution to make it works in windows...
if you find please tellme

It didn´t work...We also tried updating Ruby to 1.8.7 also not
working...

Sounds to me like the soap response ruby is trying to parse for you
contains an invalid date (eg Februrary 31st). Have you tried looking
at the soap response before ruby parses it?

Fred

Frederick Cheung wrote in post #965072:

Hi!!

Somebody knows why throws me an exception??

Sounds to me like the soap response ruby is trying to parse for you
contains an invalid date (eg Februrary 31st). Have you tried looking
at the soap response before ruby parses it?

Fred

Fred,

The response is correctly formed, I meant XML file, the problem looks
like it is after that, But we don´t know where..

Here I attach XML request and response... of the two API that are
linked.. the second one is the one that I said that is responding
correctly.

Attachments:
http://www.ruby-forum.com/attachment/5491/XML_MG.doc

Frederick Cheung wrote in post #965072:

>> Hi!!

>> Somebody knows why throws me an exception??

> Sounds to me like the soap response ruby is trying to parse for you
> contains an invalid date (eg Februrary 31st). Have you tried looking
> at the soap response before ruby parses it?

> Fred

Fred,

The response is correctly formed, I meant XML file, the problem looks
like it is after that, But we don´t know where..

Here I attach XML request and response... of the two API that are
linked.. the second one is the one that I said that is responding
correctly.

I'd try and work out which datetime string isn't being parsed
correctly (try sticking a breakpoint in the method that's blowing up
or hack it to print what it's trying to convert first). For example
things would probably blow up if it tried to convert stuff like
'09:00:00' to a datetime

Fred