HTTPS Client Authentication
by David Norton
Hello all,
I am somewhat new to Suds but I wanted to share with you a tip on how
to get Suds working with client certificates over HTTPS. This was
something we couldn't find in any Python SOAP library, but thanks to
Suds' extendable nature we were able to pass in the appropriate
connection objects. You can read about it here on our blog:
http://www.threepillarsoftware.com/soap_client_auth
Please let me know if you have any input or questions -- again, I am
new to Suds, but I wanted to start contributing back.
Thanks,
David Norton
Three Pillar Software, Inc.
15 years, 1 month
setting cookies in soap headers
by David Bunch
Hi,
How do you add a cookie to suds soap request headers? I need to set a
cookie called ASP.NET_SessionId.
I read the section on soap headers, but I'm not sure if that applies to what
im trying to do.
Thanks,
-David
15 years, 1 month
Getting method return type
by Mohamed Lrhazi
hi there,
How do I get a method's return type?
Browsing through an instance of suds.client, specifically
client.wsdl.messages, I see the data is there, but is there an API way
for accessing it?
Thanks a lot
Mohamed.
15 years, 1 month
How to create arrayTypes in suds?
by David Bunch
Hi I have a question about ArrayTypes.
I have a webservice function that takes an ArrayOfPoints, Which is an
ArrayType that holds Point objects.
Now, I can create the individual Point objects, but how do I create an
ArrayOfPoints and add points to it? I tried this:
ArrayOfPoints = myClient.factory.create('ArrayOfPoints')
but then, how do I add points to it? List operations don't seem to work.
And when I do this:
ArrayOfPoints = [Point1, Point2, Point3]
myClient.service.calculateCenter(ArrayOfPoints)
I get a fault error saying that ArrayOfPoints could not be serialized.
Any help/insight on this would be much appreciated.
Sincerely,
-David
15 years, 1 month
Attachments
by Kevin Runde
Hi All,
Okay first I need to say AWESOME job on this package. I mean it! This was so easy to use and get started with I couldn't believe it. It is like some sort of sweet black voodoo magic. I should know I've been forced to do Java SOAP for years and have seen many horrors in my time.
I didn't see a way to send an Attachment. Unfortunately this is a requirement for the project I am on. I don't suppose I missed something and there really is Attachment support? Since Suds is so easy and wonderful to work with I am hoping for a miracle and that Suds really does support Attachments and I just missed it.
Thank You,
Kevin Runde
There are 10 kinds of people. Those who understand binary and those who don't.
15 years, 1 month
Are multi dimensional arrays supported?
by Mohamed Lrhazi
Hi all,
We have these WSDLs full of SequenceSequence types, that is an array
of array of some complex type...
I tried instantiating the type, say, mytype, then passing it to a
method that expects such beast as [[mytype]], or [ [mytype,],]
I always the excpetion that follows. Is this unsupported currently?
/usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/client.py
in invoke(self, args, kwargs)
469 binding = self.method.binding.input
470 binding.options = self.options
--> 471 msg = binding.get_message(self.method, args, kwargs)
472 timer.stop()
473 metrics.log.debug(
/usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/binding.py
in get_message(self, method, args, kwargs)
96 content = self.headercontent(method)
97 header = self.header(content)
---> 98 content = self.bodycontent(method, args, kwargs)
99 body = self.body(content)
100 env = self.envelope(header, body)
/usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/bindings/rpc.py
in bodycontent(self, method, args, kwargs)
61 p = self.mkparam(method, pd, value)
62 if p is not None:
---> 63 root.append(p)
64 n += 1
65 return root
/usr/lib/python2.5/site-packages/suds-0.3.5-py2.5.egg/suds/sax/element.py
in append(self, objects)
329 child.parent = self
330 continue
--> 331 raise Exception('append %s not-valid' %
child.__class__.__name__)
332 return self
333
<type 'exceptions.Exception'>: append list not-valid
Thanks,
Mohamed.
15 years, 2 months
Pickling clients?
by Mohamed Lrhazi
Hello,
Was wondering what it would take to make suds clients serializable
with (c)Pickle... or does that not make sense?
Thanks,
Mohamed.
15 years, 2 months
Re: Suds and Sharepoint
by Kevin
Thanks for replying. There seems to be a fair amount of interest out there in automating SharePoint tasks via Python - except that most people can't seem to get it to work.
There's a list of public SharePoint examples at https://usmc-sharepoint.securespsites.com/Lists/Public%20SharePoint%20Exa... , including http://www.wssdemo.com/ . The WSDL files can be accessed as described in the developer.com article in my earlier message, e.g. http://www.wssdemo.com/_vti_bin/Lists.asmx?WSDL .
-K
--- On Thu, 3/5/09, Jeff Ortel <jortel(a)redhat.com> wrote:
> From: Jeff Ortel <jortel(a)redhat.com>
> Subject: Re: [Fedora-suds-list] Re: Suds and Sharepoint
> To: "Kevin" <kehander(a)yahoo.com>
> Cc: fedora-suds-list(a)redhat.com
> Received: Thursday, March 5, 2009, 6:54 AM
> Hey Kevin,
>
> Thanks for you interest in suds.
>
> I've been pretty slammed this week but should be able to
> look in to this today. Any chance you can include the
> wsdl? Can I get access to this server? I can
> resolve questions much quicker if I can run through them on
> the workbench.
>
> -jeff
>
> Kevin wrote:
> > I think I got somewhere in regards to fixing this
> problem. (Sending messages to mailing lists tends to
> do that, no?)
> >
> > I replaced line 361 of Resolver.py with this:
> >
> >
> try:
> >
> result, ancestry = self.getchild(name,
> parent)
> >
> except ValueError:
> >
> result = None
> >
> > The problematic methods then started returning
> recognizable objects that I could do something with.
> (I would file a bug if I had the slightest idea what was
> going on - it's not just a matter of poorly-chosen syntax,
> is it?)
> >
> > I'm still wondering about those "XmlNodes", though.
> >
> > -K
> >
> >
> >
> > --- On Wed, 3/4/09, kehander(a)yahoo.com
> <kehander(a)yahoo.com>
> wrote:
> >
> >> From: kehander(a)yahoo.com
> <kehander(a)yahoo.com>
> >> Subject: Suds and Sharepoint
> >> To: fedora-suds-list(a)redhat.com
> >> Received: Wednesday, March 4, 2009, 3:37 PM
> >> After much anguish, I finally hit
> >> upon the combination of Suds and python-ntlm that
> would let
> >> me access the WSDL on a SharePoint server.
> This seems like
> >> my best bet for automating some SharePoint tasks.
> >>
> >> Alas, I'm a bit unclear as to where to go
> next. So far
> >> I've been able to get meaningful information with
> the
> >> SiteData.GetList method, but something like, say,
> >> Lists.GetListItems remains elusive.
> >>
> >> The method is described at http://msdn.microsoft.com/en-us/library/lists.lists.getlistitems.aspx
> >> and shows up in the suds client as
> >> GetListItems(xs:string listName, xs:string
> viewName, query
> >> query, viewFields viewFields, xs:string rowLimit,
> >> queryOptions queryOptions, xs:string webID, )
> >>
> >> Running client.service.GetListItems('somelist')
> results in
> >> a lengthy backtrace that finishes with
> >> File
> "/usr/lib/python2.5/site-packages/suds/resolver.py",
> >> line 361, in findattr
> >> result, ancestry =
> self.getchild(name,
> >> parent)
> >> ValueError: need more than 0 values to unpack
> >>
> >> whereas
> client.service.GetListItems('somelist','whatever')
> >> ends with
> >> File
> >>
> "/usr/lib/python2.5/site-packages/suds/bindings/binding.py",
> >> line 178, in reply_composite
> >> raise Exception('tag (%s),
> not-found' % tag)
> >> Exception: tag (faultcode), not-found
> >>
> >> I've already been reading http://www.csharphelp.com/archives4/archive602.html
> and
> >> http://www.developer.com/tech/article.php/3104621 ,
> but
> >> I can't quite understand how to apply it
> here. In
> >> particular, how do I supply what is referred to in
> the SDK
> >> as a "System.Xml.XmlNode" ? Is that
> something more
> >> than just a raw string containing XML code?
> >>
> >>
> >> Thanks, K.
> >>
> >>
> >>
> __________________________________________________________________
> >> Yahoo! Canada Toolbar: Search from anywhere on the
> web, and
> >> bookmark your favourite sites. Download it now at
> >> http://ca.toolbar.yahoo.com.
> >>
> >
> >
> >
> __________________________________________________________________
> > Get a sneak peak at messages with a handy reading pane
> with All new Yahoo! Mail: http://ca.promos.yahoo.com/newmail/overview2/
> >
> >
> > _______________________________________________
> > fedora-suds-list mailing list
> > fedora-suds-list(a)redhat.com
> > https://www.redhat.com/mailman/listinfo/fedora-suds-list
>
__________________________________________________________________
Instant Messaging, free SMS, sharing photos and more... Try the new Yahoo! Canada Messenger at http://ca.beta.messenger.yahoo.com/
15 years, 2 months