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

问题描述

我想在Python中发送一个soap请求以获得响应。

方法名称为:getCDUsStatus

我有WSDL

与该方法有关的所有内容:

dependencies {
    implementation 'org.springframework.boot:spring-boot-starter-data-rest'
    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage',module: 'junit-vintage-engine'
    }
    implementation 'org.springdoc:springdoc-openapi-ui:1.4.3'
    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    developmentOnly 'org.springframework.boot:spring-boot-devtools'
    implementation 'org.springframework.cloud:spring-cloud-starter-config'
    implementation 'org.springframework.kafka:spring-kafka'
    implementation 'org.projectlombok:lombok'
    implementation 'org.springframework.boot:spring-boot-starter-data-mongodb'
}

并且:

    <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>

并且:

<wsdl:message name="getCDUsStatusSoapIn">
    <wsdl:part name="parameters" element="tns:getCDUsStatus" />
  </wsdl:message>
  <wsdl:message name="getCDUsStatusSoapOut">
    <wsdl:part name="parameters" element="tns:getCDUsStatusResponse" />
  </wsdl:message>

最后,

    <wsdl:operation name="getCDUsStatus">
      <wsdl:input message="tns:getCDUsStatusSoapIn" />
      <wsdl:output message="tns:getCDUsStatusSoapOut" />
    </wsdl:operation>

请问如何在Python中发送肥皂请求?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...