如何使用WSDL在Python中发送soap请求?

如何使用WSDL在Python中发送soap请求?,python,soap,request,wsdl,send,Python,Soap,Request,Wsdl,Send,我想用Python发送soap请求以获得响应 方法名为:getCDUsStatus 我有WSDL 以下是与该方法相关的所有内容: <wsdl:operation name="getCDUsStatus"> <soap:operation soapAction="http://tempuri.org/getCDUsStatus" style="document" /> <wsd

我想用Python发送soap请求以获得响应

方法名为:getCDUsStatus

我有WSDL

以下是与该方法相关的所有内容:

    <wsdl:operation name="getCDUsStatus">
      <soap:operation soapAction="http://tempuri.org/getCDUsStatus" style="document" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

以及:


以及:


此外,最后:

<s:element name="getCDUsStatusResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="getCDUsStatusResult" type="s:int" />
            <s:element minOccurs="0" maxOccurs="1" name="pReplyStr" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

我如何用Python发送soap请求?

    <wsdl:operation name="getCDUsStatus">
      <wsdl:input message="tns:getCDUsStatusSoapIn" />
      <wsdl:output message="tns:getCDUsStatusSoapOut" />
    </wsdl:operation>
<s:element name="getCDUsStatusResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="1" maxOccurs="1" name="getCDUsStatusResult" type="s:int" />
            <s:element minOccurs="0" maxOccurs="1" name="pReplyStr" type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>