[Fedora-suds-list] soapenc:array is being substituted

Jeff Ortel jortel at redhat.com
Thu Apr 1 14:57:36 UTC 2010



On 04/01/2010 09:01 AM, Jason McKellar wrote:
> On Thu, Apr 1, 2010 at 9:35 AM, Jeff Ortel<jortel at redhat.com>  wrote:
>> Hey Jason,
>>
>> The specification: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/ says:
>> "Arrays are compound values (see also section 5.4.2). SOAP arrays are
>> defined as having a type of SOAP-ENC:Array or a type derived there from."
>>   This is tricky.  Having the xsi:type be SOAP-ENC:Array may cause problems
>> with some servers just as setting it to the derived type is causing problems
>> in yours.  Do you know what kind of server you're talking to?
>>
>> That said, we need to help you with you issue.  I could add an option in 0.4
>> that would allow the user to specify how suds should set the xsi:type for
>> soap encoded arrays.  Or, I can tell you how to hack your suds.  Which would
>> you prefer?
>>
>
> It's an Axis server, but its inside a proprietary hardware setup so I
> can't access it (I only know it's axis from the traceback).
>
> I am trying to get this setup rather quickly so showing me the
> appropriate place to hack it would be good, but an option on 0.4 would
> be a boon on top of that.

Here ya go:

--- suds/mx/encoded.py	(revision 644)
+++ suds/mx/encoded.py	(working copy)
@@ -77,6 +77,7 @@
          name = '%s:arrayType' % ns1[0]
          value = '%s:%s[%d]' % (ns0[0], aty[0], len(array))
          child.set(name, value)
+        child.set('xsi:type', '%s:Array' % ns1[0])

      def encode(self, node, content):
          if content.type.any():



>
> Thanks for your reply,
>
> Jason

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5126 bytes
Desc: S/MIME Cryptographic Signature
Url : http://lists.fedoraproject.org/pipermail/suds/attachments/20100401/d1208ca3/attachment.bin 


More information about the suds mailing list