Python Forum
Zeep - BasicHTTPBinding secured Endpoint throws 500-invalid security error
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Zeep - BasicHTTPBinding secured Endpoint throws 500-invalid security error
#1
Hi,

Greetings!!

I'm working on Python Soap client library - Zeep and struck with below issue. It would be very helpful if you can help to solve it.

SoapXML endpoint is secured with "BasicHTTPBinding WSS Type - PasswordText" authentication. I can successfully send the request manually using SoapUi tool, but in Zeep below code throws 500 internal server error.

headers = {'content-type': 'text/xml'}
url = r'https://xxxxxxxxxxxxxxxx/Services/LoansIntegrationService.svc?singleWsdl'
client = Client(url ,wsse=UsernameToken('vvasu', 'demo'))
body = client.transport.load('.\wsdl\LoanRequest.wsdl') #fetch the updated wsdl file and pass it to request
result = client.transport.post(message=body, address=url, headers=headers)
print(result.content) #An error occurred when verifying security for the message.
Response:

<s:Body>
<s:Fault>
<faultcode xmlns:a="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">a:InvalidSecurity</faultcode>
<faultstring xml:lang="en-US">An error occurred when verifying security for the message.</faultstring>
</s:Fault>
</s:Body>
</s:Envelope>

Kindly help!!

Thanks.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  concatenate a request to the endpoint of OSM-API?! apollo 0 1,577 Aug-13-2020, 02:45 PM
Last Post: apollo
  How to POST html data to be handled by a route endpoint nikos 1 2,373 Mar-07-2020, 03:14 PM
Last Post: nikos
  Receiving Werkzeug. exception. Bad Request error when using GET with an endpoint robogeek 0 2,657 Jul-02-2019, 01:04 PM
Last Post: robogeek
  Flask Error-Could not build url for endpoint 'index'. Did you forget to specify value Prince_Bhatia 0 10,299 Feb-25-2019, 05:52 AM
Last Post: Prince_Bhatia

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020