我想在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中发送肥皂请求?