Reputation: 43
I'm trying to connect to two different wsdl's using zeep and printing the operations. When I connect to the first client and print I get the correct respons, but when I then connect to the second I get the same operations.
I can get the data if I connect with one client, then restart the database and skip the first client and connect with the second.
from zeep.client import Client
localDPClient = Client("http://localhost/StorageManager/?wsdl")
print([method for method, value in localDPClient.service.__dict__["_operations"].items()])
localDPClient2 = Client("http://localhost/CableBoxManager/?wsdl")
print([method for method, value in localDPClient2.service.__dict__["_operations"].items()])
Output
['ImportArtifacts', 'ImportBundles', 'ExportArtifacts', 'ExportBundles', 'ReadArtifactsFromTypes']
['ImportArtifacts', 'ImportBundles', 'ExportArtifacts', 'ExportBundles', 'ReadArtifactsFromTypes']
Expected output
['ImportArtifacts', 'ImportBundles', 'ExportArtifacts', 'ExportBundles', 'ReadArtifactsFromTypes'
['IdentifyBox', 'IdentifyCable', 'ReadCable', 'ReadCableDefinition', 'ReadAllCableFeatures', 'ReadBox']
Upvotes: 0
Views: 206
Reputation: 43
Solved it by adding more parameters
localDPClient = Client("http://localhost/StorageManager/?wsdl", service_name="StorageManager", port_name=f"WSHttpBinding_IStorageManager")
localDPClient2 = Client("http://localhost/CableBoxManager/?wsdl", service_name="CableBoxManager", port_name=f"WSHttpBinding_ICableBoxManager")
Upvotes: 1