0

我安装了 ZSI 包。我有 wsdl 文件,我想从中生成 python 代码。ZSI 中是否有命令行工具可以从 WSDL 生成 python 代码,或者我需要为此编写自己的类并调用 wsdl2python 方法?谢谢...

4

1 回答 1

1

使用以下内容创建文件 wsdl2py:

#!/bin/env python
from ZSI.generate.commands import wsdl2py
wsdl2py()

授予此文件可执行权限。

运行命令:

./wsdl2py --file my_file.wsdl

这将生成两个 python 文件:

我的文件服务.py

my_file_services_types.py

于 2017-02-07T15:02:05.750 回答