<div dir="ltr"><div>On Mon, Apr 27, 2015 at 6:22 PM, Tim Callaghan <span dir="ltr"><<a href="mailto:tmcallaghan@gmail.com" target="_blank">tmcallaghan@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div><span style="font-family:monospace,monospace">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 </span><span style="font-family:monospace,monospace">2015-04-24T00:00:00, not <BusinessDate></span><br><span style="font-family:monospace,monospace">2015-04-24T00:00:00</BusinessDate>. Help.  -Tim<br><br><br></span></div><div><span style="font-family:monospace,monospace">-------- BEGIN CODE --------------<br></span></div><div><span style="font-family:monospace,monospace"></span><div><span style="font-family:monospace,monospace"><br>from pysimplesoap.client import SoapClient<br>from pysimplesoap.simplexml import SimpleXMLElement<br><br>soapLocation="<a href="https://api5.brinkpos.net/Sales2.svc" target="_blank">https://www.changed-for-example.com/Sales2.svc</a>"<br>soapAction="<a href="http://www.brinksoftware.com/webservices/sales/v2/ISalesWebService2/" target="_blank">http://www.changed-for-example.com/webservices/sales/v2/ISalesWebService2/</a>"<br>nsValue="v2"<br>namespaceValue="<a href="http://www.brinksoftware.com/webservices/sales/v2" target="_blank">http://www.changed-for-example.com/webservices/sales/v2</a>"<br>httpHeaders = {'AccessToken':'**NOT*THE*REAL*TOKEN', 'LocationToken':'</span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">**NOT*THE*REAL*TOKEN</span>'}<br><br>client = SoapClient(location=soapLocation,action=soapAction,namespace=namespaceValue,ns=nsValue,trace=True,http_headers=httpHeaders)<br><br>bd = SimpleXMLElement("<BusinessDate>2015-04-24T00:00:00</BusinessDate>")<br><br>response = client.GetOrders(request=bd)<br></span><br></div></div><div><br></div></div></blockquote><div><br></div><div>Can you test the following code instead calling client.getOrders directly?</div><div> </div><div>response = client.call("GetOrders", bd)<br></div><div><br></div><div>That will detect bd as a raw simple xml object to be serialized.</div><div>That generates the following output (with BusinessDate included):</div><div><br></div><div><div>INFO:pysimplesoap.client:POST <a href="https://www.changed-for-example.com/Sales2.svc">https://www.changed-for-example.com/Sales2.svc</a></div><div>DEBUG:pysimplesoap.client:SOAPAction: "<a href="http://www.changed-for-example.com/webservices/sales/v2/ISalesWebService2/GetOrders">http://www.changed-for-example.com/webservices/sales/v2/ISalesWebService2/GetOrders</a>"</div><div>Content-length: 296</div><div>Content-type: text/xml; charset="UTF-8"</div><div>AccessToken: **NOT*THE*REAL*TOKEN</div><div>LocationToken: **NOT*THE*REAL*TOKEN</div><div>DEBUG:pysimplesoap.client:<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="<a href="http://schemas.xmlsoap.org/soap/envelope/">http://schemas.xmlsoap.org/soap/envelope/</a>" xmlns:v2="<a href="http://www.changed-for-example.com/webservices/sales/v2">http://www.changed-for-example.com/webservices/sales/v2</a>"></div><div><soapenv:Header/></div><div><soapenv:Body><BusinessDate>2015-04-24T00:00:00</BusinessDate></soapenv:Body></soapenv:Envelope></div></div><div><br></div><div>BTW, from where did you get the response=raw syntax?</div><div><br></div><div>Best regards,</div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature">Mariano Reingart<br><a href="http://www.sistemasagiles.com.ar/" target="_blank">http://www.sistemasagiles.com.ar</a><br><a href="http://reingart.blogspot.com/" target="_blank">http://reingart.blogspot.com</a></div></div></div><div> </div></div><br></div></div>