zsi

Adding Cookie to ZSI Posts

I've added cookie support to SOAPpy by overriding HTTPTransport. I need functionality beyond that of SOAPpy, so I was planning on moving to ZSI, but I can't figure out how to put the Cookies on the ZSI posts made to the service. Without these cookies, the server will think it is an unauthorized request and it will fail. How can I add ...

Generating a WSDL using Python and SOAPpy

First of all, I will admit I am a novice to web services, although I'm familiar with HTML and basic web stuff. I created a quick-and-dirty web service using Python that calls a stored procedure in a MySQL database, that simply returns a BIGINT value. I want to return this value in the web service, and I want to generate a WSDL that I c...

Public free web services for testing soap client

Are there any publicly available SOAP 1.2/WSDL 2.0 compliant free web services for testing a Python based soap client library (e.g. Zolera SOAP Infrastructure)? So far, it appears to me that Google Web API may be the only option. Otherwise, how can one test a SOAP 1.2 compliant client library? ...

python web-services: returning a fault from the server using ZSI

I'm interested in writing a python client for a web-service, and for testing purposes it would be very interesting also to have a simple stub server. I'm using python 2.3, and ZSI 2.0. My problem is that I do not manage to return an exception from the server. If I raise an exception of the type used for the soap fault in the wsdl, I ge...

Literal XML (unescaped) parameter in ZSI

I'm using ZSI to talk to a SOAP web service. One of the methods expects a literal XML string wrapped in a CDATA tag. How can I make it so that ZSI will NOT escape the string? For example, I want to pass the following as a parameter: <query> <name>Elmer Fudd</name> <age unit="years">33</age> <job>Wabbit Hunter</job> </query> I d...

Python SOAP clients will not work with this WSDL

Thus far I've tried to access this WSDL: https://login.azoogleads.com/affiliate/tool/soap%5Fapi from the two common Python SOAP clients that I'm aware of: SOAPpy and ZSI.client.Binding. SOAPpy raises an exception in PyXML (xml.parsers.expat.ExpatError: not well-formed (invalid token)) and ZSI raises an exception in the urlparse librar...

Web Service client in Python using ZSI - "Classless struct didn't get dictionary"

I am trying to write a sample client in Python using ZSI for a simple Web Service. The Web Service WSDL is following: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/test/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd...

How to display outcoming and incoming SOAP message for ZSI.ServiceProxy in Python?

How to display a SOAP message generated by ZSI.ServiceProxy and a respond from a Web Service when a Web Service method is invoked? ...

ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction

Hi guys, i have this simple type from an external webservice: <xsd:element name="card_number" maxOccurs="1" minOccurs="1"> <xsd:simpleType> <xsd:restriction base="tns:PanType"> <xsd:pattern value="\d{16}"></xsd:pattern> <xsd:whiteSpace value="collapse"></xsd:whiteSpace> </xsd:restriction> </xsd:simpleType> </xsd:...

ZSI in python... web service that sends and receives binary file?

Hello everyone, I am working on a python app which needs to expose some services. For that task I was testing ZSI. Everything was fine until I tried to send binaries through the web service. The tested escenario looks like this: A WSDL for the WS (to execute wsdl2py / wsdl2dispatch) A response including a Base64 encoded binary The p...

How to add wsse:Security, UsernameToken header to a SOAP request in ZSI, Python?

Is there a way to add the wsse:Security, UsernameToken header to the SOAP requests in ZSI, Python? I searched on the web, but couldn't find an answer. ...

How to display outcoming and incoming SOAP message for ZSI.ServiceProxy in Python (version 2.1)?

Couple months ago I have asked the same question but in the context of older version of ZSI (http://stackoverflow.com/questions/1497038/how-to-display-outcoming-and-incoming-soap-message-for-zsi-serviceproxy-in-python). Now, in the new version of ZSI 2.1 there is no tacefile parameter). I tried to find a documentation for the new version...

Logging on ZSI server using mod_python

Hi all, I developed a soap server using python ZSI. The server is running fine but the problem appears when I'm trying to log the xml received into a file: import logging as log LOG_FILENAME = '/var/log/zsiserver.log' log.basicConfig(filename=LOG_FILENAME,level=log.DEBUG,) from ZSI import dispatch from mod_python import apache mod = ...