Get service types

182 views Asked by At

Having Client instance as client I can do print client and get string representation of Client object, i.e.:

Suds ( https://fedorahosted.org/suds/ )  version: 0.4 GA  build: R699-20100913

Service ( RoutingService ) tns="http://tempuri.org/"
   Prefixes (11)
      ns0 = "http://schemas.datacontract.org/2004/07/Microsoft.Dynamics.AX.Framework.Services"
      ns1 = "http://schemas.microsoft.com/2003/10/Serialization/"
      ns2 = "http://schemas.microsoft.com/2003/10/Serialization/Arrays"
      ns3 = "http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKey"
      ns4 = "http://schemas.microsoft.com/dynamics/2006/02/documents/EntityKeyList"
      ns5 = "http://schemas.microsoft.com/dynamics/2006/02/documents/QueryCriteria"
      ns6 = "http://schemas.microsoft.com/dynamics/2008/01/documents/Fault"
      ns7 = "http://schemas.microsoft.com/dynamics/2008/01/documents/LTExchCurrency"
      ns8 = "http://schemas.microsoft.com/dynamics/2008/01/sharedtypes"
      ns9 = "http://schemas.microsoft.com/dynamics/2010/01/datacontracts"
      ns10 = "http://tempuri.org"
   Ports (2):
      (serviceEndpoint)
         Methods (0):
         Types (2949):
            ns6:AifFault
            ns6:ArrayOfFaultMessage
            ns6:ArrayOfFaultMessageList
            ns0:ArrayOfInfologMessage
...

I'm wondering how can I get Types namespace in a Python object without reparsing this string by hand?

For example ns6 for AifFault type.

1

There are 1 answers

0
ebal On BEST ANSWER

How about:

print client.wsdl.tns