[Soap-Python] Using rpclib with wsdl containing namespaced messages
Suraj Barkale
suraj at barkale.com
Fri May 18 12:06:43 CEST 2012
Burak Arslan <burak.arslan at ...> writes:
>
> On 05/17/12 19:59, Suraj Barkale wrote:
> > I can not use the auto-generated wsdl since there are other clients out
there
> > that
> > follow the wsdl. Other clients create SOAP envelops similar to suds.
>
> ah. you should've said that earlier. check this again, it's working now.
>
> https://gist.github.com/2718747
I got an exception (suds.TypeNotFound: Type not found:
'tns:SendCalcMessageResult') in suds client. It turned out suds was expecting a
bare xml and rpclib was adding an extra element.
Actual:
<senv:Body>
<tns:SendCalcMessageResponse>
<tns:SendCalcMessageResult>3</tns:SendCalcMessageResult>
</tns:SendCalcMessageResponse>
</senv:Body>
Expected:
<senv:Body>
<tns:SendCalcMessageResponse>3</tns:SendCalcMessageResponse>
</senv:Body>
I added _body_style='bare' and _soap_body_style='document' to SendCalcMessage()
decorator. However, it caused a crash as ComplexModelBase.alias contains
undefined 'ClassAlias'. Replacing ClassAlias by something that works has proved
beyond my abilities. :(
> > I shall try to provide a patch that either ignores namespaces or adds extra
> > namespace support.
> >
>
> patch the docs instead :)
I shall certainly provide some once I wrap my head around the code.
Thanks & Regards,
Suraj
More information about the Soap
mailing list