in

zeep soap12 wsdl+mtom+wsse how to make request?


TPA.wsdl https://pastebin.com/7DBhCHbv
DataService.xsd https://pastebin.com/AFhg64hH


from zeep import Client
from requests import Session
from zeep.wsse.username import UsernameToken
from zeep.transports import Transport
from zeep.exceptions import Fault
Username="...."
Password = '....'


session = Session()
session.verify = False
try:
    wsdl="TPA.wsdl"
    print(UsernameToken(Username, Password))
    # initialize zeep client
    client = Client(
    wsdl=wsdl,
    wsse=UsernameToken(Username, Password),
    transport=Transport(session=session)
    )
    print(client)
    soap_result = client.service.getPossibleDocuments
    print(soap_result)

except Fault as fault:
    parsed_fault_detail = client.wsdl.types.deserialize(fault.detail[0])

Always getting Response

<zeep.wsse.username.UsernameToken object at 0x00000229AB5CB130> 
<zeep.client.Client object at 0x00000229AB5D6700> 
<zeep.proxy.OperationProxy object at 0x00000229AB6A24C0>

So how to make request to it?



Source: https://stackoverflow.com/questions/70721577/zeep-soap12-wsdlmtomwsse-how-to-make-request

iPhone 14 All Models Expected to Arrive With 120Hz Refresh Rate, 6GB RAM

easily convert Python notebook to web app and share with others