python - Consume SOAP webservices using escaped xml as attribute -


i using suds consume soap web services way:

from suds.client import client url = "http://www.example.com?wsdl" client = client(url) client.service.example(xml_argument) 

if call method using xml works:

<?xml version="1.0" encoding="utf-8"?><a><b description="foo bar"></b></a> 

but if add quote (escaped) this:

<?xml version="1.0" encoding="utf-8"?><a><b description="foo &quot; bar"></b></a> 

i following error (from webservice):

attribute name "bar" associated element type "b" must followed ' = ' character.

i using version: 0.4 ga build: r699-20100913

am not using suds.client in proper way? suggestions?


update:

i have contacted customer support, emailed them escaped xml , told me works them, caused due bad use suds in side. i'll give try pysimplesoap.

mine guess, error quoting seems generated xml well-formedness checker on machine providing service.

it seems on side of cable getting like:

<a><b description="foo" bar"></b></a> 

(&quot; converted ") , telling you should instead send like:

<a><b description="foo" bar="..."></b></a> 

which not want.

afaik xml formed (just tested here safety), either there bug in suds (which surprise me, given magnitude of bug , maturity of package) or there bug on server providing service (possibly "too conversion" xml entities regular chars).

again: lot of speculation , few hard facts here, still hth! :)


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -