New-WebserviceProxy issues, when there is no wsdl or amsx endpoint?

There is one other SOAP service we actively use to disable users on that platform, and new-webserviceProxy works fine when you just point it at the wsdl address, find the method you wanna use, gather your parameters and use that method…but as you can see, the one above doesnt have the wsdl in the endpoint. I tried to see if i could get lucky and “/?wsdl” in the url, but no luck. I did notice a wsdl address in the xml response of the link above, but when i attempt to use that address, says the Object ref not set to an instance of an object… see last snippet.


Here it just fails when creating the object, and im not sure the actual error message or why.


SysinternalsSuite> [03/16/2020 14:21:19]> $URI=""</code>

<code>SysinternalsSuite> [03/16/2020 14:24:44]> $Proxy = New-WebserviceProxy $URI -Namespace x</code>
<code>New-WebserviceProxy : Exception has been thrown by the target of an invocation.</code>
<code>At line:1 char:10</code>
<code>+ $Proxy = New-WebserviceProxy $URI -Namespace x</code>
<code>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</code>
<code>+ CategoryInfo : NotSpecified: (:) [New-WebServiceProxy], TargetInvocationException</code>
<code>+ FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.NewWebServiceProxy

Using the only wsdl address i can find in the first url above, then fails for null object i guess

SysinternalsSuite> [03/16/2020 14:27:43]> $URI=""</code>

<code>SysinternalsSuite> [03/16/2020 14:29:17]> $Proxy = New-WebserviceProxy $URI -Namespace x</code>
<code>New-WebserviceProxy : Object reference not set to an instance of an object.</code>
<code>At line:1 char:10</code>
<code>+ $Proxy = New-WebserviceProxy $URI -Namespace x</code>
<code>+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</code>
<code>+ CategoryInfo : NotSpecified: (:) [New-WebServiceProxy], NullReferenceException</code>
<code>+ FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.NewWebServiceProxy

Here is a snippet of an example they give in c#, tried to port it to powershell, but im missing a .net assembly, and im not sure i can load those where im gonna run this scheduled task, so not sure its worth the effort chasing it down.

But to someone that can read C# better than me, might be able to glean how I might do the same thing in powershell, and this is just the Auth portion, after i get back a token, i think it will all make sense and just work once i get access to the object that houses all the operation methods for the specified web service endpoint.

I appreciate anyone taking a look.

The following code is an example of authenticating to your UltiPro data in a console application. You can copy the entire contents to a C# console application and update the following values and have an operable application.

Password = “YOUR PASSWORD”,

namespace ConsoleSample
using System;
using System.ServiceModel;
using System.ServiceModel.Channels;

using ConsoleSample.LoginService;

public class Program
internal static void Main(string[] args)
// Setup your user credentials:
const string UserName = “”;
const string Password = “”;
const string UserApiKey = “”;
const string CustomerApiKey = “”;

// Create a proxy to the login service:
var loginClient = new LoginServiceClient(“WSHttpBinding_ILoginService”);

// Submit the login request to authenticate the user:
string message;
string authenticationToken;

AuthenticationStatus loginRequest =
out message,
out authenticationToken);

if (loginRequest == AuthenticationStatus.Ok)
// User is authenticated and the authentication token is provided.
Console.WriteLine(“User authentication successful.”);
// User authentication has failed. Review the message for details.
Console.WriteLine("User authentication failed: " + message);


Console.WriteLine(“Press a key to exit…”);
catch (Exception ex)
Console.WriteLine("Exception: " + ex);

XML Examples

Authentication Service (http://<address>/services/LoginService)
The Authentication Service is required to get the Token needed for all Core Web Service Calls.
The following code is an XML example of authenticating to your UltiPro data. You can copy the entire contents and update the values in the request. The response example shows how a successful response will be formatted.

Login Method Request

<s:Envelope xmlns:s=“” xmlns:a=“”>
<a:Action s:mustUnderstand=“1”></a:Action>
<h:ClientAccessKey xmlns:h=“”>CAK</h:ClientAccessKey>
<h:Password xmlns:h=“”>PASSWORD</h:Password>
<h:UserAccessKey xmlns:h=“”>USER API KEY</h:UserAccessKey>
<h:UserName xmlns:h=“”>USERNAME</h:UserName>
<TokenRequest xmlns=“” />

Login Method Response

<s:Envelope xmlns:s=“” xmlns:a=“”>
<a:Action s:mustUnderstand=“1”></a:Action>
<TokenResponse xmlns=“”>
<Status xmlns=“”>Ok</Status>
<StatusMessage i:nil=“true” xmlns=“” xmlns:i=“” />
<Token xmlns=“”>LOGIN TOKEN</Token>