Important Update: Some Community URL Redirects are Under Maintenance. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

The HTML document does not contain Web service discovery information

DavidEllis1
Collaborator III

I am creating my first Web Service API.  I started out by taking one of the standard scripts for obtaining a session token and creating a PowerShell script:

DavidEllis1_0-1648675801595.png

 

When I execute this script instead of getting a session token I get:

DavidEllis1_1-1648675326525.png

If I look at the IIS Logs I see an entry

DavidEllis1_2-1648675440604.png

The timestamp matches up to the time of when I executed the PS Script.  I am thinking that this is an IIS issue.  Any hint of where I should start looking to get past this message?

Thanks,

 

 

12 REPLIES 12

JeffLetterman
Archer Employee
Archer Employee

In the past, I've seen issues using your code sample when PowerShell tries connecting to a remote Archer web server or AWS instance via a custom port like https://localhost:50004/RSAarcher.  I think a workaround I used may apply in your situation based on the tests done above.  Please try the following code.  

 

$apiUrl = $base_Url + "/ws/general.asmx?wsdl"
$ws = New-WebServiceProxy -Uri $apiUrl 

$autoGenNamespace = $ws.GetType().Namespace + '.General'
$req = New-Object ($autoGenNamespace)  
$req.Url = $apiUrl
$req.AllowAutoRedirect = $true
$req.Timeout = 60000

if ($userDomain -eq "") {
    $SessionToken = $req.CreateUserSessionFromInstance($username, $instanceName, $password)
}
else {
    $SessionToken = $req.CreateDomainUserSessionFromInstance($username, $instanceName, $password, $userDomain)
}
write-host "Session Token  : $SessionToken" -ForegroundColor Yellow

 

 

DavidEllis1
Collaborator III

Jeff, 

That did it.  Thank you very much.

David, thanks for your help.  The code that Jeff sent worked.