Anonymous - 2008-04-28


i'm trying to use the the jonpy fcgi Module, to run ZSI behind an lighttpd 1.5 Server. I programmend an example class, which runs witch the "AsServer(port=options.port, services=[Service("webservice"),])" without any Problems. The i copied the script and replaced the section to run it like an Webserver with the section run it like an fcgi Programm. Now the Problem is, it runs without no Problems behind the Webserver. But i the ZSI Programm, does return always the same error. I have no Idea what the reaseon could be, because if i use the same script with the AsServer Option it das work!. I would not exlude that i do something wrong.

It would be very nice if somebody could help me, because this is very important for my studies.
Here is Python class wich I run as ajonpy fcgi service and de Error Message. If you net more code details please tell me.

The Pyhton Programm

import jon.cgi as cgi
import jon.fcgi as fcgi
import socket, os, sys

from ZSI import dispatch

from TemperatureService_services_server import TemperatureService

class Service(TemperatureService):
    # Make WSDL available for HTTP GET
    _wsdl = "".join(open("myService.wsdl").readlines())
    def soap_hello(self, ps, **kw):
        rsp = TemperatureService.soap_hello(self, ps, **kw)
        request = self.request       
        rsp._result = "This is a test" + request._zipcode
        return rsp
    def hello(self, ps, **kw):
        rsp = TemperatureService.soap_hello(self, ps, **kw)          
        return rsp
class Handler(cgi.Handler):
   def process(self, req):    

serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
serversocket.bind(("localhost", 9000))
#become a server socket
os.dup2(serversocket.fileno(), fcgi.FCGI_LISTENSOCK_FILENO)

fcgi.Server({fcgi.FCGI_RESPONDER: Handler}).run()

The WSDL error message

O)E@@J54; PP*(HTTP/1.1 200 OK
Content-Type: text/xml; charset="utf-8"
Content-Length: 693
Date: Mon, 28 Apr 2008 06:36:05 GMT
Server: lighttpd/1.5.0

<SOAP-ENV:Envelope xmlns:SOAP-ENC="" xmlns:SOAP-ENV="" xmlns:ZSI="" xmlns:xsd="" xmlns:xsi=""><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Client</faultcode><faultstring>Unparseable message</faultstring><detail><Eo83a5f20>&lt;ZSI:ParseFaultDetail&gt;
&lt;ZSI:string&gt;'dict' object has no attribute 'Parse'&lt;/ZSI:string&gt;
</Eo83a5f20></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope><SOAP-ENV:Envelope xmlns:SOAP-ENC="" xmlns:SOAP-ENV="" xmlns:ZSI="" xmlns:xsd="" xmlns:xsi=""><SOAP-ENV:Header></SOAP-ENV:Header><SOAP-ENV:Body><SOAP-ENV:Fault><faultcode>SOAP-ENV:Server</faultcode><faultstring>Processing Failure</faultstring><detail><ZSI:FaultDetail><ZSI:string>
local variable 'result' referenced before assignment</ZSI:string><ZSI:trace>build/bdist.linux-i686/egg/ZSI/</ZSI:trace></ZSI:FaultDetail></detail></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>