I’m trying to use suds to communicate with a server based at another company. I call a method on the server and receive this XML:

 

DEBUG:suds.client:sending to (https://soap.vindicia.com/soap.pl)

message:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.vindicia.com/v3_5/Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Header/>

   <ns0:Body>

      <ns1:update>

         <auth>

            <version/>

            <login>EDITED OUT</login>

            <password> EDITED OUT!! </password>

         </auth>

         <account>

            <emailAddress>pratik@envieinteractive.com</emailAddress>

            <emailTypePreference>html</emailTypePreference>

            <preferredLanguage>en</preferredLanguage>

            <name>Pratik Patel20100602203112</name>

         </account>

      </ns1:update>

   </ns0:Body>

</SOAP-ENV:Envelope>

DEBUG:suds.client:headers = {'SOAPAction': u'"http://soap.vindicia.com/v3_5/Account#update"', 'Content-Type': 'text/xml; charset=utf-8'}

DEBUG:suds.transport.http:sending:

URL:https://soap.vindicia.com/soap.pl

HEADERS: {'SOAPAction': u'"http://soap.vindicia.com/v3_5/Account#update"', 'Content-Type': 'text/xml; charset=utf-8', 'Content-type': 'text/xml; charset=utf-8', 'Soapaction': u'"http://soap.vindicia.com/v3_5/Account#update"'}

MESSAGE:

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soap.vindicia.com/v3_5/Account" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">

   <SOAP-ENV:Header/>

   <ns0:Body>

      <ns1:update>

         <auth>

            <version/>

            <login>EDITED OUT</login>

            <password>EDITED OUT!!</password>

         </auth>

         <account>

            <emailAddress>pratik@envieinteractive.com</emailAddress>

            <emailTypePreference>html</emailTypePreference>

            <preferredLanguage>en</preferredLanguage>

            <name>Pratik Patel20100602203112</name>

         </account>

      </ns1:update>

   </ns0:Body>

</SOAP-ENV:Envelope>

DEBUG:suds.transport.http:received:

CODE: 200

HEADERS: {'content-length': '639', 'soapserver': 'SOAP::Lite/Perl/0.710.10', 'server': 'Apache/1.3.41 (Unix) mod_perl/1.30 mod_ssl/2.8.31 OpenSSL/0.9.7f', 'connection': 'close', 'date': 'Thu, 03 Jun 2010 03:31:02 GMT', 'content-type': 'text/xml; charset=utf-8'}

MESSAGE:

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <soap:Fault>

      <faultcode>soap:Server</faultcode>

 

      <faultstring>Can't use string ("") as an ARRAY ref while "strict refs" in use at /vindicia/site_perl/Vindicia/Soap/DocLitUtils.pm line 130.

</faultstring>

    </soap:Fault>

  </soap:Body>

</soap:Envelope>

 

DEBUG:suds.client:http succeeded:

<?xml version="1.0" encoding="UTF-8"?>

<soap:Envelope

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"

    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">

  <soap:Body>

    <soap:Fault>

      <faultcode>soap:Server</faultcode>

 

      <faultstring>Can't use string ("") as an ARRAY ref while "strict refs" in use at /vindicia/site_perl/Vindicia/Soap/DocLitUtils.pm line 130.

</faultstring>

    </soap:Fault>

  </soap:Body>

</soap:Envelope>

 

 

This results in the following exception:

 

Traceback (most recent call last):
  File "X:\mf\RedIndigo\res\scripts\base\VindiciaHarness.py", line 154, in <module>
    sys.exit(main(*sys.argv))
  File "X:\mf\RedIndigo\res\scripts\base\VindiciaHarness.py", line 128, in main
    test = client.service.update(lauth,lacc)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\client.py", line 538, in __call__
    return client.invoke(args, kwargs)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\client.py", line 602, in invoke
    result = self.send(msg)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\client.py", line 634, in send
    result = self.succeeded(binding, reply.message)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\client.py", line 669, in succeeded
    r, p = binding.get_reply(self.method, reply)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\bindings\binding.py", line 157, in get_reply
    result = self.replycomposite(rtypes, nodes)
  File "C:\Python26\lib\site-packages\suds-0.4-py2.6.egg\suds\bindings\binding.py", line 227, in replycomposite
    raise Exception('<%s/> not mapped to message part' % tag)
Exception: <faultcode/> not mapped to message part

 

 

I’m a total newbie to suds (and SOAP!) so can someone tell me why this exception is being thrown and what I could do to fix it? I’ll deal with the errors from the server once I fix the cause of the exceptions.