[Pysaprfc-users] RFC Server Module
Brought to you by:
klvon
|
From: Michael B. <mic...@we...> - 2005-08-31 07:40:35
|
The following Module should run out of the box. But it says "exception 'connection failed'". I have o clue whats going on. Can pls somebody give me a hint how the module has to be started
#!/usr/bin/env python
# -*- coding: latin_1 -*-
import pysap
class MyFunc(pysap.RFC_SERV_FUNC):
_name_='Z_MY_FUNC'
_importing_=[('IN_VALUE','I')]
_exporting_=[('OUT_VALUE','I')]
def run(self,handle):
self['OUT_VALUE']=2*self['IN_VALUE']
import sys
srv=pysap.RfcServerEx()
try:
srv.register_func(MyFunc)
srv.main_loop(sys.argv)
except pysap.SapRfcError, msg:
print "exception %s " % (msg)
sys.exit(1)
|