Skip to content

Instantly share code, notes, and snippets.

@adamdriscoll
Created December 8, 2015 20:07
Show Gist options
  • Save adamdriscoll/8d9a55a288aedafe480c to your computer and use it in GitHub Desktop.
Save adamdriscoll/8d9a55a288aedafe480c to your computer and use it in GitHub Desktop.
Autogen WSDL Type Names
$Proxy = New-WebServiceProxy -Uri "https://dev.service-now.com/change_task.do?WSDL" -Credential $Credential
#
# Is there a better way to determine the auto-gen'd WSDL argument type names?
#
$ClassName = $Proxy.getRecords.OverloadDefinitions[0].Split('(')[1].Split(' ')[0]
$queryParams = new-object $ClassName
$queryParams.__encoded_query = $query
$Proxy.getRecords($queryParams)
@adamdriscoll
Copy link
Author

New-WebServiceProxy -Class -Name space is what you should use.

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