I am executing a method of a SOAP web service which receives 3 string arguments with suds library.
第一个论点应当是XML,另一个是用户名和密码,这是我的半工作执行。
from suds.client import Client
url = "http://www.jonima.com.mx:3014/sefacturapac/TimbradoService?wsdl"
client = Client(url)
client.service.timbrado(XML_AS_STRING_HERE, PRUEBA1 , 12345678 )
When the first parameter contains an escaped character (ampersand, quotes, apostrophe, less than, bigger than) method does not work because the server interprets the text as if it were unescaped. If doesn t contain any of those chars the method works great
XML example without ampersand works http://dl.dropbox.com/u/1990697/no_amp.xml
XML example with ampersand doesn t work http://dl.dropbox.com/u/1990697/with_amp.xml
Any idea how can I pass XML with escaped chars?
It doesn t have to rely on suds but in python. I am using python 2.6 (How ever it could be with 2.7 if required)
我也利用了Django框架,不知道这是否有用。
Extra Info:
- I have no access to modify SOAP server
- Customer support told me my xml are correct and that they work for them, so the error is in my implementation (or somewhere in suds?)