SOAP client in python, how to replicate with XML
Question: I am using suds to send XML and I got my request working, but I'm really
confused by how to replicate my results using XML. I have the XML request that
my suds client is sending by using:

    
    
    from suds.client import Client
    ulr = "xxxxxxx"
    client = Client(url)
    
    ...
    
    client.last_received.str()
    

but I'm not sure where I would send that request to if I was using the
requests library. How would I replicate the request from the suds client in a
python request?


Answer: Most SOAP APIs are just over plain `HTTP`, use `POST` \- and therefore are
easily mimicked with any standard HTTP client such as Requests.

First [look here](http://stackoverflow.com/questions/4426204/how-can-i-output-
what-suds-is-generating-receiving) to see how to view the headers and body
that suds is sending - it is then a matter of replicating these headers/XML
body and passing them into the Requests library.

One defining characteristic in 99% of all HTTP SOAP API's is that your request
is going to the same end-point for each request (for example
'<http://yyy.com:8080/Posting/LoadPosting.svc>), and the actual action is
specified in the header using `SOAPAction` header). Contrast this to a RESTful
API where the action is implied with the verb + end-point you call (`POST
/user`, `GET /menu` etc.)

