Passing an object array between a SOAP::Lite client and a VB.net web service

Expand Messages

selberg_scott

I ve been beating my head against this one for a while and not finding any solutions, so I thought I would post mine. Talking to the .net service from SOAP was

Message 1 of 1
, Jan 16, 2007

0 Attachment

I've been beating my head against this one for a while and not finding
any solutions, so I thought I would post mine.

Talking to the .net service from SOAP was easy with all the interop
stuff. Passing single parameters worked great to; however, when I
passed an array it would not be de-parsed by .Net. If I tried to use
the information, the .net service would die with an uninstatitated
object error. Below is my magic receipe. There may be other
solutions, but it was the only approach I found which worked. (Of
course, I stopped looking when I found one.)

The .Net service is quite simple. It accepts an object array and
returns it. My goal is to pass parameters in a hash style to avoid
needing to modify the interfaces when I add or remove parameters.

Now, the perl script. What seems to be the magic trick is matching
the pass parameter variable (objectArray) and making every array item
have the name "anyType". SOAP::Lite defaults to "item", so every
member must be explicitly set in a SOAP::Data block.