[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

SOAP4R throws exception on copyright character

Brian Marick

11/8/2003 8:58:00 PM

Lots of web pages contain copyright characters (not © but
something that displays in Mozilla view source as the copyright symbol,
in emacs as a square box, and probably says to the world "Hi! I'm an
HTML file that was created with Word."). SOAP4r is unhappy with that
character, as you can see in this use of the googleSearch sample:

% ruby wsdlDriver.rb 'Mark Swanson'
/usr/local/lib/ruby/1.8/xsd/datatypes.rb:184:in `_set':
{http://www.w3.org/2001...}string: cannot accept 'Artwork by
<b>Mark</b> <b>Swanson</b> Copyright © 2002 <b>Mark</b>
<b>Swanson</b>. All rights reserved. '. (XSD::ValueSpaceError)
from /usr/local/lib/ruby/1.8/xsd/datatypes.rb:125:in `set'
from /usr/local/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:446:in
`decode_textbuf'
from /usr/local/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:223:in
`decode_tag_end'

In contrast, the Java version that comes with the Google API download
prints the peculiar character.

This is easy for me to work around, just comment out the check in
XSDString#_set:

def _set(value)
unless XSD::Charset.is_ces(value, XSD::Charset.encoding)
raise ValueSpaceError.new("#{ type }: cannot accept '#{ value
}'.")
end
@data = value
end

My questions:
1) Is there a better workaround?
Or something I'm misunderstanding?
2) Is this behavior something that
should be changed in SOAP4r?
3) Is Google in error in delivering
that character in that type of string?

I am using ruby 1.8.1-preview2 and the code from soap4r-1_5_1.

-----
Brian Marick
Consulting, training, contracting, and research
Focused on the intersection of testing, programming, and design
marick@testing.com, marick@visibleworkings.com
www.testing.com, www.visibleworkings.com


13 Answers

NAKAMURA, Hiroshi

11/9/2003 12:49:00 AM

0

Hi, good morning from far east.

> From: "Brian Marick" <marick@testing.com>
> Sent: Sunday, November 09, 2003 5:57 AM

> % ruby wsdlDriver.rb 'Mark Swanson'
> /usr/local/lib/ruby/1.8/xsd/datatypes.rb:184:in `_set':
> {http://www.w3.org/2001...}string: cannot accept 'Artwork by
> <b>Mark</b> <b>Swanson</b> Copyright © 2002 <b>Mark</b>
> <b>Swanson</b>. All rights reserved. '. (XSD::ValueSpaceError)
> from /usr/local/lib/ruby/1.8/xsd/datatypes.rb:125:in `set'
> from /usr/local/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:446:in
> `decode_textbuf'
> from /usr/local/lib/ruby/1.8/soap/encodingstyle/soapHandler.rb:223:in
> `decode_tag_end'

GoogleAPI returns "\xc2\xa9" sequence in utf-8 format. Can you try this?
$ ruby -Ku wsdlDriver.rb 'Mark Swanson Copyright Artwork'

There may be another reason (no iconv?) though... I cannot reproduce
the same error on my linux/cygwin boxes even though I run the
wsdlDriver.rb with "-Kn".

Beside this, I should add '$KCODE = "UTF8"' at the head of the
wsdlDriver.rb.

Regards,
// NaHi


Dan

3/4/2009 4:38:00 PM

0

Speeders & Drunk Drivers are MURDERERS wrote:
> Jeff George <antichrist@heaven.com> wrote in
> news:Xns9BC469023D513george666comcastnet@62.141.42.83:
>
>> "Speeders & Drunk Drivers are MURDERERS" <xeton2001@yahoo.com> wrote
>> in news:Xns9BC3D000F91ABriemann1850yahoocom@216.168.3.70:
>>
>>> Pilot had a chance to land at the coastal base and chose to cowboy it
>>> and land at the base in the residential area.!! He should be charged
>>> w manslaughter but nothing will be done to him. Notice the USMC
>>> still refuses to release his name!!!
>>
>> Why the fuck didn't his superiors order to land at the Navy base?
>> Fucking retards.
>>
>>
>
> What really rankles me is the pilot ejected and escaped unscathed!! He
> should have stayed w the plane and steered it between the houses. He's a
> monster and belongs in the brig for the rest of his life but that won't
> happen. I doubt if they do anything to him.

Have you seen the area where he hit? Even if he had stayed with the
aircraft as you suggest and hit between houses the odds are someone
would have been hurt or killed and he would have thrown his life away.

You never have explained how the pilot was supposed to steer the
airplane with no electrical or hydraulic power. In case you hadn't
noticed with no running engines there's no electrical power besides
battery, on aircraft so equipped, and definitely no hydraulics.

