Wsdl2interface v.1.0 Alpha 3

Advertisement
Advertisement

wsdl2interface is a Python module that provides a simple script to generate the code for zope.interface style interfaces based on a WSDL file. It relies on suds to perform the conversion.Installation:To install the package, use easy_install, buildout or some other mechanism to install Python eggs, e.g.:easy_install -U wsdl2interfaceYou can also install it as a dependency of another package, e.g. by listing it in that package's setup.py install_requires line.Usage:By default, wsdl2interface` installs a console script of the same name, which you can use to print the generated code to the screen. Pass the URL of a WSDL file (which could be a file:// URL for a local file) as the only argument:wsdl2interface http://www.xignite.com/xIndexComponents.asmx?WSDLThe output will look something like this:"""SOAP web services generated from:http://www.xignite.com/xIndexComponents.asmx?WSDL."""from zope.interface import Interface, Attributeclass IArrayOfComponent(Interface): """SOAP complex type ``{http://www.xignite.com/services/}ArrayOfComponent`` """ Component = Attribute('Type: IComponent[]')class IArrayOfPricedComponent(Interface): """SOAP complex type ``{http://www.xignite.com/services/}ArrayOfPricedComponent`` """ PricedComponent = Attribute('Type: IPricedComponent[]')class ICommon(Interface): """SOAP complex type ``{http://www.xignite.com/services/}Common`` """ Outcome = Attribute('Type: IOutcomeTypes') Message = Attribute('Type: string') Identity = Attribute('Type: string') Delay = Attribute('Type: double')class IComponent(Interface): """SOAP complex type ``{http://www.xignite.com/services/}Component`` """ Security = Attribute('Type: ISecurity') Weight = Attribute('Type: double') AdjustmentFactor = Attribute('Type: double') IndexComponentWeightType = Attribute('Type: IIndexComponentWeightTypes')class IComponents(Interface): """SOAP complex type ``{http://www.xignite.com/services/}Components`` """ Outcome = Attribute('Type: IOutcomeTypes') Message = Attribute('Type: string') Identity = Attribute('Type: string') Delay = Attribute('Type: double') Security = Attribute('Type: ISecurity') Count = Attribute('Type: int') Components = Attribute('Type: IArrayOfComponent')class IHeader(Interface): """SOAP complex type ``{http://www.xignite.com/services/}Header`` """ Username = Attribute('Type: string') Password = Attribute('Type: string') Tracer = Attribute('Type: string')class IIdentifierTypes(Interface): """SOAP enumeration ``{http://www.xignite.com/services/}IdentifierTypes`` """ Symbol = Attribute('Enumeration value') CIK = Attribute('Enumeration value') CUSIP = Attribute('Enumeration value') ISIN = Attribute('Enumeration value') Valoren = Attribute('Enumeration value') SEDOL = Attribute('Enumeration value')class IIndexComponentWeightTypes(Interface): """SOAP enumeration ``{http://www.xignite.com/services/}IndexComponentWeightTypes`` """ Unknown = Attribute('Enumeration value') MarketCapitalizationWeighted = Attribute('Enumeration value') EqualWeighted = Attribute('Enumeration value') PriceWeighted = Attribute('Enumeration value') MarketCapitalizationWeightedWithLimits = Attribute('Enumeration value') OtherWeighting = Attribute('Enumeration value')class IOutcomeTypes(Interface): """SOAP enumeration ``{http://www.xignite.com/services/}OutcomeTypes`` """ Success = Attribute('Enumeration value') SystemError = Attribute('Enumeration value') RequestError = Attribute('Enumeration value') Registrationerror = Attribute('Enumeration value')class IPricedComponent(Interface): """SOAP complex type ``{http://www.xignite.com/services/}PricedComponent`` """ Outcome = Attribute('Type: IOutcomeTypes') Message = Attribute('Type: string') Identity = Attribute('Type: string') Delay = Attribute('Type: double') Symbol = Attribute('Type: string') Name = Attribute('Type: string') Exchange = Attribute('Type: string') CIK = Attribute('Type: string') Cusip = Attribute('Type: string') ISIN = Attribute('Type: string') SEDOL = Attribute('Type: string') Valoren = Attribute('Type: string') Sector = Attribute('Type: string') Class = Attribute('Type: string') IndustryGroup = Attribute('Type: string') Industry = Attribute('Type: string') Country = Attribute('Type: string') Currency = Attribute('Type: string') Style = Attribute('Type: string') Price = Attribute('Type: double') Weight = Attribute('Type: double') Value = Attribute('Type: double') MarketCapitalization = Attribute('Type: double') AdjustmentFactor = Attribute('Type: double') IndexComponentWeightType = Attribute('Type: IIndexComponentWeightTypes')class IPricedComponents(Interface): """SOAP complex type ``{http://www.xignite.com/services/}PricedComponents`` """ Outcome = Attribute('Type: IOutcomeTypes') Message = Attribute('Type: string') Identity = Attribute('Type: string') Delay = Attribute('Type: double') Security = Attribute('Type: ISecurity') Count = Attribute('Type: int') AsOfDate = Attribute('Type: string') Price = Attribute('Type: double') Divisor = Attribute('Type: double') DivisorDate = Attribute('Type: string') PricedComponents = Attribute('Type: IArrayOfPricedComponent')class ISecurity(Interface): """SOAP complex type ``{http://www.xignite.com/services/}Security`` """ Outcome = Attribute('Type: IOutcomeTypes') Message = Attribute('Type: string') Identity = Attribute('Type: string') Delay = Attribute('Type: double') CIK = Attribute('Type: string') Cusip = Attribute('Type: string') Symbol = Attribute('Type: string') ISIN = Attribute('Type: string') Valoren = Attribute('Type: string') Name = Attribute('Type: string') Market = Attribute('Type: string') CategoryOrIndustry = Attribute('Type: string')class IXigniteIndexComponents(Interface): """SOAP service ``XigniteIndexComponents`` with target namespace http://www.xignite.com/services/. """ def GetIndexComponents(Identifier, IdentifierType): """Parameters: ``Identifier`` -- string (optional) ``IdentifierType`` -- IIdentifierTypes """ def GetPricedIndexComponents(Identifier, IdentifierType, AsOfDate): """Parameters: ``Identifier`` -- string (optional) ``IdentifierType`` -- IIdentifierTypes ``AsOfDate`` -- string (optional) """ def GetPricedIndexComponentsSubset(Identifier, IdentifierType, AsOfDate, StartIndex, EndIndex): """Parameters: ``Identifier`` -- string (optional) ``IdentifierType`` -- IIdentifierTypes ``AsOfDate`` -- string (optional) ``StartIndex`` -- int ``EndIndex`` -- int """If you want to use the generator from Python, you can do:>>> from suds.client import Client>>> client = Client(wsdlURL)>>> from wsdl2interface import generate>>> generated = generate(client, wsdlURL)CaveatsThis package is not guaranteed to produce 100% correct code. In most cases, you will need to perform some manual cleanup afterwards. It is also not terribly well tested. Patches welcome!Please note: * WSDL allows identifiers that are not valid in Python. Thus, you could end up with attributes or method which are not valid Python. The script will convert spaces to underscores, but will not handle things like names starting with a digit. * WSDL files with multiple service definitions and/or ports will be flattened. * Complex types and enumerations specifies in the WSDL file will be output first, as individual interfaces. * The namespace and original type name are both output in the docstring of the generated interface for a complex type or enumeration. However, it is possible that the same name will be output. * Types in the following namespaces are not output as complex type interfaces, and are referenced as primitives when used in attributes or method arguments: o http://schemas.xmlsoap.org/soap/encoding/' o http://schemas.xmlsoap.org/wsdl/ o http://www.w3.org/2001/XMLSchema#md5=6a871e51a6282b6dbbd25be82f4e81d2

