[Fedora-suds-list] list (apparently) being sent as '[]' instead of []
Jeff Ortel
jortel at redhat.com
Tue May 5 21:22:51 UTC 2009
Hey Tom,
I believe this is fixed on trunk (0.3.6 beta).
Regards,
Jeff
Tom von Schwerdtner wrote:
> Greetings folks, I'm trying to figure out whose fault this is and would
> appreciate some input.
>
> In short, I have a service call that takes a FilterRules type as an
> argument (pulled from the client factory), which is configured as follows:
>
> >>> print filter
>
> (FilterRules){
> marketClassIds[] = <empty>
> vehicleTypes[] = <empty>
> }
>
>
> The spec for this service says that marketClassIds should be an array of
> integers, however when I assign it to an array as follows:
>
> >>> filter.marketClassIds = [1, 2]
> >>> print filter
>
> (FilterRules){
> marketClassIds[] =
> 1,
> 2,
> vehicleTypes[] = <empty>
> }
>
> and I submit it, I get the following error:
>
> suds.WebFault: Server raised fault: 'JAXRPC.TIE.01: caught exception
> while handling request: deserialization error:
> java.lang.NumberFormatException: For input string: "[1, 2]"'
>
> FWIW, I have seen (but not executed, yet) PHP code for the service that
> simply assigns an empty array to marketClassIds, doing so with python
> results in a similar input string error.
>
> So it seems the server is interpreting the marketClassIds as the __str__
> of the array, and not as an actual array. If I set marketClassIds to a
> non-array integer, eg:
>
> filter.marketClassIds = 1
>
> It works.
>
> So, my question is, am I doing something wrong, is suds doing something
> wrong, or is the server I'm hitting doing something wrong? Any tips on
> further debugging this? I'd love to provide working samples but
> unfortunately this is a proprietary service.
>
> I can give more information if needed, I'm not too familiar with SOAP so
> I wasn't sure what to provide.
>
> Regards,
> Tom
>
> _______________________________________________
> fedora-suds-list mailing list
> fedora-suds-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-suds-list
More information about the fedora-suds-list
mailing list