I have the feeling you'd find fault with the pilot even if he had
ridden it in to his death and no one on the ground was hurt.

Dan, U.S. Air Force, retired

Billzz

3/4/2009 5:32:00 PM

0


"Dan" <B2431B@aol.com> wrote in message
news:18yrl.108704$6r1.76169@newsfe19.iad...
> Speeders & Drunk Drivers are MURDERERS wrote:
>> Jeff George <antichrist@heaven.com> wrote in
>> news:Xns9BC469023D513george666comcastnet@62.141.42.83:
>>> "Speeders & Drunk Drivers are MURDERERS" <xeton2001@yahoo.com> wrote
>>> in news:Xns9BC3D000F91ABriemann1850yahoocom@216.168.3.70:
>>>> Pilot had a chance to land at the coastal base and chose to cowboy it
>>>> and land at the base in the residential area.!! He should be charged
>>>> w manslaughter but nothing will be done to him. Notice the USMC
>>>> still refuses to release his name!!!
>>> Why the fuck didn't his superiors order to land at the Navy base?
>>> Fucking retards.
>>>
>>>
>>
>> What really rankles me is the pilot ejected and escaped unscathed!! He
>> should have stayed w the plane and steered it between the houses. He's a
>> monster and belongs in the brig for the rest of his life but that won't
>> happen. I doubt if they do anything to him.
>
> Have you seen the area where he hit? Even if he had stayed with the
> aircraft as you suggest and hit between houses the odds are someone would
> have been hurt or killed and he would have thrown his life away.
>
> You never have explained how the pilot was supposed to steer the
> airplane with no electrical or hydraulic power. In case you hadn't noticed
> with no running engines there's no electrical power besides battery, on
> aircraft so equipped, and definitely no hydraulics.
>
> I have the feeling you'd find fault with the pilot even if he had ridden
> it in to his death and no one on the ground was hurt.
>
> Dan, U.S. Air Force, retired

Just put "Speeders & Drunk Drivers are MURDERERS" in the plonk file. He
just writes anti-everything things, and has no knowledge of anything.

Bill, US Army, retired


Dan

3/4/2009 8:28:00 PM

0

Billzz wrote:
> "Dan" <B2431B@aol.com> wrote in message
> news:18yrl.108704$6r1.76169@newsfe19.iad...
>> Speeders & Drunk Drivers are MURDERERS wrote:
>>> Jeff George <antichrist@heaven.com> wrote in
>>> news:Xns9BC469023D513george666comcastnet@62.141.42.83:
>>>> "Speeders & Drunk Drivers are MURDERERS" <xeton2001@yahoo.com> wrote
>>>> in news:Xns9BC3D000F91ABriemann1850yahoocom@216.168.3.70:
>>>>> Pilot had a chance to land at the coastal base and chose to cowboy it
>>>>> and land at the base in the residential area.!! He should be charged
>>>>> w manslaughter but nothing will be done to him. Notice the USMC
>>>>> still refuses to release his name!!!
>>>> Why the fuck didn't his superiors order to land at the Navy base?
>>>> Fucking retards.
>>>>
>>>>
>>> What really rankles me is the pilot ejected and escaped unscathed!! He
>>> should have stayed w the plane and steered it between the houses. He's a
>>> monster and belongs in the brig for the rest of his life but that won't
>>> happen. I doubt if they do anything to him.
>> Have you seen the area where he hit? Even if he had stayed with the
>> aircraft as you suggest and hit between houses the odds are someone would
>> have been hurt or killed and he would have thrown his life away.
>>
>> You never have explained how the pilot was supposed to steer the
>> airplane with no electrical or hydraulic power. In case you hadn't noticed
>> with no running engines there's no electrical power besides battery, on
>> aircraft so equipped, and definitely no hydraulics.
>>
>> I have the feeling you'd find fault with the pilot even if he had ridden
>> it in to his death and no one on the ground was hurt.
>>
>> Dan, U.S. Air Force, retired
>
> Just put "Speeders & Drunk Drivers are MURDERERS" in the plonk file. He
> just writes anti-everything things, and has no knowledge of anything.
>
> Bill, US Army, retired
>
>

I probably should do that.

Dan, U.S. Air Force, retired

Dave Heil

3/4/2009 10:03:00 PM

0

