Skip to content

Instantly share code, notes, and snippets.

View plq's full-sized avatar

Burak Arslan plq

View GitHub Profile
@plq
plq / authn.py
Created August 10, 2012 08:26
Namespace Issue
# This file is one copy from https://github.com/arskom/spyne/blob/master/examples/authentication/server_soap.py
import sys
import random
import logging
from spyne.model.complex import ComplexModel
from spyne.model.fault import Fault
from spyne.decorator import srpc
from spyne.error import ArgumentError
from spyne.protocol.soap import Soap11
#!/usr/bin/env python
import datetime
from suds.client import Client
client = Client("http://localhost:9753/?wsdl")
data = client.factory.create("{AAA}PhysicalPersonDataRequest")
data.birthDate = datetime.date(1985,12,11)
print client.service.test(data)
@plq
plq / Client_console.xml
Created November 21, 2012 13:22
[Soap-Python] Problem with simpleContent
Client's consol:
================================================================================
SENT:
<?xml version="1.0" encoding="UTF-8"?>
No handlers could be found for logger "suds.umx.typed"
<SOAP-ENV:Envelope xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="spyne.test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<ns0:Body>
<ns1:testMethod>
<ns1:req>
@plq
plq / .gitignore
Last active December 10, 2015 00:39
qooxdoo
demobrowser
source/script
@plq
plq / client.py
Last active December 14, 2015 05:49
spyne testcase
import suds
client = suds.client.Client("http://127.0.0.1:8080/?wsdl", cache=None)
result = client.service.test(6000.0)
print result
@plq
plq / README.rst
Created April 17, 2013 19:22
Mandatory Uuid error

example for mandatory uuid error.

@plq
plq / output
Last active December 17, 2015 15:19
patch
================================================================================== FAILURES ===================================================================================
_________________________________________________________________ TestSqlAlchemyNested.test_scalar_collection _________________________________________________________________
test_sqlalchemy.py:945: in test_scalar_collection
> session.commit()
/home/plq/src/sqlalchemy/lib/sqlalchemy/orm/session.py:721: in commit
> self.transaction.commit()
/home/plq/src/sqlalchemy/lib/sqlalchemy/orm/session.py:354: in commit
> self._prepare_impl()
/home/plq/src/sqlalchemy/lib/sqlalchemy/orm/session.py:334: in _prepare_impl
> self.session.flush()
@plq
plq / inst.xml
Last active December 19, 2015 18:59
<!DOCTYPE dtd [
<!ENTITY file SYSTEM "some_file">
]>
<SomeObject xmlns="some_ns">
<d>2013-07-15T20:21:43.476838</d>
<i>5</i>
<s>&file;</s>
</SomeObject>
def sq_all(l):
for x in l:
yield x*x
l = [1,2,3,4,None,6,7,8]
print list(sq_all(l))
Traceback (most recent call last):
File "sample.py", line 8, in <module>
print list(sq_all(l))
File "sample.py", line 4, in sq_all
yield x*x
TypeError: unsupported operand type(s) for *: 'NoneType' and 'NoneType'