VaultCmdLineClient doesnt work

Post your questions regarding using the Vault and Fortress API in your programs.

Moderator: SourceGear

Post Reply
itsckl
Posts: 7
Joined: Thu Feb 04, 2010 5:25 am

VaultCmdLineClient doesnt work

Post by itsckl » Thu Feb 04, 2010 5:49 am

Hi,

I downloaded VaultClientAPI_5_0_2_18753, fixed the DLL refs, compiled it with VS2008 and tried it against my Vault server (5.0.0.18701) as follows:

Code: Select all

vault -user ckl -password ... -host inno-build -repository 9-00 listprojects
What I get is an exception saying

Code: Select all

<vault>
  <error>
    <exception>System.Exception: The Vault server could not be contacted to perform the operation.  Your network connection to the server may have been interrupted.  Please verify your network settings using the Options dialog under the Tools menu in the Vault GUI Client.Fehler bei der Anforderung mit HTTP-Status 404: Not Found.
   bei VaultClientNetLib.VaultConnection.ListDragnetProjects(MantisProject[]& projects)
   bei VaultClientIntegrationLib.ItemTrackingOperations.ProcessCommandListFortressProjects()
   bei VaultCmdLineClient.VaultCmdLineClient.ProcessCommand(Args curArg)
   bei VaultCmdLineClient.VaultCmdLineClient.Main(String[] args)</exception>
  </error>
  <result>
    <success>False</success>
  </result>
</vault>
So I tried the vault.exe installed with my GUI client (which works fine, the GUI client). Same result. Wireshark shows that the client contacts the server to verify the compatibility:

Code: Select all

POST /VaultService/VaultService.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3603)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.sourcegear.com/schemas/vault/ValidateServiceVersions"
Host: inno-build
Content-Length: 408
Expect: 100-continue
Connection: Keep-Alive

HTTP/1.1 100 Continue

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ValidateServiceVersions xmlns="http://www.sourcegear.com/schemas/vault"><clientSupportedVersions><int>8</int></clientSupportedVersions></ValidateServiceVersions></soap:Body></soap:Envelope>

HTTP/1.1 200 OK
Date: Wed, 03 Feb 2010 16:30:54 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private, max-age=0
Content-Type: text/xml; charset=utf-8
Content-Length: 436

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><ValidateServiceVersionsResponse xmlns="http://www.sourcegear.com/schemas/vault"><ValidateServiceVersionsResult><int>8</int></ValidateServiceVersionsResult></ValidateServiceVersionsResponse></soap:Body></soap:Envelope>
So this seems to be OK. Then it does various further requests and finally:

Code: Select all

POST /Fortress/DragnetWebService.asmx HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3603)
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://www.sourcegear.com/schemas/dragnet/Logout"
Host: inno-build
Cookie: _authHdr=4100c9fd-3d3b-4b58-be94-ed8a1c49ac23F74+9ZaBnll6UJhJhhqQsQ==
Content-Length: 306
Expect: 100-continue

HTTP/1.1 100 Continue

<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><Logout xmlns="http://www.sourcegear.com/schemas/dragnet" /></soap:Body></soap:Envelope>

HTTP/1.1 404 Not Found
Date: Wed, 03 Feb 2010 16:30:55 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Length: 1587

<html>
    <head>
        <title>Die Ressource kann nicht gefunden werden.</title>
        ...
which fails and raises the exception. As the vault.exe shows the same behaviour as the compiled one does, I don't think it is due to a version conflict or something.

On my server installation, there is no file /Fortress/DragnetWebService.asmx. There are a few dragnet .dll files in various directories but no asmx.

What am I doing wrong?

Regards, Christoph

itsckl
Posts: 7
Joined: Thu Feb 04, 2010 5:25 am

Re: VaultCmdLineClient doesnt work

Post by itsckl » Thu Feb 04, 2010 9:56 am

Found the problem myself: RTFM... The vault.exe command line client supports commands that do work with Fortress only. One of these is listprojects obviously. Then again, it is not that obvious from the documentation, so the post might save someone from digging into that again.

Christoph

Post Reply