PyRFC icon indicating copy to clipboard operation
PyRFC copied to clipboard

PyRFC Server. Ex. serverStfcConnection.py not working at all

Open zAlexAlex opened this issue 5 years ago • 4 comments

Hi! All seems good, but the Server example not working at all. I have trying with Python 2.x-3.x and various range of PyRfc versions on much SAP installations. Does it normal? The PyRfc work as client much better, no problem.

dev_rfc.trc: 2019-07-09 21:09:43.149039 [05760] >> Error entry [Handle: 41203408 ConvID: 00164169 SysID: ZZ5 SysNr: 00 Target: EH5 User: Z GwHost: EH5 GwServ: sapgw00 ProgrammID: PYRFC_SERVER1 Codepage: 4103] RfcServerNotFoundException: Key: RFC_NOT_FOUND, Code: RFC_NOT_FOUND, Message: Function STFC_CONNECTION not found

rfc03060_05760.trc: `Looking up ServerFunction for STFC_CONNECTION from ZZ5.

HEXDUMP 2019-07-09 21:09:43.139039 [05760] Sending data for handle 41203408, convID 00164169, codepage 4103 000000 | 01010008 03010105 04010003 01010103 |................| 000010 | 00040000 0E0B0103 0106000B 04010003 |................| 000020 | 000A0200 00002301 06000700 18310039 |......#......1.9| 000030 | 0032002E 00310036 0038002E 0031002E |.2...1.6.8...1..| 000040 | 00330033 00000700 18003066 00650038 |.3.3......0f.e.8| 000050 | 0030003A 003A0037 00380034 0031003A |.0.:.:.7.8.4.1.:| 000060 | 00380033 00360030 003A0031 00330031 |.8.3.6.0.:.1.3.1| 000070 | 003A0061 00630031 00360000 18001100 |.:.a.c.1.6......| 000080 | 02450000 11001200 06370035 00330000 |.E.......7.5.3..| 000090 | 12001300 1E370032 00300020 00310039 |.....7.2.0. .1.9| 0000a0 | 0032002E 00310036 0038002E 0031002E |.2...1.6.8...1..| 0000b0 | 00350000 13013000 0C700079 00740068 |.5....0..p.y.t.h| 0000c0 | 006F006E 00013004 03001A52 00460043 |.o.n..0....R.F.C| 0000d0 | 005F004E 004F0054 005F0046 004F0055 |..N.O.T..F.O.U| 0000e0 | 004E0044 00040304 02004446 0075006E |.N.D......DF.u.n| 0000f0 | 00630074 0069006F 006E0020 00530054 |.c.t.i.o.n. .S.T| 000100 | 00460043 005F0043 004F004E 004E0045 |.F.C._.C.O.N.N.E| 000110 | 00430054 0049004F 004E0020 006E006F |.C.T.I.O.N. .n.o| 000120 | 00740020 0066006F 0075006E 00640004 |.t. .f.o.u.n.d..| 000130 | 02FFFF00 00FFFF00 00000000 00000000 |.яя..яя.........| << HEXDUMP

2019-07-09 21:09:43.149039 [05760] >> Exception occurred [Handle: 41203408 ConvID: 00164169 SysID: ZZ5 SysNr: 00 Target: EH5 User: Z GwHost: EH5 GwServ: sapgw00 ProgrammID: PYRFC_SERVER1 Codepage: 4103] RfcServerNotFoundException: Key: RFC_NOT_FOUND, Code: RFC_NOT_FOUND, Message: Function STFC_CONNECTION not found`

zAlexAlex avatar Jul 09 '19 18:07 zAlexAlex

Does it normal?

Yes, only the Client bindings are supported, see #98

bsrdjan avatar Jul 10 '19 07:07 bsrdjan

Thanks! The Release 1.9.92 work. After that, line with function registration was commented: https://github.com/SAP/PyRFC/blob/41d65451f2a52d75678872de64c21852dee8c34a/src/pyrfc/_pyrfc.pyx#L1388 rc = RfcInstallGenericServerFunction(<void*> genericRequestHandler, <void*> repositoryLookup, &errorInfo) At least, server functionality have been stopped working then.

zAlexAlex avatar Jul 10 '19 18:07 zAlexAlex

Server bindings are implemented in main branch: df9805e

More info: https://github.com/SAP/PyRFC/issues/193#issuecomment-720645607

bsrdjan avatar Nov 02 '20 18:11 bsrdjan

Server bindings are published with 2.3.0 release on PyPI, feel free to test.

bsrdjan avatar Dec 02 '20 13:12 bsrdjan