[Python-modules-team] Bug#523083: python-soappy: soappy doesn't prefix parameters with namespace. Attached patch fixes apache-cxf interoperability

Vassilis Virvilis vasvir at iit.demokritos.gr
Wed Apr 8 11:10:32 UTC 2009


Package: python-soappy
Version: 0.12.0-4
Severity: normal


I was able to debug and successfully use an apache cxf webservice from a soappy client.

There were 3 distinct tricks I had to use and so I figured to document the tricks to a public place in case anybody else is interested

The first observation is that for methods not containing any input everything works as advertised

The problem starts when you want to actually pass any parameters. In that case you have to:
1) specify the namespace
2) use the patch below to enable the namespace per argument support
3) if the medhod has multiple parameters you have to specify the correct ordering

here are the steps in an example

#!/usr/bin/python

import SOAPpy

ns1="http://iface.ws.lib.biovista.com/";

server = SOAPpy.SOAPProxy("http://srv-eu.biovista.com/ws/BEAService", namespace=ns1); # step 1

print server.getAvailableTypes();
print server.getText(pubmed_id=1233);
#server.config.dumpSOAPOut = 1;
#server.config.dumpSOAPIn = 1;
server.config.argsOrdering = {'getBibliography': ['name', 'type', 'max_results']}; # step 3
print server.getBibliography(name="il-6", type="Gene", max_results=4);

----------------- patch to SOAPpy -----------------------   # step 2

--- SOAPBuilder.py.orig 2009-04-08 12:00:34.000000000 +0300
+++ SOAPBuilder.py      2009-04-08 13:23:02.000000000 +0300
@@ -316,6 +316,8 @@

         tag = tag or self.gentag()

+        if self.namespace:
+            tag = ns_map.get(self.namespace) + ":" + tag
         tag = toXMLname(tag) # convert from SOAP 1.2 XML name encoding

         a = n = t = ''


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=el_GR, LC_CTYPE=el_GR (charmap=ISO-8859-7)
Shell: /bin/sh linked to /bin/bash

Versions of packages python-soappy depends on:
ii  python-fpconst                0.7.2-4    Utilities for handling IEEE 754 fl
ii  python-support                0.8.7      automated rebuilding support for P

python-soappy recommends no packages.

python-soappy suggests no packages.

-- no debconf information





More information about the Python-modules-team mailing list