gpt4 book ai didi

python - WSDL 文件包含操作但 zeep "gives service has no operation error"

转载 作者:太空宇宙 更新时间:2023-11-03 15:15:13 25 4
gpt4 key购买 nike

我正在尝试在 wsdl 中调用该操作。我无法共享完整的文件,但这是文件的示例 -

<wsdl:operation name="XXX_XXX_CANCEL"><wsp:Policy><wsp:PolicyReference URI="#OP_XXX_XXX_CANCEL"/></wsp:Policy><wsdl:input message="p1:XXX_Order"/><wsdl:output message="p1:Order_RESP"/></wsdl:operation></wsdl:portType><wsdl:binding name="XXX_XXX_CANCELBinding" type="p1:XXX_XXX_CANCEL"><soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/><wsdl:operation name="XXX_XXX_CANCEL"><soap:operation soapAction="http://sap.com/xi/WebService/soap1.1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/><wsdl:input><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/></wsdl:input><wsdl:output><soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/></wsdl:output></wsdl:operation></wsdl:binding><wsdl:service name="XXX_XXX_CANCELService"><wsdl:port name="XXX_XXX_CANCELPort" binding="p1:XXX_XXX_CANCELBinding"><soap:address location="x" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/></wsdl:port></wsdl:service></wsdl:definitions>""

如果我对该文件执行python -mzeep xxx.wsdl,我会看到一个服务和端口,但看不到任何操作,并且在尝试调用该服务时,我得到服务没有操作 XXX_XXX_Cancel.

我无法弄清楚为什么会发生这种情况。

最佳答案

可能是在尝试解析操作类型/元素时发生错误。在这种情况下,zeep 会显示警告。你有 python -mzeep 的完整输出吗? (参见前几行)

关于python - WSDL 文件包含操作但 zeep "gives service has no operation error",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43938208/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com