[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Solution consuming .NET SOAP service

Tim Perrett

3/4/2007 4:28:00 PM

Hey all

I have been trying to consume a .NET exposed web-service with soap4r and
have found some things that might help others when doing the same thing

Oddly, soap4r interprted the following WSDL

<s:element name="GetAllProperties">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="inUsername"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="inPassword"
type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="inAccountID"
type="s:string" />
</s:sequence>
</s:complexType>
</s:element>

As only having the one paramater, inAccountID. So to get around this and
pass all three params as a struct object like this:

soap = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
Request = Struct.new(:inAccountID, :inUsername, :inPassword)
soap.GetAllProperties(Request.new('2', 'test', 'test'))

And as its a .NET WS, i had to employ the following also:

soap.default_encodingstyle = SOAP::EncodingStyle::ASPDotNetHandler.new

Hope this helps somone

Tim

--
Posted via http://www.ruby-....

42 Answers

Tim Becker

3/4/2007 4:44:00 PM

0

On 3/4/07, Tim Perrett <freestyle_kayaker@hotmail.com> wrote:
> I have been trying to consume a .NET exposed web-service with soap4r and
> have found some things that might help others when doing the same thing


I too have found soap very difficult to work with. It doesn't
necessarily help that soap4r is virtually undocumented. Here's the
approach that ended up working for a particularly troublesome wdsl: I
generated a client using apache axis, ran a couple of tests, sniffed
the traffic and generated templates from the xml axis produced for the
call. Then picked the responses apart using REXML. Not pretty, but it
works well enough and was easier than guessing around with soap4r.

Just my opinion: Soap itself is entirely convoluted, if you really
need xml overhead for rpc (hint: you don't) it should at least be
human readable, xmlrpc I can live with, I don't see the point of soap.
-tim

Tim Perrett

3/4/2007 4:51:00 PM

0

I agree - the lack of documentaion and per-service implementation
differences does make it somewhat of a minefield!

SOAP implementations tend to be quite complex on most platforms/lanuages
(unless your using an IDE to do all the work for you with somthing like
C# VS) - even for those which have frameworks in place e.g. soap4R,
WebServicesCore etc etc. I have been working on a SOAP client in
objective-c consuming the same service and in comparison makes Soap4R
seem like a well implemented walk in the park! haha

If anyone has any other handy SOAP tips by all means tag them onto here

Cheers

Tim

--
Posted via http://www.ruby-....

Man of Mind

2/23/2012 4:12:00 AM

0

On 2/22/2012 8:41 PM, flaps_jaw sniveled and groveled before:
>
> Man_Of_Mind was laughing at the pompous primate posturings of:
>>
>> faulty_sperm whimpered all self-congratulatory with:
>>>
>>> On Feb 22, 11:09 am, barely_a_mind <b...@in1.mind> writhed in denials:
>>>>
>>>> On 2/21/2012 10:01 PM, Baron von Mind wrote:
---->
>>>>> What "equation" was that again?
>>>>>
>>>>> "Oh, the units are in energy - kg x ft^2/sec^2"
>>>>>
>>>>> *>LOL!<* That's some "equation" you boys have got there..
>>>>
>>>> Yes, you've said that numerous times, now do be so kind as to
>>>> explain it.
>>>
>>> I don't believe he can explain
>>
>> I didn't confuse the units of measures above..
>
> But you were confused by them

Nope, it told me that you didn't know how to work your
"psychics problem" correctly.. Want to go there, flaps_jaw?

>> --I stick to SI units, like it's been taught for decades..

Something that you would know had you taken an actual physics
class at high school or university level. But, in your rush
to try and attack my academic experience and degree, you
simply embarrassed yourself such that you've constantly
tried to lie your way around your error..

--Which is what right-wingers do when they suck at math..

Man of Mind

2/23/2012 4:25:00 AM

0

On 2/22/2012 8:35 PM, flaps_jaw continued trying to lie:
>
> Baron von Mind was exploiting the sociopathy exhibited by:
>>
>> On 2/21/2012 7:36 PM, flaps_jaw whined triumphantly despite:
>>>
>>> Baron von Mind was pointing out the obvious to:
>>>>
>>>> On 2/18/2012 6:50 AM, flaps_jaw whined vapidly and pompously:



>>>>>>> And I see you multiplied the inclination of 27 degrees by
>>>>>>> the sin of 289 to get your answer, didn't you?
>>>>>>
>>>>>> Nope, cosine of 19 degrees multiplied by 27..

Same answer, 25.529 degrees, South latitude..

>>>> Oh, so now my answer is wrong, despite your lack of mental
>>>> agility with trigonometric identities and such?
>>>
>>> Yes, it always was
>>
>> Oh, so you're going to pretend that my answer was wrong, but
>> cannot begin to hope to understand how I got the correct
>> (i.e., wrong) figure of 25.529' south latitude..
>
> You multiplied the cosine of 19 times 27.

Try it before you attempt to lie your way out of this again..

> I had originally thought you multiplied the sin of 289 by 27,

You obviously have no idea how anyone thinks..

> The correct answer is 25.420 degrees South.

Really..

> Here's how to solve it :

We weren't solving for triangles, despite your obfuscations..

>> You're not very good with these kinds of problems, are you?
>
> You mean because I can solve them

When will you be learning how to use SI units correctly?

>> Especially since you've used a unit of measure like this:
>>
>> "Oh, the units are in energy - kg x ft^2/sec^2"
>
> Well, actually, this problem in spherical trigonometry

"If you were to ball a ball 500 miles above the Earth's surface"

"OOps, my mistake -

I meant drop a ball from a state of rest 500 miles from the
Earth's surface..."

You've been tripping and falling over yourself ever since..

>>> If you were actually familiar with spherical
>>> trigonometry (not spherical geometry)
>>
>> I see that you're again lying about your 'familiarity'
>> with anything to do with math or physics, flaps_jaw..
>
> I am?

"Oh, the units are in energy - kg x ft^2/sec^2"

>>>>> So how did you use spherical trigonometry (not spherical
>>>>> geometry)
>>>>
>>>> Oh, something to do with satellites and telecommunications..
>>>>
>>>> What do you think you know about it, besides losing your sign?
>>>
>>> Oh, yes, I understand that's the official definition
>> ..
>>> The fact that I can solve a simple problem
>> ..
>>> You see now why, before you start bragging
>>
>> I see that you're again boasting of your ignorance, like
>> it was some kind of badge of honor, which you have none..
>
> Beating you

When can expect that to happen? So far, all you've done
is prove that you're an almost illiterate dumbass, dim and
addled to boot..

>>>>> Or maybe you should stick with physics
>>>>
>>>> Don't mind if I do, it beats being a bean counter at some
>>>> hedge fund operation that's about to be indicted, eh?
>>>>
>>>> --Got those resumes ready yet, net_pwned?
>>
>> Don't worry, you can use faulty_spam as a personal reference..
>>
>> --I'm sure that he won't mind..

*>cricket.wav<*

--dim, addled.. How apropos..

Man of Mind

2/23/2012 4:47:00 AM

0

On 2/22/2012 8:13 PM, flaps_jaw kept right on whining because:
>
> Man_Of_Mind was eliciting another knee-jerk response from:
>>
>> faulty_spawn <wsjames123@gmail.com> whined along with:
>>>
>>> On Feb 21, 8:23 pm, flaps_jaw <wsjames123@gmail.com> whimpered:
>> ..
>>> So what do you do now?
>>
>> Wait, and watch you try to escape by blathering endlessly,
>> insinuating your immature personal attacks and pretending
>> that you're somehow the victim in all this.. *>LOL!<*
>>
>> You still can't explain how you/flaps_jaw screwed up
>> the units in your "psychics problem", and tried to dismiss
>> it as a "wouldn't matter anyway" type of thing..
>>
>> But I know you screwed it up, and all your prideful bravado
>> and pompous primate posturings won't change the facts..
>>
>> --Maybe it's time you looked up SI units..
>
> You know this, eh?

Yeah, it's called "units of measure", and it's in the first
chapter of most freshman university physics textbooks..

Perhaps you should go look that up with Google?

--Before you embarrass yourself any worse than now..

Man of Mind

2/23/2012 4:52:00 AM

0

On 2/22/2012 8:09 PM, flaps_jaw <wsjames123@gmail.com> whimpered:
>
> Baron von Mind was exploiting the sociopathy exhibited by:
>>
>> On 2/21/2012 7:23 PM, flaps_jaw <wsjames123@gmail.com> sniveled:
>>>
>>> faulty_spam <wsjames123@gmail.com> was cringing in disbelief:
>>>>
>>>> On Feb 19, 7:06 pm, Baron von Mind was laughing at:
---->
>>>>> What 'units' are those again? What "energy" was it, again?
>>>>>
>>>>> --Looks like you screwed up your answer, and want to hide that..
>>>>
>>>> And you ran away again. Can you solve the problem, or not?
>>>>
>>>> I'm thinking not - otherwise you would have done it already.
>>>
>>> He will not, of course,
>>
>> You're projecting again. What little of your 'work' you
>> posted shows that you never made it past the first two
>> chapters of any university physics class textbook..
>
> Would that put me two chapters past you?

Noooo.. Would that be another baseless insinuation on your
lame behalf as you keep dancing around the subject of how
you screwed up the answers to your own 'psychics problem'?

>> "Oh, the units are in energy - kg x ft^2/sec^2"
>>
>> --Thus proving my point that right-wingers suck at math and science..
>
> That explains why I can solve the problem

Your 'psychics problem'? *>LOL!<*..

--You couldn't even show your work without screwing it all up..

Man of Mind

2/23/2012 5:07:00 AM

0

On 2/22/2012 8:42 PM, flaps_jaw <wsjames123@gmail.com> whined with:
>
> faulty_sperm <wsjames@gmail.com> was almost despondent because:
>
>> Baron von Mind was amazed by the fraudulent cowardice of:
>>>
>>> On 2/18/2012 6:51 AM, flaps_jaw started bloviating again:
-->
>>>> Superior in what way?
>>>
>>> Yes, what in particular?
> >
>> Knowledge?
>
> Success?

d.) none of the above.

"Did you know that Rush listener are on average, better education
and more intelligence that the population at large?"

"I found that it's best to not respond to Gary. He deparately seek
attention and hates it when he's ignored."

"it's not his weight or his unseemly appearance that bothers me [..]
but that he is an adject fool and serial liar."

"Hey, Zepp, why don't you post your defibnition first?"

"You don't don't the difference between a typo and a grammar mistake?"

"I can't help but notice how it seems liberals' posts are full
of grammar and spelling mistake, as if they can't write above
a fifth-grade level."

"No, there Clinton left left Bush with a huge deby."

"Despite all the pressure, Obama would not release his brith certificate"

"Barry does not like his mistales exposed in public."

"Now, would you like me to correct your psychics mistakes?"

"Unless you're trying to incinerate "false precision", which is the
term that engineers actually use."

"Like all libs, he opens bhis big, fat stupid mouth without thinking
what he's saying."

"Actually I don't any of them are."

"Please don't post that anymore - you're made your point."

"Please stop repsonding to me - you sully my posts with your claptrap."

"What part of "Please stop repsonding to me" did you NOT understand"

--*>LOL!<*.. Here's your sign..

Slackjaw

2/23/2012 12:22:00 PM

0

Baron von Mind wrote:

> On 2/22/2012 8:35 PM, flaps_jaw continued trying to lie:
> >
> > Baron von Mind was exploiting the sociopathy exhibited by:
> > >
> > > On 2/21/2012 7:36 PM, flaps_jaw whined triumphantly despite:
> > > >
> > > > Baron von Mind was pointing out the obvious to:
> > > > >
> > > > > On 2/18/2012 6:50 AM, flaps_jaw whined vapidly and pompously:
>
>
>
> > > > > > > > And I see you multiplied the inclination of 27 degrees
> > > > > > > > by the sin of 289 to get your answer, didn't you?
> > > > > > >
> > > > > > > Nope, cosine of 19 degrees multiplied by 27..
>
> Same answer, 25.529 degrees, South latitude..
>
> > > > > Oh, so now my answer is wrong, despite your lack of mental
> > > > > agility with trigonometric identities and such?
> > > >
> > > > Yes, it always was
> > >
> > > Oh, so you're going to pretend that my answer was wrong, but
> > > cannot begin to hope to understand how I got the correct
> > > (i.e., wrong) figure of 25.529' south latitude..
> >
> > You multiplied the cosine of 19 times 27.
>
> Try it before you attempt to lie your way out of this again..
>
> > I had originally thought you multiplied the sin of 289 by 27,
>
> You obviously have no idea how anyone thinks..
>
> > The correct answer is 25.420 degrees South.
>
> Really..
>
> > Here's how to solve it :
>
> We weren't solving for triangles, despite your obfuscations..

LOL! What do think you think "Spherical Trigonometry" is, Kurt?

Oh wait, you already stated your thoughts - it "has something to do
with satellites and telecommunications and stuff".

>
> > > You're not very good with these kinds of problems, are you?
> >
> > You mean because I can solve them
>
> When will you be learning how to use SI units correctly?
>
> > > Especially since you've used a unit of measure like this:
> > >
> > > "Oh, the units are in energy - kg x ft^2/sec^2"
> >
> > Well, actually, this problem in spherical trigonometry
>
> "If you were to ball a ball 500 miles above the Earth's surface"
>
> "OOps, my mistake -
>
> I meant drop a ball from a state of rest 500 miles from the
> Earth's surface..."
>
> You've been tripping and falling over yourself ever since..
>
> > > > If you were actually familiar with spherical
> > > > trigonometry (not spherical geometry)
> > >
> > > I see that you're again lying about your 'familiarity'
> > > with anything to do with math or physics, flaps_jaw..
> >
> > I am?
>
> "Oh, the units are in energy - kg x ft^2/sec^2"
>
> > > > > > So how did you use spherical trigonometry (not spherical
> > > > > > geometry)
> > > > >
> > > > > Oh, something to do with satellites and telecommunications..
> > > > >
> > > > > What do you think you know about it, besides losing your sign?
> > > >
> > > > Oh, yes, I understand that's the official definition
> > > ..
> > > > The fact that I can solve a simple problem
> > > ..
> > > > You see now why, before you start bragging
> > >
> > > I see that you're again boasting of your ignorance, like
> > > it was some kind of badge of honor, which you have none..
> >
> > Beating you
>
> When can expect that to happen? So far, all you've done
> is prove that you're an almost illiterate dumbass, dim and
> addled to boot..
>
> > > > > > Or maybe you should stick with physics
> > > > >
> > > > > Don't mind if I do, it beats being a bean counter at some
> > > > > hedge fund operation that's about to be indicted, eh?
> > > > >
> > > > > --Got those resumes ready yet, net_pwned?
> > >
> > > Don't worry, you can use faulty_spam as a personal reference..
> > >
> > > --I'm sure that he won't mind..
>
> *>cricket.wav<*
>
> --dim, addled.. How apropos..

I just needed to prove just how much your "physics degree" was worth.
Having you fall on your face with this spherical trig question was a
bonus.

You can run along now.


--
---

Man of Mind

2/23/2012 12:42:00 PM

0

On 2/21/2012 8:16 PM, flaps_jaw <wsjames123@gmail.com> whined/opined:
>
> Baron von Mind was chiding the deliberate ignorance of:
>>
>> On 2/20/2012 10:27 AM, lesser_wit whined the usual partisan intolerance:
>>>
>>> On 2/19/2012 5:08 PM, Baron von Mind was laughing at the ambitious ignorance of:
>>>>
>>>> On 2/19/2012 4:41 PM, lesser_wit replied:
>>>>>
>>>>> On 2/19/2012 1:43 PM, Baron von Mind wrote:
>>>>>>
>>>>>> On 2/18/2012 10:28 AM, lesser_wit replied:
------>
>>>>>>> The childlike glee you derive
>>>>>>
>>>>>> Keep telling on yourself..
>>>>>>
>>>>>> --Your little buddy, slapped_raw, hasn't been very talkative..
>>>>>
>>>>> Why would you assume he is my "buddy"?
>>>>
>>>> Oh, just call it an 'intuition'..
>>>>
>>>> --*>LOL!<*..
>>>
>>> Thankfully you don't apply that misguided wit to the more concrete
>>> aspects of your life..do you?
>>
>> Thankfully, the people I'm around in the 'more concrete aspects'
>> of my life have a sense of humor and respect for my 'misguided wit'.
>> They usually hold doctorates in professions you couldn't begin to
>> approach, and are very gracious to me with similar 'misguided wit'..
>
> Are you referring to

Are you asking a rhetorical question?

--"Oh, the units are in energy - kg x ft^2/sec^2"

Man of Mind

2/23/2012 12:58:00 PM

0

On 2/23/2012 6:21 AM, flaps_jaw appeared dim and addled:
>
> Baron von Mind was exploiting the sociopathy exhibited by:
>>
>> On 2/22/2012 8:35 PM, flaps_jaw continued trying to lie:
>>>
>>> Baron von Mind was exploiting the sociopathy exhibited by:
>>>>
>>>> On 2/21/2012 7:36 PM, flaps_jaw whined triumphantly despite:
>>>>>
>>>>> Baron von Mind was pointing out the obvious to:
>>>>>>
>>>>>> On 2/18/2012 6:50 AM, flaps_jaw whined vapidly and pompously:
----->
>>>>>> Oh, so now my answer is wrong, despite your lack of mental
>>>>>> agility with trigonometric identities and such?
>>>>>
>>>>> Yes, it always was
>>>>
>>>> Oh, so you're going to pretend that my answer was wrong, but
>>>> cannot begin to hope to understand how I got the correct
>>>> (i.e., wrong) figure of 25.529' south latitude..
>>>
>>> You multiplied the cosine of 19 times 27.
>>
>> Try it before you attempt to lie your way out of this again..
>>
>>> I had originally thought you multiplied the sin of 289 by 27,
>>
>> You obviously have no idea how anyone thinks..
>>
>>> The correct answer is 25.420 degrees South.
>>
>> Really..
>>
>>> Here's how to solve it :
>>
>> We weren't solving for triangles, despite your obfuscations..
>
> LOL! What do think you think "Spherical Trigonometry"

I think you're going to have to explain why you think
the Law of Cosines has anything to do with your comment

"Oh, the units are in energy - kg x ft^2/sec^2"

> Oh wait, you already stated your thoughts

No, I stated that you claimed the following:

"Oh, the units are in energy - kg x ft^2/sec^2"

What I'm asking for you to explain is how you managed
to mix kilograms with feet^2/sec^2 as a unit of energy..

You keep 'forgetting' to answer that relatively easy question..

Examples follow..

>>>> Especially since you've used a unit of measure like this:
>>>>
>>>> "Oh, the units are in energy - kg x ft^2/sec^2"
>>>
>>> Well, actually, this problem in spherical trigonometry
>>
>> "If you were to ball a ball 500 miles above the Earth's surface"
>>
>> "OOps, my mistake -
>>
>> I meant drop a ball from a state of rest 500 miles from the
>> Earth's surface..."
>>
>> You've been tripping and falling over yourself ever since..

*>cricket.wav<*

>>>>> If you were actually familiar with spherical
>>>>> trigonometry (not spherical geometry)
>>>>
>>>> I see that you're again lying about your 'familiarity'
>>>> with anything to do with math or physics, flaps_jaw..
>>>
>>> I am?
>>
>> "Oh, the units are in energy - kg x ft^2/sec^2"

*>cricket.wav<*

>>>>>>> So how did you use spherical trigonometry (not spherical
>>>>>>> geometry)
>>>>>>
>>>>>> Oh, something to do with satellites and telecommunications..
>>>>>>
>>>>>> What do you think you know about it, besides losing your sign?
>>>>>
>>>>> Oh, yes, I understand that's the official definition
>>>> ..
>>>>> The fact that I can solve a simple problem
>>>> ..
>>>>> You see now why, before you start bragging
>>>>
>>>> I see that you're again boasting of your ignorance, like
>>>> it was some kind of badge of honor, which you have none..
>>>
>>> Beating you
>>
>> When can expect that to happen? So far, all you've done
>> is prove that you're an almost illiterate dumbass, dim and
>> addled to boot..

*>cricket.wav<*

>>>>>>> Or maybe you should stick with physics
>>>>>>
>>>>>> Don't mind if I do, it beats being a bean counter at some
>>>>>> hedge fund operation that's about to be indicted, eh?
>>>>>>
>>>>>> --Got those resumes ready yet, net_pwned?
>>>>
>>>> Don't worry, you can use faulty_spam as a personal reference..
>>>>
>>>> --I'm sure that he won't mind..
>>
>> *>cricket.wav<*
>>
>> --dim, addled.. How apropos..
>
> I just needed to prove

"just needed to prove" what an insecure posturing primate you are?

--What'd you say your degree was in? Oh, you didn't..