[XML-SIG] Document style SOAP Web Service with ZSI (docstyle)

Alexis Marrero-Narváez amarrero at mitre.org
Thu Sep 11 19:50:22 EDT 2003


Are there any examples of creating a SOAP WS docstyle with ZSI? All I 
read and get from the documentation is

dispatch.AsServer(docstyle=1, port=4444) , since docstyle is 1 then the 
SOAP message is sent to the invoked method as an DOM node.

I want to return and XML document back to the client and I can't figure 
it out. Below is what I have so far. When executing the client receives 
a SOAP server fault  'interate on non-sequence'.

Any pointers?


#### server.py

from xml.dom import minidom

from ZSI import dispatch

def getExample(input):
     doc = minidom.parse('example.xml')
     return doc.firstChild

dispatch.AsServer(docstyle=1, port=4444)

####  client.py

import sys

#Import the ZSI client
from ZSI.client import Binding
import sys
fp = sys.stdout
u = ''
n = 'http://uche.ogbuji.net/eg/ws/simple-cal'
b = Binding(url=u, ns=n, host='localhost', port=4444, tracefile=fp)

result = b.getExample()
print result[0]

<amn url="http://www.recipiente.com/"/>

More information about the XML-SIG mailing list