wsdl2interface is a Python module that ... Create zope.

 
  • Wsdl2interface
  • 1.0 Alpha 3
  • Martin Aspeli
  • Linux
  • Freeware
  • 10 Kb
  • 139
  • Free
 
 

Review Wsdl2interface

  • captcha
 

Other software of Martin Aspeli

New Misc software
  • LanFlow Net Diagrammer  v.6.99.2169LanFlow is a drawing tool for laying out, designing, and documenting a network, LAN, internet, or other communications system.
  • Security Monitor Pro  v.6.21Video Surveillance with multiple IP or USB cameras. Monitor and record from multiple cameras simultaneously, create continuous video recordings, and view multiple cameras in a single window. Receive email/SMS alerts when motion or noise is detected.
  • Internet Cafe Software  v.10.1.0.2Antamedia Internet Cafe controls, secures, and enhances the running of your Internet cafe, gaming center, library, school or hotel public computers. The software restricts access to the system, desktop, drivers, folders and programs.
  • Rank Tracker Enterprise  v.8.41.9Need a tool to track unlimited # of keywords in 400+ search engines? Looking for software to get priceless keyword suggestions? You found it! Build customizable SEO reports for your clients! Grab Rank Tracker - the most efficient SEO app ever!
  • Xhtmldbg  v.0.8.13A Website Debugger for Linux ...
  • Satchmo  v.0.9Satchmo can use Django to create an open source framework for creating unique and robust online stores.