Answer a question

I want to use Python Zeep SOAP Client to make SOAP Calls to an Cisco CUCM. In the Cisco WSDL File is the Service definded:

<service name="AXLAPIService">
    <port binding="s0:AXLAPIBinding" name="AXLPort">
        <soap:address location="https://CCMSERVERNAME:8443/axl/"/>
    </port>
</service>

Now i want to change the "CCMSERVERNAME" to something real, like "192.168.250.10" without changing the WSDL.

But from the Docs i can't find anything to change that.

I found an Discussion here about changing the URL with "Client.set_address()" but this don't work anymore.

Can anybody give me an hint?

Edit: With mvt's help i got it, for anybody with the same problem, create the service with this command:

service = client.create_service("  {http://www.cisco.com/AXLAPIService/}AXLAPIBinding","https://192.168.250.10:8443/axl/")

Here an example from an working SOAP call:

phones = service.listPhone({'devicePoolName':'Default'},returnedTags={'name':'','model':''})

returns Devices in an list:

SEPFFFFFFFFFFAA Cisco 7841
SEPAAAABBBB2222 Cisco 7841

Answers

This should be possible via http://docs.python-zeep.org/en/master/client.html#creating-new-serviceproxy-objects

Cheers (author of zeep)

Logo

学AI,认准AI Studio!GPU算力,限时免费领,邀请好友解锁更多惊喜福利 >>>

更多推荐