I have used soapui to send a request to the server successfully to subscribe a service. However when using suds, the server gives error. The tcpdump from soapui request and from suds shows that the suds tcpdump has an extra dataw tag-element:

 

Suds tcpdump:

===========

 

User-Agent: Python-urllib/2.5

Connection: close

Content-Type: text/xml

……………………………..

  <SOAP-ENV:Header/>

   <ns1:Body>

      <ns0:create>

         <dataw>

            <dataw> ß here is the extra xml tag

               <isEnabled>true</isEnabled>

               <subscriberId>31633333333</subscriberId>

               <data>

                  <rule>

                     <copyaddress copyAddress="31633333330" protocol="Number"/>

                  </rule>

               </data>

            </dataw>

         </dataw>

      </ns0:create>

   </ns1:Body>HTTP/1.1 500 Internal Server Error

X-Powered-By: Servlet/2.5

…………………….

<message>STATUS CODE 604: Exactly one of attributes (subscriberId, cosId, coiId) must be set</message>

 

Soapui tcpdump:

=============

 

<soapenv:Header/>

   <soapenv:Body>

      <aut:create>

         <dataw>

            <subscriberId>31633333</subscriberId>

            <data>

                   <rule invert="?">

                  <copyaddress copyAddress="31633333335" protocol="number"/>                       

               </rule>

            </data>

            <extendedServiceData>?</extendedServiceData>

            <isEnabled>true</isEnabled>

         </dataw>

      </aut:create>

   </soapenv:Body>

</soapenv:Envelope>

 

 

Here is the initialized object, as you can see there is only 1 dataw, while the xml created by suds in the tcpdump contains 2 dataw.

>>> print c_o

(create){

   dataw =

      (autoCopyDataWrapper){

         extendedServiceData = None

         isEnabled = True

         subscriberId = 31633333333

         coiId = None

         cosId = None

         data =

            (autoCopyData){

               rule =

                  (copyAddressRule){

                     endpointFilter =

                        (endpointFilter){

                           criterion[] = <empty>

                           recordId = None

                           _invert = ""

                           _role = ""

                        }

                     name = None

                     scheduleFilter =

                        (simpleActiveRange){

                           activeDays =

                              (activeDays){

                                 day[] = <empty>

                              }

                           activeTime =

                              (simpleTimeRange){

                                 startTime =

                                    (simpleTime){

                                       _hour = ""

                                       _minute = ""

                                    }

                                 endTime =

                                    (simpleTime){

                                       _hour = ""

                                       _minute = ""

                                    }

                              }

                           recordId = None

                           _invert = ""

                           _timeZone = ""

                        }

                     substringFilter =

                        (substringFilter){

                           globalPhraseId = None

                           localPhrase =

                              (phraseHolder){

                                 phrase7Bit = None

                                 phraseUCS2 = None

                              }

                           recordId = None

                           _invert = ""

                        }

                     _invert = ""

                     copyaddress =

                        (copyAddressData){

                           _copyAddress = 31633333330

                           _protocol = "Number"

                        }

                  }

            }

      }

}

 

 

Suds version:

version: 0.3.9 (beta)  build: R658-20100210 with Python 2.5

 

Traceball error:

 

>>> c.service.create(c_o)

 

Traceback (most recent call last):

  File "<pyshell#61>", line 1, in <module>

    c.service.create(c_o)

  File "build\bdist.win32\egg\suds\client.py", line 539, in __call__

    return client.invoke(args, kwargs)

  File "build\bdist.win32\egg\suds\client.py", line 598, in invoke

    result = self.send(msg)

  File "build\bdist.win32\egg\suds\client.py", line 633, in send

    result = self.failed(binding, e)

  File "build\bdist.win32\egg\suds\client.py", line 684, in failed

    r, p = binding.get_fault(reply)

  File "build\bdist.win32\egg\suds\bindings\binding.py", line 238, in get_fault

    raise WebFault(p, faultroot)

WebFault: Server raised fault: 'STATUS CODE 604: Exactly one of attributes (subscriberId, cosId, coiId) must be set'


This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.