Hello. = ) I know I'm close on this one--I can feel it. Can anyone help? I'd appreciate it a lot. Thanks, -nate Nate Imaqaguy wrote: > Hmmm¡Ä > > **If** I understand what you were trying to tell me, I **think** I > adapted your example to my code and came up with this. BTW, ¡Èparam¡É is > an int I¡Çm passing to the method. > > ---------------------------- > if results = soap.FindPatientById( param ) > then puts results.first_name > puts results.last_name > else > begin > rescue ::SOAP::FaultError => e > # rescue ::XSD::ValueSpaceError => e > puts e.to_s > end > end > ----------------------------- > > I had something pretty similar to this already. ¡Äbut it¡Çs not > working. > > The way I¡Çm doing it, I don¡Çt think I needed the ¡Èassert equal¡É > statement¡½right? The most confusing parts to me are the ¡Èrescue¡É lines. > Specifically, which one to use (I went with SOAP, but tried both) and > how you knew to put ¡ÈFaultError¡É there. > > Like I said, I¡Çm a total n00b to ruby. I haven¡Çt even tried programming > anything since my last C class about 6 years ago, so please be patient > if I¡Çm missing something obvious. > > = ) > > Thanks again, > > -nate > > > > > > Chris McMahon wrote: >> begin >> @query = @soap.apiFunction( >> {'Key'=>'Value','Key2'=>Value2'} >> ) >> #rescue ::SOAP::FaultError => e >> rescue ::XSD::ValueSpaceError => e >> assert_equal("{http://www.foo.com/api}FooBarEnum: cannot accept >> 'foo'",e.to_s) >> end >> >> Hope that helps... >> -Chris -- Posted via http://www.ruby-forum.com/.