Zeep 不识别所有操作



当我做python -mzeep https://testingapi.ercot.com/2007-08/Nodal/eEDS/EWS/?WSDL

操作为空。 当我在浏览器中打开它时,我可以在<operation>标签下找到很多东西。 我错过了什么?

我不确定这是否相关,但如果是,我讨厌排除此信息。 该网站有一个 XSD 和 WSDL 文件的 zip 文件,我不知道如何处理这里。

你可以测试这个其他WS: ip2geo

检查是否zeep它返回与Service相关的Operations。比较两个 WSDL,我发现标签非常不同,在带有 zeep 的工作 WSDL 中,操作以<wsdl:operation ...开头,而在其他 WSDL 中以不同的方式定义。

请注意,在python -mzeep https://testingapi.ercot.com/2007-08/Nodal/eEDS/EWS/?WSDL输出的开头,它会显示几个警告,指出invalid xsd type or elements和其他消息。

你在这方面取得了一些进展吗?我也遇到了这个问题 ERCOT 肥皂 API.我试图解决这个问题的是用一个适合使用 wsdl: 前缀的本地文件替换 WSDL。然后,您可以使用指向 MOTE.wsdl 文件的本地路径的路径包含以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:ns0="http://www.ercot.com/schema/2007-06/nodal/ews/message"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.ercot.com/wsdl/2007-06/nodal/ewsConcrete"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
targetNamespace="http://www.ercot.com/wsdl/2007-06/nodal/ewsConcrete">
xmlns:wsu="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsse="http://www.docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:ns2="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:ns4="http://www.w3.org/2006/05/addressing/wsdl"
xmlns:ns3="http://schemas.xmlsoap.org/wsdl/jms/">
<wsp:UsingPolicy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" wsdl:Required="true"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"/>
<wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<sp:SecurityHeader MustManifestEncryption="true" MustPrepend="true"
xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext"/>
</wsp:Policy>
<wsp:Policy wsu:Id="SecurityTokens" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:ExactlyOne>
<wsp:All>
<sp:SecurityToken xmlns:_ns1="http://www.actional.com"
xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sp:TokenType>_ns1:SSLClientCertificate</sp:TokenType>
</sp:SecurityToken>
</wsp:All>
<wsp:All>
<sp:SecurityToken xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sp:TokenType>sp:X509v3</sp:TokenType>
</sp:SecurityToken>
</wsp:All>
<wsp:All>
<sp:SecurityToken xmlns:_ns1="http://www.actional.com"
xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sp:TokenType>_ns1:SSLClientCertificate</sp:TokenType>
</sp:SecurityToken>
<sp:SecurityToken xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sp:TokenType>sp:X509v3</sp:TokenType>
</sp:SecurityToken>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsp:Policy wsu:Id="SignedBody" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<sp:Integrity xmlns:sp="http://schemas.xmlsoap.org/ws/2002/12/secext">
<sp:TokenInfo>
<sp:SecurityToken>
<sp:TokenType>sp:X509v3</sp:TokenType>
</sp:SecurityToken>
</sp:TokenInfo>
<sp:MessageParts>wsp:GetBody(.)</sp:MessageParts>
</sp:Integrity>
</wsp:Policy>
<wsp:Policy wsu:Id="Alerts_input_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SecurityTokens"/>
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsp:Policy wsu:Id="Alerts_output_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsp:Policy wsu:Id="MarketInfo_input_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SecurityTokens"/>
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsp:Policy wsu:Id="MarketInfo_output_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsp:Policy wsu:Id="MarketTransactions_input_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SecurityTokens"/>
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsp:Policy wsu:Id="MarketTransactions_output_policy" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsp:PolicyReference URI="#SignedBody"/>
</wsp:Policy>
<wsdl:types>
<xs:schema targetNamespace="http://www.ercot.com/schema/2007-06/nodal/ews/message"
xml:lang="en"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation="Message.xsd"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="EWSResponse">
<wsdl:part name="output" element="ns0:ResponseMessage"/>
</wsdl:message>
<wsdl:message name="EWSFault">
<wsdl:part name="fault" element="ns0:FaultMessage"/>
</wsdl:message>
<wsdl:message name="EWSRequest">
<wsdl:part name="input" element="ns0:RequestMessage"/>
</wsdl:message>
<wsdl:portType name="Operations">
<wsdl:operation name="MarketTransactions">
<wsdl:input message="tns:EWSRequest"/>
<wsdl:output message="tns:EWSResponse"/>
<wsdl:fault name="fault1" message="tns:EWSFault"/>
</wsdl:operation>
<wsdl:operation name="Alerts">
<wsdl:input message="tns:EWSRequest"/>
<wsdl:output message="tns:EWSResponse"/>
<wsdl:fault name="fault1" message="tns:EWSFault"/>
</wsdl:operation>
<wsdl:operation name="MarketInfo">
<wsdl:input message="tns:EWSRequest"/>
<wsdl:output message="tns:EWSResponse"/>
<wsdl:fault name="fault1" message="tns:EWSFault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="HttpEndPointBinding" type="tns:Operations">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="MarketTransactions">
<soap:operation soapAction="/BusinessService/NodalService.serviceagent/HttpEndPoint/MarketTransactions"
style="document"/>
<wsdl:input>
<soap:body parts="input" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#MarketTransactions_input_policy"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="output" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#MarketTransactions_output_policy"/>
</wsdl:output>
<wsdl:fault name="fault1">
<soap:fault name="fault1" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="MarketInfo">
<soap:operation soapAction="/BusinessService/NodalService.serviceagent/HttpEndPoint/MarketInfo"
style="document"/>
<wsdl:input>
<soap:body parts="input" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#MarketInfo_input_policy"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="output" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#MarketInfo_output_policy"/>
</wsdl:output>
<wsdl:fault name="fault1">
<soap:fault name="fault1" use="literal"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Alerts">
<soap:operation soapAction="/BusinessService/NodalService.serviceagent/HttpEndPoint/Alerts"
style="document"/>
<wsdl:input>
<soap:body parts="input" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#Alerts_input_policy"/>
</wsdl:input>
<wsdl:output>
<soap:body parts="output" use="literal"/>
<wsp:PolicyReference xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"
URI="#Alerts_output_policy"/>
</wsdl:output>
<wsdl:fault name="fault1">
<soap:fault name="fault1" use="literal"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NodalService">
<wsdl:port name="HttpEndPoint" binding="tns:HttpEndPointBinding">
<soap:address location="https://mttlein0010.ercot.com:8090/sst/runtime.asvc/com.ercot.eip.EWSExtHTTP"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

您如何看待此解决方案?我在这方面取得了一些成功,因为它现在可以识别所有操作。但缺点是现在我遇到了连接问题:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='mttlein0010.ercot.com', port=8090): Max retries exceeded with url: /sst/runtime.asvc/com.ercot.eip.EWSExtHTTP (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000169A3E64A00>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed'))

相关内容

  • 没有找到相关文章

最新更新