Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 ZSI Array Parsing

open
nobody
None
5
2004-03-14
2004-03-14
Tobias Grasl
No

Hi,

I am currently attempting to use ZSI to access an
ASP.NET webservice, and I am having problems parsing
arrays.

The web service returns an object[] as a SOAP array,
but it includes the soap array via a href:

<Fields href="#id2" />
...
<soapenc:Array id="id2" soapenc:arrayType="xsd:anyType[2]">
<Item xsi:type="xsd:string">foo</Item>
<Item xsi:type="xsd:string">bar</Item>
</soapenc:Array>

I am not a SOAP expert, but I can't find a way of
persuading ASP.NET not to do this. I also found some
snippets on the web suggesting that this is the correct
way to do it.

In any case, I found I could fix the problem by
inserting the following lines at the beggining of
TCcompound.Array.Parse:

href = _find_href(elt)
if href:
if _children(elt):
raise EvaluateException('Struct has
content and HREF',
ps.Backtrace(elt))
elt = ps.FindLocalHREF(href, elt)

I copied these from Struct.parse.

Thank you,

tobyg

Discussion