Hi all,
I wrote this script:
from suds.client import Client
import datetime
#import logging
from suds.transport.http import HttpAuthenticated
#logging.basicConfig(level=logging.DEBUG)
#logging.getLogger('suds.client').setLevel(logging.DEBUG)
url_test='https://wstest.izs.it/j_test_canina/ws/search/Search.ws?wsdl'
client = Client(url_test)
token = client.factory.create('SOAPAutenticazioneWS')
token.username = 'sicilia'
token.password = 'sicilia'
token.ruoloCodice = 'ASL'
token.ruoloValoreCodice='V103'
client.set_options(soapheaders=token)
chip = client.factory.create('animaleSearchTO')
chip.anmMicrchip = '968000000818380'
result = client.service.searchAnimale(chip)
and it raise this error:
No handlers could be found for logger "suds.client"
Traceback (most recent call last):
File "/tmp/test_canina.py", line 17, in <module>
result = client.service.searchAnimale(chip)
File "/tmp/suds/client.py", line 542, in __call__
return client.invoke(args, kwargs)
File "/tmp/suds/client.py", line 602, in invoke
result = self.send(soapenv)
File "/tmp/suds/client.py", line 649, in send
result = self.failed(binding, e)
File "/tmp/suds/client.py", line 702, in failed
r, p = binding.get_fault(reply)
File "/tmp/suds/bindings/binding.py", line 265, in get_fault
raise WebFault(p, faultroot)
suds.WebFault: Server raised fault: 'local part cannot be "null" when
creating a QName'
I can't realize what is wrong.
j
======================================================
Conference Announcement: Full Paper Submission Deadline (January 31, 2012)
======================================================
It is our great pleasure to announce the 2012 International Conference on Electrical Engineering (ICEENG'8) to be held in Cairo, Egypt, 29 - 31 May 2012. The Conference is organized to invite international delegates, to share their latest research findings on Electrical Engineering. ICEENG'8 is organized by Military Technical College (www.mtc.edu.eg<http://www.mtc.edu.eg/>).
Papers on original works are solicited on a variety of topics, including but not limited to the following symposium tracks:
Communication Systems - Computer Engineering - Biomedical Engineering - Power Engineering - Circuits, Signals and Systems - Electromagnetic Fields and Waves - Electronic Measurements and Instrumentations - Remote Sensing and Avionics - Optoelectronics - Guidance and Control - Radar Systems - Student Session
Submission:
Please submit full papers as attached file (free .doc or .docx format) to the Conference email address: iceeng-8(a)mtc.edu.eg<mailto:iceeng-8@mtc.edu.eg>
Further information can be obtained from the following website: http://www.mtc.edu.eg/all-conf.htm
Important Dates/Deadlines: Paper Submission Deadline: January 31, 2012
kindly forward this email to other interested parties.
Regards
--------------------------------
Prof. W. Sabry
ICEENG-8 Rapporteur
iceeng-8(a)mtc.edu.eg<https://mail.afmic.com/owa/redir.aspx?C=aa81256c90b1433c81685e2ebe5cbc6b&UR…>
<https://mail.afmic.com/owa/redir.aspx?C=aa81256c90b1433c81685e2ebe5cbc6b&UR…>http://<https://mail.afmic.com/owa/redir.aspx?C=aa81256c90b1433c81685e2ebe5cbc6b&UR…>www.mtc.edu.eg<https://mail.afmic.com/owa/redir.aspx?C=aa81256c90b1433c81685e2ebe5cbc6b&UR…>/all-conf.htm
Tel. (002 - 010) 1455463
Fax. (002 - 02) 26178868
-------------------------------------------------------------------
* We apologize if you receive multiple copies of this CFP
* All replies must be directed to: iceeng-8[at]mtc[dot]edu[dot]eg<https://mail.afmic.com/owa/redir.aspx?C=aa81256c90b1433c81685e2ebe5cbc6b&UR…>
-------------------------------------------------------------------
Hi all.
I was looking into suds a bit and found the development to either be
slowish or I was just unlucky and did not run into the correct developers.
I tried but could not find any active enough project repositories so
I prepared a Mercurial repository at 'https://bitbucket.org/jurko/suds'
containing some of my patches - for now mostly concentrating on
preparing a more detailed test suite as I research suds. For other
topics I'd like to change/add in the suds library itself - I'll post
separate messages to the mailing list.
I also helped update the Py3 patch series a bit (hosted at
'https://bitbucket.org/bernh/suds-python-3-patches'). It has a few more
Py3 related fixes, can now be applied on top of my repository and the
original suds one and its results are still compatible with Py2.
Is there any chance for such changes to be accepted back into the
original project repository and how should one go about it? Or how to at
least get feedback on what else needs to be done for them to be accepted?
Is there any interest at all for such further suds library
development? Or should I just keep my work for private use?
Best regards,
Jurko Gospodnetić
Hi,
I implemented basic WS-Security-compliant digital signature support for SUDS
as a message plugins, so it's usable without modifying the library source
code. I put most information necessary to try it into the README.md file, in
case you're interested about the internals, I've written my masters thesis
about it, latter can be downloaded from http://vsza.hu/thesis-beta.pdf
I tested my solution with Apache CXF, so any other interoperation experiences
are welcome, along with other suggestions and/or patches.
The code can be downloaded from my GitHub repository: http://git.io/sudsign
--
Regards,
András Veres-Szentkirályi
This is the mail system at host mx01.topica.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<rdj-subscribe(a)topica.com>: delivery temporarily suspended: connect to
bmx2.topica.com[208.96.6.230]: Connection timed out
Other treatment options for impotence include injections and inserts, but we prefer pills.
Dear suds,
Even if your sex life is already rich and fulfilling... Imagine you had a little more energy... if your erections stayed harder... or you could go just a little longer...
Or maybe you worry, when you climb under the covers, that you�re starting something you can�t finish?
Well, now advancements in natural medicine are making it easier than ever to promote a strong libido, firm, natural erections and enhanced desire.
Now thanks to this exciting natural breakthrough, you could get an erection �on demand� and when you do, sustain it long enough � and keep firm enough � to fully satisfy your wife in bed. Even if you�re in your 50s, 60s, 70s, 80s or older!
As a doctor, I�ve learned something over the years that may surprise you � age has very little to do with sex. There are men out there having the best sex of their lives well into their 80th year and beyond.
And those men have three key things in common that their sex starved friends don�t:
Hard, recurring erections...
Heightened desire and stamina...
And a reproductive system that could be functioning at the top of its game...
Lucky? You bet.
But you too could give your body the nutrients it needs to support your entire sexual health.
Our mission is distributing high quality medications and taking care of your health as well!
**************************************************************************
>>> http://pillswal.com.ua <<<
**************************************************************************
Hi, all:
Recently, I have been do something about python webservice. Above all the
methods of python webservice, soaplib is welcome and popular. When using
soaplib, some problems puzzled me as follows.
porlbem 1: soaplib provide client-side or not?
Usually, I use soaplib as follows:
# file-name: soaplib_server.py:
# -*- coding:utf-8 -*-
from soaplib.wsgi_soap import SimpleWSGISoapApp
from soaplib.service import soapmethod
from soaplib.serializers.clazz import ClassSerializer
from soaplib.serializers.primitive import String, Integer, Array, DateTime
class SMS(ClassSerializer):
class types:
mobile = String
content = String
class SMSService(SimpleWSGISoapApp):
@soapmethod(String, _returns=Array(SMS))
def get_sms(self,id):
sms_lst = []
sms = SMS()
sms.mobile = "13011292217"
sms.content = "hi, it's a test!"
sms_lst.append(sms)
return sms_lst
def make_client():
from soaplib.client import make_service_client
client = make_service_client('http://localhost:7789/' ,SMSService())
return client
if __name__=='__main__':
try:
from wsgiref.simple_server import make_server
server = make_server('localhost', 7789,SMSService())
server.serve_forever()
except ImportError:
print "Error: example server code requires Python >= 2.5"
#file-name: suds_client.py
import suds
def test_soaplib3():
import logging
logging.basicConfig(level=logging.ERROR)
url = "http://localhost:7789/?wsdl"
client = suds.client.Client(url,cache=None)
print 'client', client
output = client.service.get_sms('jia')
print 'output', output
#NOTE: Certainly, it's okay. Below is the output:
#output:
client
Suds ( https://fedorahosted.org/suds/ ) version: 0.3.7 GA build:
R580-20091016
Service ( SMSService ) tns="SMSService.SMSService"
Prefixes (1)
ns0 = "SMSService.SMSService"
Ports (1):
(SMSService)
Methods (1):
get_sms(xs:string id, )
Types (4):
SMS
SMSArray
get_sms
get_smsResponse
output (SMSArray){
_type = "tns:SMSArray"
SMS[] =
(SMS){
content = "hi, it's a test!"
mobile = "13011292217"
},
}
#NOTE: do you find the "def make_client():" in the server-side ? It's no
use when we use suds_client.py. Now, let me talk the problem:
I think soaplib is only a server-side and without client, you also can find
the words as follows in "http://soaplib.github.com/soaplib/2_0/":
"Soaplib is an easy to use Python library for publishing SOAP web services
using WSDL 1.1 standard, and answering SOAP 1.1 requests. With a very small
amount of code, soaplib allows you to write a useful web service and deploy
it as a WSGI application. (Non-WSGI scenarios are also supported.)"
Most of scenes, soaplib make as server and suds did for client. They can
work together well.
In a web page, I found someone use client by soaplib, the client can be
write as follows:
# file-name: soaplib_client.py
# -*- coding:utf-8 -*-
from soaplib_server3 import SMSService
from soaplib_server3 import make_client
import lxml.etree as et
a = make_client()
ret = a.get_sms('jia')
print 'ret:', ret
print 'type of ret:', type(ret)
for i,r in enumerate(ret):
print 'i:',i, r.mobile, r.content
#output:
ret: [<soaplib_server3.SMS object at 0x8ecf7ec>]
type of ret: <type 'list'>
i: 0 13011292217 hi, it's a test!
#NOTE: now, the questions are :
1: Whether soaplib can provide client?
2: If the answer for question 1 is okay, then the second question is : how
to provide a webservice client using soaplib? Is the method "client =
make_service_client('http://localhost:7789/' ,SMSService())" which is be
used in my soaplib_serve.py?
3: if you agree that soaplib can make as websevice client-side, I would
like to ask: The client relays so heavily on sever-side, in the
client-side, it requests some classes or modules in server side are
imported. If we use soaplib-client to invoke a remote server(it may be
developed in Java, C#, php or other language, or python which is not in the
some local), how we get the class in server?
I do not whether i speak my question clearly. In actual fact, what I eager
to know is how to provide a client-side using soaplib if soaplib can.
part 2: Is there someone find it spend much time and not stable to invoke
soaplib using suds as follows.
#NOTE: the code can also be found in "
http://soaplib.github.com/soaplib/2_0/pages/helloworld.html"
# soaplib_server.py
import soaplib
from soaplib.core.service import soap
from soaplib.core.service import rpc, DefinitionBase
from soaplib.core.model.primitive import String, Integer
from soaplib.core.server import wsgi
from soaplib.core.model.clazz import Array
from soaplib.core import Application
class HelloWorldService(DefinitionBase):
@soap(String,Integer,_returns=Array(String))
def say_hello(self,name,times):
results = []
for i in range(0,times):
results.append('Hello, %s'%name)
return results
if __name__=='__main__':
print 'server begin running...'
try:
from wsgiref.simple_server import make_server
soap_application = Application([HelloWorldService], 'tns')
wsgi_application = wsgi.Application(soap_application)
server = make_server('localhost', 7789, wsgi_application)
server.serve_forever()
except ImportError:
print "Error: example server code requires Python >= 2.5"
# suds.py
import suds
def test_soaplib():
url = "http://localhost:7789/?wsdl"
client = suds.client.Client(url,cache=None)
print 'client', client
output = client.service.say_hello('jia',3)
print 'output', output
when you invoke sus.py , it takes much time and a long time later returns
the right result
”output (stringArray){
string[] =
"Hello, jia",
"Hello, jia",
"Hello, jia",
}
“
or the exception below(it‘s not present exceptions as follows. most of time
it return the result successfully after 2 or 3 minutes).
Traceback (most recent call last):
File "suds_client.py", line 774, in <module>
test_soaplib()
File "suds_client.py", line 627, in test_soaplib
client = suds.client.Client(url,cache=None)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/client.py",
line 109, in __init__
self.wsdl = Definitions(url, options)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/wsdl.py",
line 194, in __init__
self.build_schema()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/wsdl.py",
line 255, in build_schema
self.schema = container.load()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 90, in load
child.open_imports()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 277, in open_imports
imported = imp.open()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 608, in open
result = self.download()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 628, in download
return self.schema.instance(root, url)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 367, in instance
return Schema(root, baseurl, self.options)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 200, in __init__
self.open_imports()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 277, in open_imports
imported = imp.open()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 608, in open
result = self.download()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 626, in download
root = Parser(transport).parse(url=url).root()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/sax/parser.py",
line 133, in parse
fp = self.transport.open(Request(url))
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/https.py",
line 69, in open
return HttpTransport.open(self, request)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/http.py",
line 69, in open
fp = self.__open(u2request)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/http.py",
line 107, in __open
return self.urlopener.open(u2request)
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1134, in do_open
r = h.getresponse()
File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
raise BadStatusLine(line)
# okay, the problem is why sometimes the client return the exception and
most of time return the correct results some minutes later?
Thanks for your time and concentration. Any relay is welcome.
-- Jia Xiaolei
Hi, all:
These days I have been doing something about python webservice. Suds, as a
client-end, it's good.
Now, ask a question I encounter with about suds:
When I try to invoke a remote method getWeather() in the url "
http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl", it
failed. My code and the exception returned are as follows:
# filename: suds.py
import suds
def test_weather():
from suds.xsd.doctor import ImportDoctor, Import
imp = Import('http://www.w3.org/2001/XMLSchema')
d = ImportDoctor(imp)
url = "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl"
client =
suds.client.Client(url,doctor=d,cache=None,xstq=False,faults=False)
print 'client', client
a = 10.0
b = 3.0
#output1 = client.service.getRegionCountry()
output = client.service.getWeather(100)
print 'weatherv', output
# output:
Traceback (most recent call last):
File "suds_client.py", line 787, in <module>
test_weather()
File "suds_client.py", line 739, in test_weather
client =
suds.client.Client(url,doctor=d,cache=None,xstq=False,faults=False)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/client.py",
line 109, in __init__
self.wsdl = Definitions(url, options)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/wsdl.py",
line 194, in __init__
self.build_schema()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/wsdl.py",
line 255, in build_schema
self.schema = container.load()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 90, in load
child.open_imports()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 277, in open_imports
imported = imp.open()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 608, in open
result = self.download()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 628, in download
return self.schema.instance(root, url)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 367, in instance
return Schema(root, baseurl, self.options)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 200, in __init__
self.open_imports()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/schema.py",
line 277, in open_imports
imported = imp.open()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 608, in open
result = self.download()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/xsd/sxbasic.py",
line 626, in download
root = Parser(transport).parse(url=url).root()
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/sax/parser.py",
line 133, in parse
fp = self.transport.open(Request(url))
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/https.py",
line 69, in open
return HttpTransport.open(self, request)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/http.py",
line 69, in open
fp = self.__open(u2request)
File
"/usr/local/lib/python2.6/dist-packages/suds-0.3.7-py2.6.egg/suds/transport/http.py",
line 107, in __open
return self.urlopener.open(u2request)
File "/usr/lib/python2.6/urllib2.py", line 391, in open
response = self._open(req, data)
File "/usr/lib/python2.6/urllib2.py", line 409, in _open
'_open', req)
File "/usr/lib/python2.6/urllib2.py", line 369, in _call_chain
result = func(*args)
File "/usr/lib/python2.6/urllib2.py", line 1161, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.6/urllib2.py", line 1134, in do_open
r = h.getresponse()
File "/usr/lib/python2.6/httplib.py", line 986, in getresponse
response.begin()
File "/usr/lib/python2.6/httplib.py", line 391, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.6/httplib.py", line 355, in _read_status
raise BadStatusLine(line)
#NOTE:
1: the url "http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?wsdl"
is avaliable, you can click it and see the wsdl.
2: the url is provided by a corporation in China, in another page (
http://webservice.webxml.com.cn/WebServices/WeatherWS.asmx?op=getWeather)
put a number in the field “theCityCode” and click the butter , you can get
a xml file has contains the results. Anyone can have a try!
I like suds and believe it's strong and stable enough. Hope someone can
tell me what's the reason it throw exception?
-- Jia Xiaolei