[XML-SIG] ZSI Namespace problems

Alexander Girman alexander.girman at gmail.com
Thu Nov 8 23:07:36 CET 2007

Dear List,

I'm trying to build a client to consume a SOAP webservice, and am
having the damnedest time getting ZSI to pass along namespace
information to its generated SOAP message.  The code is illustrated
below, along with the tracefile output for the SOAP request.  Please
note that the <process /> and <input /> tags are unqualified, despite
being explicitly qualified in the generating code.  The code otherwise
works (I can cut and paste the below query, add the namespaces by
hand, and send it to the webservice via curl and get the right
response).  So the question is: why won't it augment the appropriate
tags with the declared namespaces?  Any insight would be appreciated,
as I've been toiling over this for what seems like forever T_T...

def call_web_service(payload):
    from ZSI.client import Binding
    from ZSI import TC
    import sys

    url = 'https://www.example.com/'
    n = 'aeg:do-process'
    b = Binding(url = url, ns = n, tracefile = sys.stdout, nsdict={'ns': n})

    class process:
        def __init__(self, query):
            self.input = payload

    process.typecode=TC.Struct(process,[TC.String("ns:input")], "ns:process")

    return b.RPC(url, 'ns:process', process(query), nsdict={'ns': n})

_________________________________ Thu Nov  8 16:48:20 2007 REQUEST:
xmlns:ns="aeg:do-process" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
_________________________________ Thu Nov  8 16:48:21 2007 RESPONSE:
Internal Server Error

More information about the XML-SIG mailing list