-2

I'm trying to read this Soap API 'https://www.shab.ch/soapserver' using Python's Zeep.

from requests import Session
from requests.auth import HTTPBasicAuth
from zeep import Client

from zeep.transports import Transport
session = Session()
session.auth = HTTPBasicAuth('MYUSERNAME', 'MYPASSWORD')
client = Client('https://www.shab.ch/shabforms/acmsservice?wsdl',
    transport=Transport(session=session))

But get the following error message:

HTTPError: 403 Client Error: Forbidden for url: 
https://www.shab.ch/shabforms/acmsservice?wsdl

Can anybody see what I am doing wrongly here?

BarJacks
  • 119
  • 2
  • 6

2 Answers2

0

It doesn't seem that Python is your problem. Instead you have a rights issue for the WSDL file. A quick Googling turned up:

https://www.shab.ch/soapserver https://www.shab.ch/shabforms/soapserver?wsdl

Jay
  • 39
  • 2
  • 8
0

You don't have permission to go to that part of the Shab.ch server. You need a username and password. Contact: info@sogc.ch

pashute
  • 3,965
  • 3
  • 38
  • 65