Re: SOAP problem with array encoding

"Hiran Chaudhuri" <hiran.chaudhuri@_at_web_dot.de>
Newsgroups gmane.comp.mozilla.devel.xml
Organization Global Access Telecommunications, Inc.
Message-ID <[email protected]>
"Martin Honnen" <[email protected]> schrieb im Newsbeitrag news:[email protected]...
> 
> 
> Hiran Chaudhuri wrote:
> 
> > Having tried SOAP calls from JavaScript in Mozilla and succeeded with
> > simple ones, I currently don't know how to handle arrays. Has anyone
> > out there had a similar problem already?
> 
> Which API in Mozilla are you using, the one more low level, described here:
> <http://web.archive.org/web/20031204005226/devedge.netscape.com/viewsource/2003/soap/01/>
> or the higher level one (web service proxying, but of course still uses 
> SOAP), described here: http://web.archive.org/web/20031202203447/http://devedge.netscape.com/viewsource/2003/wsdl/01/>

I use JavaScript with the first mentioned, the low level api as you say.

> As for the arrays, what are you trying exactly, passing arrays to the 
> web service, receiving an array? How does the WSDL for the web service 
> look (URL is better than posting that)?

Correct, I want to send/receive complex types. From the SOAP recommendation that is structures (works), arrays (don't know how to handle this) and arrays of structures (think I'll get it working as soon as I know how to handle arrays).

What wondered me most is that adding parameters to a property bag will serialise to a random order. If the order were preserved I could control array positions and document style calls as well.
 
> For complex arrays the section
> <http://lxr.mozilla.org/mozilla/source/extensions/webservices/docs/Soap_Scripts_in_Mozilla.html#3.8_Using_Schema_Types>
> lists some hints.

Hmmmm, I've seen this document before, but maybe I miss the bit you refer to simply as it looks a bit abstract to me. The tutorials I've seen so far never refer to the schema types. Where can I get a sample for section 3.8? 
 
> Followup-to xml group set as I think it belongs there.

Thanks for the help.
 
> As for others running into problems with arrays Google finds stuff of 
> course:
> <http://groups-beta.google.com/groups?as_q=SOAP%20call%20array&safe=images&as_ugroup=*mozilla*&lr=&hl=en>
> maybe fine tune that search for more specific search terms.

I searched on Google also, but the references to "array" are the first array you fill with SOAPParameter instances that get SOAPCall_encoded. None did show me anything about further nested arrays.

Hiran
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.