Hate to 'bump' this, but this problem has persisted through several weeks and several brains, and I haven't received an answer on the IRC channel or here. Does anyone have any suggestions as to how we can get suds to build an ArrayOfInt out of the XML we're getting back? We're about to investigate solutions in other languages if we can't get this working.

If the question is unclear, please let me know so I can express it better.

Thanks.

On Fri, Feb 11, 2011 at 11:14 AM, Jeremy Boyd <boydjj@gmail.com> wrote:
Hi all,

I'm trying to use suds to consume a WSDL and use a vendor's service. I've found that things work pretty well unless I need to get a complex argument as a response. The WSDL defines a type ArrayOfInt as follows:

<complexType name="ArrayOfInt">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType" wsdl:arrayType="soapenc:int[]" />
</restriction>
</complexContent>
</complexType>

A typical request/response using ArrayOfInt might look something like this:

>>> client.service.getUserDeviceList(test_settings.username, test_settings.password, 41768)
83133

Here's the raw XML from that response:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Body>
<getUserDeviceListResponse xmlns="https://www.roamsecure.net/Roamalert">
<s-gensym3 xsi:type="xsd:int">83133</s-gensym3>
<s-gensym5 xsi:type="xsd:int">83134</sgensym5>
</getUserDeviceListResponse>
</soap:Body>
</soap:Envelope>

The trouble I'm having is that suds is failing to convert this response into an ArrayOfInt. It only gives me the first number - e.g. 83133. And the type of the result, per suds, is 'int', so it's not like it's creating an ArrayOfInt with only 1 element.

Is there something I should be doing to get an ArrayOfInt out of this response?

Thanks.

--
Jeremy Boyd
c: (512) 586-4587




--
Jeremy Boyd
boydjj@gmail.com
512-586-4587