我正在尝试在 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
在该文件上执行此操作,我会看到一个服务和端口,但没有任何操作,并且在尝试调用我得到的服务时service has no operation XXX_XXX_Cancel
。
我无法弄清楚为什么会这样。