[Fedora-suds-list] arrayType tag not being added

Jeff Ortel jortel at redhat.com
Tue Jun 16 20:26:08 UTC 2009


Hey Darrell,

Currently suds doesn't set the arrayType attribute for rpc/encoded arrays.  So far, most 
servers I've dealt with don't seem to care.  But, seems like yours does :-/

Let me see what's involved in adding this functionality and get back to you.

Regards,

Jeff

Darrell Fuhriman wrote:
> 
> I'm trying to use the soap service provided here:
> 
> https://node.deq.state.or.us/PNWHostTest/node.asmx?WSDL
> 
> Using the code below, I am able to authenticate, but when I call 
> GetStations, I get an error back from the server.
> 
> I've tracked the problem down to a missing tag on the 'parameters' 
> attribute.
> 
> I'm getting:
>          <parameters xsi:type="ns2:ArrayOfString" ">
> 
> And what I should be getting is:
>          <parameters xsi:type="ns2:ArrayOfString" 
> SOAP-ENC:arrayType="ns2:string[31]">
> 
> (complete query is attached)
> 
> I'm using the current SVN version, though I've also tried 0.3.5.
> 
> class DEQDB:
>   def __init__(self):
>     url = 'https://node.deq.state.or.us/PNWHostTest/node.asmx?WSDL'
>     self.client = Client(url)
>     self.username = 'XXXXX'
>     self.password = 'YYYYY'
>     self.token=''
> 
>   def authenticate(self):
>     self.token=self.client.service.Authenticate(userId=self.username, 
> credential = self.password,authenticationMethod = 'basic')
>     if self.token == '':
>       raise AuthenticationError,"Invalid credentials passed to remote"
> 
>   def stationList(self):
>     params=self.client.factory.create('ArrayOfString')
>     
> params.item=['1','300','','','','','','','','','','','','','','','','','','','','','','','','','','','','',''] 
> 
>     print params
>     
> list=self.client.service.Query(securityToken=self.token,request='GetStations',rowId=0, 
> maxRows = 10,parameters=params)
>     return list
> 
> deq=DEQDB()
> deq.authenticate()
> print deq.stationList()
> 
> If I specify params._arrayType= 'ns2:string[31]', then the tag appears, 
> but without the SOAP-ENC, or any other namespace prefix, which still 
> causes an error on the other side.

> 
> Any suggestions on how to make this work?
> 
> Darrell
> 
> 
> ------------------------------------------------------------------------
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> 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