Skip to content

Instantly share code, notes, and snippets.

Avatar

Burak Arslan plq

View GitHub Profile
@plq
plq / FastRezBinding.xsd
Last active Aug 29, 2015
OpenTravel schema test
View FastRezBinding.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.opentravel.org/OTA/2003/05" elementFormDefault="qualified" version="1.00" id="OTA2010B">
<xs:annotation>
<xs:documentation xml:lang="en">All Schema files in the OpenTravel Alliance specification are made available according to the terms defined by the OpenTravel License Agreement at http://www.opentravel.org/Specifications/Default.aspx.</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY" and "OPTIONAL" in this document are to be interpreted as described in RFC 2199.</xs:documentation>
</xs:annotation>
<xs:element name="OTA_HotelAvailRQ">
<xs:annotation>
@plq
plq / sample
Last active Aug 29, 2015 — forked from anonymous/teo.py
View sample
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
1D:EA:DE:AD:BE:EF (unknown)
View README
Schemas are from
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-376,%20Fourth%20Edition,%20Part%201%20-%20Fundamentals%20And%20Markup%20Language%20Reference.zip
found as link of ECMA-376 4th edition Part 1 at:
http://www.ecma-international.org/publications/standards/Ecma-376.htm
View output
INFO:root:Spyne 2.11.0 initialized
INFO:root:create_incident: Parameters:<ns0:IncidentParams xmlns:ns0="tns">
<ns0:number>INC0000001</ns0:number>
</ns0:IncidentParams>
.
----------------------------------------------------------------------
Ran 1 test in 0.009s
OK
View output
<Foo>
<node_b>more_data</node_b>
<node_a ATTR="1st">data1</node_a>
<node_a ATTR="2nd">data2</node_a>
</Foo>
View mi.py
import logging
from uuid import uuid4
from spyne.application import Application
from spyne.decorator import rpc
from spyne.protocol.json import JsonDocument
from spyne.protocol.http import HttpRpc
from spyne.service import ServiceBase
from spyne.model.primitive import String, Integer, Uuid, Unicode
from spyne.model.complex import ComplexModel
from spyne.server.wsgi import WsgiApplication
View someservice.py
#!/usr/bin/env python
# encoding: utf8
# Requires Spyne 2.11
from spyne.model.primitive import *
from spyne.model.complex import *
from spyne.application import Application
from spyne.protocol.soap import Soap11
from spyne.server.wsgi import WsgiApplication
@plq
plq / null.py
Last active Aug 29, 2015
question
View null.py
from spyne.application import Application
from spyne.decorator import rpc
from spyne.service import ServiceBase
from spyne.protocol.soap import Soap11
from spyne.model.primitive import String, Integer
from spyne.model.complex import ComplexModel
class DatosFac(ComplexModel):
__namespace__ = 'facturamanager.datosfac'
numero = String(pattern=r'[A-Z]/[0-9]+')
@plq
plq / gallery.py
Last active Jan 4, 2016
serialization gallery
View gallery.py
@plq
plq / outwit.py
Created Dec 28, 2013
lxml segfault
View outwit.py
from __future__ import print_function
from lxml import etree
from StringIO import StringIO
def coroutine(func):
def start(*args, **kwargs):
ret = func(*args, **kwargs)
try:
You can’t perform that action at this time.