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,

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

 

View solution in original post

12 REPLIES 12

DavidPetty
Archer Employee
Archer Employee

@DavidEllis1 sounds like PowerShell isn't asking for the wsdl or something on IIS is blocking it.

What do you get if you go to https://[domain]//ws/general.asmx?wsdl from your browser?

 Advisory Consultant

David,

Thanks for responding.  When I try the URL that you suggested I get:

DavidEllis1_0-1648740604866.png

Our IIS setting have been hardened.  We are also using SAML2 for SSO login but do allow manual login.

 

@DavidEllis1 if based on your PowerShell script you're missing \RSAArcher in the URL.

https://[domain]/RSAArcher/ws/general.asmx?wsdl

 Advisory Consultant

David,

The script does have /RSAarcher in the URL as seen below.  This is then concatenated in the script to $api_url = $base_url + "/ws/general.asmx" to be the full URL.

DavidEllis1_7-1648744188015.png

If I try the URL Again from the browser on the server I get

 

DavidEllis1_5-1648743978380.png

If I chose the CreateUserSessionFromInstance I get this.  

DavidEllis1_6-1648744008328.png

 

If I fill in the blanks I get a session ID:

DavidEllis1_3-1648743883127.png

I think the script is duplicating what is on the browser screen.  I am executing the PS script from the same computer that I am manually connecting to from the browser.  Not sure why the script is not giving me the same result as doing it manually.

Thanks,

 

@DavidEllis1, I'm more curious if you get the WSDL via https://[domain]/RSAArcher/ws/general.asmx?wsdl

 Advisory Consultant

If I try https://xxxxxxx.gsa.gov/RSAArcher/ws/general.asmx?wsdl

I get this:

DavidEllis1_0-1648756759393.png

 

Is this what you are referring to?

 

 

Yes, thanks.  So, IIS isn't doing anything to block the request and going through the web service on the server show Archer isn't having any problems.  Something though is blocking the script from getting that information.

 Advisory Consultant

Thanks for that confirmation.  I was worried that some IIS Hardening setting that we applied might be the culprit.  Where do you suggest I look next or should I open a case for this?

I don't know if support can help being it's not an IIS or Archer issue.  Is it possible that where you're running the PowerShell script is locked down to prevent web calls?

@JeffLetterman do know why a PowerShell script would throw this error?

 Advisory Consultant