Skip to main content

Soap for pyramid.

Project description

pyramid_soap

The pyramid_soap package adapts Soapbox for pyramid framework, to build SOAP Web Services.

Source code at https://bitbucket.org/artgins/pyramid_soap

Example

from pyramid_soap import SOAPService, SOAPVersion, xsd

class GetStockPrice(xsd.ComplexType):
    company = xsd.Element(xsd.String, minOccurs=1)
    hora = xsd.Element(xsd.String)


class StockPrice(xsd.ComplexType):
    price = xsd.Element(xsd.Integer)


Schema = xsd.Schema(
    #Should be unique URL, can be any string.
    targetNamespace="http://127.0.0.1:8000/utsx/pid.xsd",
    #Register all complex types to schema.
    complexTypes=[GetStockPrice, StockPrice],
    elements={
        "getStockPrice": xsd.Element(GetStockPrice),
        "stockPrice": xsd.Element(StockPrice)
    }
)


soap_hello = SOAPService(
    targetNamespace="http://127.0.0.1:8000/utsx/pid.wsdl",
    location="http://127.0.0.1:8000/utsx",
    path="/utsx",
    schema=Schema,
    version=SOAPVersion.SOAP11)


@soap_hello.api(soapAction="GetStockPrice", input="getStockPrice",
                output="stockPrice", operationName="GetStockPrice")
def get_stock_price(request, gsp):
    print gsp.company
    print gsp.hora
    return StockPrice(price=139)

License

pyramid_soap is released under terms of The MIT License MIT.

Copyright (c) 2012, Ginés Martínez Sánchez <ginsmar@artgins.com>

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyramid_soap-0.2.tar.gz (7.5 kB view details)

Uploaded Source

File details

Details for the file pyramid_soap-0.2.tar.gz.

File metadata

  • Download URL: pyramid_soap-0.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyramid_soap-0.2.tar.gz
Algorithm Hash digest
SHA256 accb6b79245c4b48d8022323d3da6dcf3797e2b1d173d8933d87d1ef1394c4a9
MD5 7b64524a8e78973b6e8d7f66f569f065
BLAKE2b-256 e40f10005940cf2f89f4d70abef40791c9e7a410b68d51dfb3e26d774cb26191

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page