Skip to content

Instantly share code, notes, and snippets.

@joxz
Last active October 25, 2017 16:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joxz/66694b99478314cddc90e59e0e14eac3 to your computer and use it in GitHub Desktop.
Save joxz/66694b99478314cddc90e59e0e14eac3 to your computer and use it in GitHub Desktop.
Connect to Extreme Netsight SOAP WebService
# 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
# 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
@LeoKurz
Copy link

LeoKurz commented Oct 25, 2017

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

  • $webservicex.getAllEndSystemMacs()
  •   + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
      + FullyQualifiedErrorId : WebException
    
    

Any idea?

Thanx
__Leo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment