Last active
October 25, 2017 16:10
-
-
Save joxz/66694b99478314cddc90e59e0e14eac3 to your computer and use it in GitHub Desktop.
Connect to Extreme Netsight SOAP WebService
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect to NetSight via SOAP in Powershell | |
$cred = Get-Credential | |
# disable https certificate checking when using self signed cert | |
# [System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true} | |
$ws = New-WebServiceProxy -uri "https://HOSTNAME:8443/axis/services/NetSightDeviceWebService?wsdl" -Credential $cred | |
$ws | Get-Member |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# connect to NetSight via PySimpleSOAP in Python | |
import ssl | |
import base64 | |
from pysimplesoap.client import SoapClient | |
# disable https certificate checking when using self signed cert | |
# ssl._create_default_https_context = ssl._create_unverified_context | |
encoded = base64.b64encode('user:pw') | |
client = SoapClient(wsdl="http://HOSTNAME:8080/axis/services/NetSightDeviceWebService?wsdl",http_headers={'Authorization': 'Basic %s'%encoded}) | |
result = client.result | |
print result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm new to Soap on powershell. I get the connection all right and I see all the attributes and methods but when I try to call a method (like getAllEndSystemMacs()), I get 👍 Exception calling "getAllEndSystemMacs" with "0" argument(s): "The request failed with HTTP status 505: HTTP Version Not Supported."
At line:1 char:1
Any idea?
Thanx
__Leo