Patch for "don't send an element if no data exists for the element"
by Van Nguyen
Hi there,
This seems to be a major problem for a few service implementations when it
sends elements when there's no data. Would it be possible to patch this
upstream?
https://github.com/ExactTarget/FuelSDK-Python/tree/master/Suds%20Changes
Cheers,
Van Nguyen Developer [image: JBA] <http://www.jbadigital.com/> JBA
Online Consultancy W: www.jbadigital.com A: Level 1, 2 Darling Street,
South Yarra, Melbourne 3141 The information contained in this email is
confidential and is intended for the use of the individual or entity named
above. If the receiver of this message is not the intended recipient, you
are hereby notified that any dissemination, distribution or copy of this
email is strictly prohibited. If you have received this e-mail in error,
please notify our office by telephone. JB/A and their employees do not
represent that this transmission is free from viruses or other defects and
you should see it as your responsibility to check for viruses and defects.
JB/A disclaims any liability to any person for loss or damage resulting
(directly or indirectly) from the receipt of electronic mail (including
enclosures).
9 years, 7 months
Encoding problems with responses
by Tobias Ramos Rocha
Hello people,
i´m receiving data from a webservice and trying pass data to python
objects. Logging says that suds succeeds in receive the response from
server.
But when i try to loop the response python raises and unicode error.
here is the part where is the problem
.
.
.
response = client.service.SearchHotel(SearchHotelRequest)
hoteis = response.diffgram.SearchHotelResult[1]
for hotel in hoteis:
hotel Error in formatting: 'ascii' codec can't encode character u'\xca'
in position 2: ordinal not in range(128)
Is there another way to extract data from response ?
Tobias
9 years, 10 months
Подготовка современной публичной речи
by ksruazan@yandex.ru
Самый титулованный бизнес-тренер России
Лидер тренерских рейтингов. Дважды был назван лучшим в профессии по результатам года Ведущий бизнес-тренер и партнер компании ORATORICA
Мастер слова и увлекательный рассказчик, автор серии бестселлеров, тренингов и семинаров по ораторскому искусству Радислав Гандапас.
30 ноября.
"Президент отель" зал Конгресс холл, г. Киев, ул. Госпитальная, 12
МАСТЕР-КЛАСС "ОРАТОРСКОЕ ИСКУССТВО 2.0"
Программа мастер-класса: http://newsnbc.org.ua/training/73/radislav-gandapas-oratorskoe-iskusstvo-...
--
С уважением,
Светлана Ивановна
не получать рассылки alexsandra.wikon(a)mail.ru
Its simple text. Switch to HTML view!
9 years, 10 months
WSDL diffgram
by Tobias Ramos Rocha
Hi Jurko,
the wdsl i´m trying is:
http://xml.trendoperadora.com.br/hotelservices.asmx?WSDL
i´m using this functions to call:
self.objClient is defined here
def objClientSOAP(self):
try:
imp = Import('http://schemas.xmlsoap.org/soap/encoding/')
imp.filter.add('http://xml.trendoperadora.com.br/hotelservices.asmx')
d = ImportDoctor(imp)
client = Client(self.WSDL, doctor=d)
except WebFault, e:
return e
self.objClient = client
return client
def SearchHotel(self, DestinationId, CheckIn, CheckOut,
RoomsInformation, MaxAvrNightPrice, AvailableOnly, ):
soapRequest = self.objClient.factory.create('SearchHotelRequest')
soapRequest.DestinationId = DestinationId
soapRequest.CheckIn = CheckIn
soapRequest.CheckOut = CheckOut
soapRequest.RoomsInformation = RoomsInformation
soapRequest.MaxAvrNightPrice = MaxAvrNightPrice
soapRequest.AvailableOnly = AvailableOnly
response = self.objClient.service.SearchHotel(soapRequest)
self.lastXml = self.objClient.last_sent()
return response
here is the response
http://pastebin.com/Tbjk88Di
i can access some objects with
response.diffgram.SearchHotelResult.Hotel[index]
but in some cases the data inside some objects contais non asccii chars
with causes a python fault. how can i avoid this?
Thanks in advance.
Tobias
Hi.
On 28.11.2013. 2:22, Tobias Ramos Rocha wrote:
Hello people,
i´m receiving data from a webservice and trying pass data to python
objects. Logging says that suds succeeds in receive the response from
server.
But when i try to loop the response python raises and unicode error.
here is the part where is the problem
.
.
.
response = client.service.SearchHotel(SearchHotelRequest)
hoteis = response.diffgram.SearchHotelResult[1]
for hotel in hoteis:
hotel Error in formatting: 'ascii' codec can't encode character u'\xca'
in position 2: ordinal not in range(128)
Is there another way to extract data from response ?
If you send us the exact WSDL and the exact HTTP response to your query,
someone can take a look.
Hope this helps.
Best regards,
Jurko Gospodnetic'
_______________________________________________
suds mailing list
suds@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/suds
9 years, 10 months
Защитная плёнка – камеры ГИБДД уже бессильна.
by INVIS
Забудьте об антирадаре! Защитная плёнка – новое слово в борьбе с камерами ГИБДД.
Защитная пленка на номер - это уникальная пленка, которая накладывается на цифры номера и делает его невидимым для камер ГИБДД. Плёнка незаметна для человеческого глаза и обычных видеокамер. А вот камеры автоматической фиксации правонарушений "Стрелка СТ" и другие камеры снимающие в инфракрасном (ИК) спектре не видят ваш номер. Более 90% камер работает по такой технологии, и, следовательно, вы можете не беспокоиться за фиксацию нарушения. WWW.INVIS-XNOMER.NET
9 years, 10 months
Интернет магазин орбитреков
by risograph@rambler.ru
Электрошокер - фонарь.Эффективная защита!
Как похудеть за неделю
Акция!Универсальный домашний турник 12 в 1
Вмятины на автомобиле?Вот выход!
Smooth Away (Гладкие Ножки)средство для дипиляции.
Видеорегистраторы.GPS-Навигаторы.
Derma seta заменит Вам дорогостоящие походы в салоны красоты!
Царапины на авто?!5 минут и их нету.
Its simple text. Switch to HTML view!
9 years, 10 months
Повышение квалификации сотрудников.
by kto@migmail.ru
hr(a)nbc.ua
Бизнес-мероприятия этой недели
12-13 февраля.
Конференция:Агробизнес в Украине сегодня и завтра. Финансовые и инвестиционные возможности сельхозпредприятий в Украине.
4 декабря.
11 способов увеличить продажи, которые не делают даже ваши конкуренты.
6 декабря.
Партизанский маркетинг в Интернете.
6 декабря.
Деловые переговоры: технологии вашей победы.
10-11 декабря.
Пути повышения качества и конкурентоспособности непищевой продукции. Стандартизация, оценка соответствия, рыночный надзор.
10-11 декабря.
ПРОДАЮЩИЕ ТЕКСТЫ. Повышаем продажи в 2 раза!
11 декабря.
ТРАНСФЕРТНОЕ ЦЕНООБРАЗОВАНИЕ. Методы. Документация. Контроль.
12 декабря.
Повышение эффективности работы консультанта в торговом зале. Психологические аспекты и техники привлечения клиентов.
Последние обновления на сайте
Совет менеджерам: занимаемся самообразованием.
Как стать ТОП-менеджером? Ваши факторы успеха.
Важнейший фактор успеха в сетевом маркетинге
© Бизнес-Центр "Национальный"
Тел.: (044) 237-90-05
Факс: (044) 233-46-69
E-mail: hr(a)nbc.ua
Web: newsnbc.org.ua
Отписаться: alexsandra.renowih(a)mail.ru
Its simple text. Switch to HTML view!
9 years, 10 months
Server returning correct result as a WebFault
by Matteo Gnudi
Hello, I'm using SUDS 0.4 and TGWebServices 1.2.4 to expose a webservice
which should return a ComplexType (I'm pretty new to all of this), but
something's not working correctly when this WS is invoked: the output is
what I expected it to be, but I receive it as the message of a WebFault.
Here are the details:
class AuthenticationResponse(object):
ticket = str
error = ''
def __init__(self, error="", ticket=""):
self.ticket = ticket
self.error = error
class WebService(WebServicesRoot):
@wsexpose(AuthenticationResponse)
@wsvalidate(str,str)
def authentication(self, username='', password=''):
result = AuthenticationResponse()
if not (username and password):
result.error = "Insert both username and password"; return
result
va = validate_auth(username, encrypt_pw(password)) #Checks if the
credentials are valid
if va:
ticket =
base64.urlsafe_b64encode(uuid.uuid4().bytes).replace('=', '')
mem[ticket] = dict(expires =
datetime.datetime.now()+datetime.timedelta(hours=1), user = username)
result.ticket = ticket; return result
else:
result.error = "Incorrect username or password"; return result
This is what happens:
client.service.authentication(username='foo', password='bar')
---------------------------------------------------------------------------
WebFault Traceback (most recent call last)
/home/matteo/buildout/trunk/<ipython console> in <module>()
/home/matteo/buildout/eggs/suds-0.4-py2.6.egg/suds/client.pyc in
__call__(self, *args, **kwargs)
540 return (500, e)
541 else:
--> 542 return client.invoke(args, kwargs)
543
544 def faults(self):
/home/matteo/buildout/eggs/suds-0.4-py2.6.egg/suds/client.pyc in
invoke(self, args, kwargs)
600 timer)
601 timer.start()
--> 602 result = self.send(soapenv)
603 timer.stop()
604 metrics.log.debug(
/home/matteo/buildout/eggs/suds-0.4-py2.6.egg/suds/client.pyc in send(self,
soapenv)
647 else:
648 log.error(self.last_sent())
--> 649 result = self.failed(binding, e)
650 return result
651
/home/matteo/buildout/eggs/suds-0.4-py2.6.egg/suds/client.pyc in
failed(self, binding, error)
700 if status == 500:
701 if len(reply) > 0:
--> 702 r, p = binding.get_fault(reply)
703 self.last_received(r)
704 return (status, p)
/home/matteo/buildout/eggs/suds-0.4-py2.6.egg/suds/bindings/binding.pyc in
get_fault(self, reply)
263 p = unmarshaller.process(fault)
264 if self.options().faults:
--> 265 raise WebFault(p, faultroot)
266 return (faultroot, p.detail)
267
WebFault: Server raised fault: '(('result', <type 'str'>, {'ticket':
'blahblahblahdiblah', 'error': ''}), {}, <bound method SoapController.index
of <tgwebservices.soap.SoapController object at 0x1d141d10>>)'
I was expecting an instance of the AuthenticationResponse object with the
correct parameters being set.
What am I doing wrong? Is this something about SUDS or TGWS?
Thanks in advance for your support.
9 years, 10 months
Бизнес-мероприятия этой недели
by Eva
hr(a)nbc.ua
Бизнес-мероприятия этой недели
Дата проведенияНазвание
22 ноября.Мастер-презентаций: принципы и правила создания запоминающихся презентаций
27 ноября.ПРОВЕРКИ ПО-НОВОМУ: К ЧЕМУ ГОТОВИТЬСЯ. Защита интересов предприятия от противоправной деятельности представителей контролирующих органов.
28 ноября.АКТИВНЫЕ ПРОДАЖИ В2В. Техники и технологии активного продвижения товаров.
28 ноября.Бюджетирование с шаблонами бюджетов и финансовой моделью, KPI мотивация.
28-29 ноября.Производство и логистика.
29 ноября.Результативное управление. Технология достижения результатов.
30 ноября.Радислав Гандапас. Ораторское искусство 2.0.
4 декабря.11 способов увеличить продажи, которые не делают даже ваши конкуренты.
6 декабря.Партизанский маркетинг в Интернете.
6 декабря.Деловые переговоры: технологии вашей победы.
6 декабря.Система сбалансированных показателей.
10-11 декабря.Пути повышения качества и конкурентоспособности непищевой продукции. Стандартизация, оценка соответствия, рыночный надзор.
10-11 декабря.ПРОДАЮЩИЕ ТЕКСТЫ. Повышаем продажи в 2 раза!
11 декабря.Стратегия прибыльного роста: Как разработать и внедрить стратегию на базе BSC.
Последние обновления на сайте
Как продавать информацию методами прямого маркетинга
Маркетинг обучения в компании. Как мотивировать на обучение
Важнейший фактор успеха в сетевом маркетинге
© Бизнес-Центр "Национальный"
Тел.: (044) 237-90-05
Факс: (044) 233-46-69
E-mail: hr(a)nbc.ua
Web: newsnbc.org.ua
Отписаться: alexsandra.renowih(a)mail.ru
9 years, 10 months