Speeders & Drunk Drivers are MURDERERS wrote:
> Jeff George <antichrist@heaven.com> wrote in
> news:Xns9BC469023D513george666comcastnet@62.141.42.83:
>
>> "Speeders & Drunk Drivers are MURDERERS" <xeton2001@yahoo.com> wrote
>> in news:Xns9BC3D000F91ABriemann1850yahoocom@216.168.3.70:
>>
>>> Pilot had a chance to land at the coastal base and chose to cowboy it
>>> and land at the base in the residential area.!! He should be charged
>>> w manslaughter but nothing will be done to him. Notice the USMC
>>> still refuses to release his name!!!
>>

>
> What really rankles me is the pilot ejected and escaped unscathed!! He
> should have stayed w the plane and steered it between the houses. He's a
> monster and belongs in the brig for the rest of his life but that won't
> happen. I doubt if they do anything to him.

You're a fool. You keep braying and don't give your neurons time to do
any thinking.

Dave Heil

Speeders & Drunk Drivers are MURDERERS

3/5/2009 2:52:00 AM

0

Paulie Walnutts <hoofhearted07@yahoo.com> wrote in
news:e00274c3-b248-4d45-8b28-39b42fea0a15@w34g2000yqm.googlegroups.com:

> On Mar 4, 9:51?am, "Speeders & Drunk Drivers are MURDERERS"
> <xeton2...@yahoo.com> wrote:

>>
>> What really rankles me is the pilot ejected and escaped unscathed!!
>> ?He should have stayed w the plane and steered it between the houses.
>> ?He's
> a
>> monster and belongs in the brig for the rest of his life but that
>> won't happen. I doubt if they do anything to him.
>
> You obviously have never flown anything more than a kite. When an
> airplane decides it's time to stop flying the pilot becomes just
> another passenger. How well does an F-18 fly with no power?? Whats the
> glide ratio 1:1??
>


Hey stupid. Did the wings fall off while the pilot was still in the jet??.
He could have stayed with the jet and avoided the houses but this monster
decided to save his own butt even though that meant killing innocent
people.

Dan

3/5/2009 3:14:00 AM

0

Speeders & Drunk Drivers are MURDERERS wrote:
> Paulie Walnutts <hoofhearted07@yahoo.com> wrote in
> news:e00274c3-b248-4d45-8b28-39b42fea0a15@w34g2000yqm.googlegroups.com:
>
>> On Mar 4, 9:51 am, "Speeders & Drunk Drivers are MURDERERS"
>> <xeton2...@yahoo.com> wrote:
>
>>> What really rankles me is the pilot ejected and escaped unscathed!!
>>> He should have stayed w the plane and steered it between the houses.
>>> He's
>> a
>>> monster and belongs in the brig for the rest of his life but that
>>> won't happen. I doubt if they do anything to him.
>> You obviously have never flown anything more than a kite. When an
>> airplane decides it's time to stop flying the pilot becomes just
>> another passenger. How well does an F-18 fly with no power?? Whats the
>> glide ratio 1:1??
>>
>
>
> Hey stupid. Did the wings fall off while the pilot was still in the jet??.
> He could have stayed with the jet and avoided the houses but this monster
> decided to save his own butt even though that meant killing innocent
> people.

Without power to flight controls how was he supposed to steer it?

Dan, U.S. Air Force, retired

Steve Hix

3/5/2009 5:36:00 PM

0

In article
<9cfb6a4b-482e-46a5-9056-9672a124234c@g38g2000yqd.googlegroups.com>,
Paulie Walnutts <hoofhearted07@yahoo.com> wrote:

> On Mar 4, 8:51?pm, "Speeders & Drunk Drivers are MURDERERS"
> <xeton2...@yahoo.com> wrote:
> > Paulie Walnutts <hoofhearte...@yahoo.com> wrote
> > innews:e00274c3-b248-4d45-8b28-39b42fea0a15@w34g2000yqm.googlegroups.com:
> >
> > > On Mar 4, 9:51?am, "Speeders & Drunk Drivers are MURDERERS"
> > > <xeton2...@yahoo.com> wrote:
> >
> > >> What really rankles me is the pilot ejected and escaped unscathed!!
> > >> ?He should have stayed w the plane and steered it between the houses.
> > >> ?He's
> > > ?a
> > >> monster and belongs in the brig for the rest of his life but that
> > >> won't happen. I doubt if they do anything to him.
> >
> > > You obviously have never flown anything more than a kite. When an
> > > airplane decides it's time to stop flying the pilot becomes just
> > > another passenger. How well does an F-18 fly with no power?? Whats the
> > > glide ratio 1:1??
> >
> > Hey stupid. ?Did the wings fall off while the pilot was still in the jet??.
> > ?
> > He could have stayed with the jet and avoided the houses ?but this monster
> > ?
> > decided to save his own butt even though that meant killing innocent
> > people.
>
> Are you a pilot?

