[Soap-Python] Can't get my request to work in pysimplesoap SoapClient

Tim Callaghan tmcallaghan at gmail.com
Mon Apr 27 23:22:32 CEST 2015


Here's my code. When I "print bd.as_xml()" it looks good to me, but all
that ends up in my <v2:response> is 2015-04-24T00:00:00, not <BusinessDate>
2015-04-24T00:00:00</BusinessDate>. Help.  -Tim


-------- BEGIN CODE --------------

from pysimplesoap.client import SoapClient
from pysimplesoap.simplexml import SimpleXMLElement

soapLocation="https://www.changed-for-example.com/Sales2.svc
<https://api5.brinkpos.net/Sales2.svc>"
soapAction="
http://www.changed-for-example.com/webservices/sales/v2/ISalesWebService2/
<http://www.brinksoftware.com/webservices/sales/v2/ISalesWebService2/>"
nsValue="v2"
namespaceValue="http://www.changed-for-example.com/webservices/sales/v2
<http://www.brinksoftware.com/webservices/sales/v2>"
httpHeaders = {'AccessToken':'**NOT*THE*REAL*TOKEN', 'LocationToken':'
**NOT*THE*REAL*TOKEN'}

client =
SoapClient(location=soapLocation,action=soapAction,namespace=namespaceValue,ns=nsValue,trace=True,http_headers=httpHeaders)

bd = SimpleXMLElement("<BusinessDate>2015-04-24T00:00:00</BusinessDate>")

response = client.GetOrders(request=bd)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/soap/attachments/20150427/5f69b92f/attachment.html>


More information about the Soap mailing list