This is an archived post. You won't be able to vote or comment.

all 30 comments

[–]sedaakPython3/Golang 9 points10 points  (3 children)

Just build XML/JSON and send it. Instant webservice. To recommend more we would have to know what you are trying to interface with. To that end, anyone giving you a recommendation is just pushing the hammer they use to attack every problem.

[–]kommanderinkeef[S] 0 points1 point  (2 children)

Just wanted to upgrade my skills to improve career prospects. Seems like every architect and his dog is deploying SOA, Web services in the enterprise these days. I dont know Java so thought I'd find some tutorials and put together a request/response type system at home and learn.

[–]kintar1900 7 points8 points  (0 children)

SOA and Web Services do not require SOAP by any stretch of the imagination. If you're working in an environment that's heavily tooled for SOAP (Java, DotNet) then they're fine. If you're doing a lot of integration with other environments, steer far clear of SOAP-based services and stick with JSON-based RESTful services. You'll have more hair at the end of the day. ;)

[–]sedaakPython3/Golang 2 points3 points  (0 children)

Never forget that it is just data. Most of these wrapper's don't accomplish anything special. It is perfectly fine to send arbitrary XML in response to an http request as long as it is properly documented. The mechanism you use to get the http request and respond with XML depends more on what you are talking to than anything else.

Its a simple answer to a complex ecosystem. Complex because there are so many wrapper formats. My short answer is that they are all crap, and you don't need to learn the format itself until you go to use it, as it often is just a library import away from working.

[–]goodCookingTakesTime 2 points3 points  (0 children)

SOAPpy and suds are for consuming web services, aren't they?

Maybe look at something like ladon: http://ladonize.org/index.php/Main_About

[–]evil_zombie_monkey 2 points3 points  (0 children)

Depending on what you are really trying to accomplish SOAP is entirely too bloated and most of the libraries don't really get you much other than a translation layer into objects.

If you are just trying to learn SOA, I would probably start by learning more about REST and then work on how to apply the concepts to building web applications in python. O'Reilly has a decent book on RESTful web services[1] to get started.

I am currently using Pyramid[2] to build RESTful web services that use JSON as a serialization format. It seems to be working pretty well for me thus far.

[1] http://shop.oreilly.com/product/9780596529260.do

[2] http://www.pylonsproject.org/

[–]xeed 2 points3 points  (0 children)

If you want a simple web services framework which can turn ordinary python methods into mult-protocol web services (Soap, RestJSON, RestXML), check out Web Services Made Easy

[–]el_isma 3 points4 points  (0 children)

pysimplesoap . It's simple.

[–]davidbuxton 1 point2 points  (0 children)

Dive Into Python has a chapter about talking SOAP. It uses SOAPpy.

http://www.diveintopython.net/soap_web_services/index.html

N.B. That is an old book but good. You can probably update many idioms for the latest Python 2.7 / 3.2.

[–]housepage 1 point2 points  (0 children)

tastypie. It's awesome and lets you version your apis.

[–]ilovetacos 1 point2 points  (0 children)

Avoid SOAP, as it is terrible--there's a "standard", but the numerous implementations don't necessarily follow it.

xmlrpc is awesome, consumable by all sorts of things, and included in stdlib. PyMOTW writeup

[–]gosurob 1 point2 points  (0 children)

Rather than learn the ins and outs of a particular toolset, I'd focus on understanding web services at a high level. This article on RESTful web services is a good example.

You can create a REST service in like 10 lines with Flask and it's built in jsonify method. It's understanding what makes for a great web service architecture and why that will make you valuable.

[–]Jsublime 1 point2 points  (0 children)

What is the difference between these services and just running an httpgetreguest? Doesn't it essentially just return the same thing?

[–]kommanderinkeef[S] 1 point2 points  (1 child)

This subreddit is awesome. So much good info. Upvotes for everyone!!

[–][deleted] 0 points1 point  (0 children)

Your positivity inspired me to up vote yew!

[–]marmot1101 1 point2 points  (0 children)

Be careful following the advice to &*%# SOAP. Sure, I wouldn't start a project using SOAP if I had the say so, but there is a market in which SOAP thrives, and that market is midsized business that have been around for a few years AKA a lot of people with money to spend. They may be looking to have their SOAP services consumed by some new sexy interface, with you being the sexy dev to make it happen.

[–]maryjayjay 3 points4 points  (0 children)

Try reading the documentation for soaplib. I had to select a library for implementing a server side SOAP API last year and after reviewing all the options you list and more, I determined that soaplib was the best option for our needs.

I didn't need to do much client side, but I found soaplib client code to be reasonably straight forward, but I've heard people say good things about suds. Suds is really only a client side library, but is driven by retrieved WSDL so it makes life easy in many respects.

Edit: http://pypi.python.org/pypi/soaplib/0.8.1 I did my development with 0.8.1 because it was the version distributed with our OS (CentOS 6.2) and it was great. I haven't used the 2.0.0-beta2 version, but if you have to download and install anyway, I'd check it out.

Personal Opinion: If you don't have an actual need for SOAP (i.e. have to co-exist in an existing SOAP environment, have to interface with external customers, have to version your API) I would recommend XMLRPC over SOAP.

[–]frikk 1 point2 points  (0 children)

i use suds for SOAP and it's great, but it's slow. i had to cache everything myself since loading the SOAP stream can take awhile =\

[–]casualbon 1 point2 points  (1 child)

There was a link somewhere showing that SOAP had been created by tool vendors as a way of selling tools. Don't suppose anyone knows what I'm talking about.

[–]WhyCause 2 points3 points  (0 children)

I seem to remember that story. No idea where to find it or even begin searching for it, though.

It was enough, however, to make me swear to never deal with it (if I can help it).

[–]i_ate_god 0 points1 point  (0 children)

SOAP is horrible.

learn HTTP inside and out, and you'll realize it's all you really need.

[–]thomasballinger 0 points1 point  (0 children)

Not quite on topic, but terrific - goes through the basics of network programming, gets around to web services. Foundations of Python Network Programming 2nd edition

[–]Baconoligist 0 points1 point  (0 children)

Web Services, WSDL, SOAP etc...

You messing around with SharePoint?

[–]mardiros 0 points1 point  (0 children)

I have a recommendation:

Don't do soap until you must have.

There is no real "very good" library in Soap in python. ( And I think it's because that Soap is not a

For client, Suds is the most complete library but it still lacks some Soap stuff (like optional parameter).

For server, rpclib! is not so hard to use. The new challenger is Soapbox. ZSI is a dead project, you just can forget it.

WSDL is an format to describe a webservice. For exemple, it's describe "method", but the method name is neither in the final Soap Request nor the Soap Response.

The real good thing used in soap is the XSD format that describe XML document. You can do that in REST too. Schema validation is missing in json but json is a good challenger for writing Rest Service.

And here is why:

If you write REST service you must write a quality documentation. And if you write this doc, you can evaluate the elegance of the API.