There's a pretty good chance it's not a driver, and may not be able to
ride a bicycle unassisted.

Dan

3/5/2009 6:39:00 PM

0

Steve Hix wrote:
> In article
> <9cfb6a4b-482e-46a5-9056-9672a124234c@g38g2000yqd.googlegroups.com>,
> Paulie Walnutts <hoofhearted07@yahoo.com> wrote:
>
>> On Mar 4, 8:51 pm, "Speeders & Drunk Drivers are MURDERERS"
>> <xeton2...@yahoo.com> wrote:
>>> Paulie Walnutts <hoofhearte...@yahoo.com> wrote
>>> innews:e00274c3-b248-4d45-8b28-39b42fea0a15@w34g2000yqm.googlegroups.com:
>>>
>>>> On Mar 4, 9:51 am, "Speeders & Drunk Drivers are MURDERERS"
>>>> <xeton2...@yahoo.com> wrote:
>>>>> What really rankles me is the pilot ejected and escaped unscathed!!
>>>>> He should have stayed w the plane and steered it between the houses.
>>>>> He's
>>>> a
>>>>> monster and belongs in the brig for the rest of his life but that
>>>>> won't happen. I doubt if they do anything to him.
>>>> You obviously have never flown anything more than a kite. When an
>>>> airplane decides it's time to stop flying the pilot becomes just
>>>> another passenger. How well does an F-18 fly with no power?? Whats the
>>>> glide ratio 1:1??
>>> Hey stupid. Did the wings fall off while the pilot was still in the jet??.
>>>
>>> He could have stayed with the jet and avoided the houses but this monster
>>>
>>> decided to save his own butt even though that meant killing innocent
>>> people.
>> Are you a pilot?
>
> There's a pretty good chance it's not a driver, and may not be able to
> ride a bicycle unassisted.

Training wheels?

Dan, U.S. Aor Force, retired

Billzz

3/7/2009 4:35:00 AM

0


"Matt Wiser" <mattwiser_99@yahoo.com> wrote in message
news:c1dd137b-ad7b-47b5-bf60-9b1bccc852c4@z1g2000yqn.googlegroups.com...
On Mar 6, 6:07 pm, Dan <B24...@aol.com> wrote:
> Matt Wiser wrote:
> > On Mar 6, 11:50 am,
> > TedKennedyMurderedHisPregnantMistress.dwp...@spamgourmet.com wrote:
> >> On Mar 5, 10:11 pm, Dan <B24...@aol.com> wrote:
>
> >>> Speeders & Drunk Drivers are MURDERERS wrote:
> >>>> On Mar 5, 11:44 am, Dan <B24...@aol.com> wrote:
> >>>>> Speeders & Drunk Drivers are MURDERERS wrote:
> >>>>>> Hey stupid. The power for flight controls do not come from the
> >>>>>> engine. Do you even know what a jet is, you moron???
> >>>>> The engine power hydraulic pumps and generate electricity. Both are
> >>>>> needed to operate flight control surfaces.
> >>>>> Dan, U.S. Air Force, retired
> >>>> Not so you lying whore. And stop calling yourself a retired airman.
> >>>> Nobody believes that.
> >>> In other words you have lost your argument. Have a fine day.
> >>> Dan, U.S. Air Force, retired
> >> Has that idiot ever WON an argument?- Hide quoted text -
>
> >> - Show quoted text -
>
> > Not to my knowledge. Note that the idiot calls everyone who disagrees
> > with it a "paid shill." I gather this creature is incapable of the
> > thought that people might have an honest disagreement with his/her/its
> > point of view, and that anyone who has an opinion contrary to its
> > paranoiac delusions is being paid off by someone (govt, military,
> > industry, take your pick). This dolt on another NG called for car
> > radios and air conditioners to be banned, and was hooted down
> > decisively as a result, and accused everyone who did so of being on
> > the auto industry's payroll.
>
> No wonder the world economy is in a mess. Everyone who disagrees with
> him is getting paid to do so.
>
> Dan, U.S. Air Force, retired- Hide quoted text -
>
> - Show quoted text -

If that was the case, I'd be sitting in a beach house in St. Thomas or
St. Croix right now instead of being in a small town in the Sierra
Nevadas, given how much I'd charge per posting....

----------------------------------------------------

My left hand carets are not working, for some reason, but the above is from
Matt, and the below is from billzz...

Hmmm. I am also in a small town in the Sierra Nevada. How do we get on this
"paid shill" contract? I don't mind "Posting for Pay." How much do we get
paid? I'm on the Starband satellite network, which costs a lot. Maybe we
can recoup our costs. I'm also retired military, so any little bit helps.