<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Vault API login using Java in Vault Customization Forum</title>
    <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5801939#M9144</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We are dealing with the same issue as &lt;A href="http://forums.autodesk.com/t5/vault-customization/can-t-connect-to-vault-using-api/m-p/5789804/highlight/true#M3487&amp;nbsp;" target="_blank"&gt;http://forums.autodesk.com/t5/vault-customization/can-t-connect-to-vault-using-api/m-p/5789804/highlight/true#M3487&amp;nbsp;&lt;/A&gt; except that we have always used Java (and unfortunately, this can't change).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our old code signed in to Vault using the SecurityService and setting the SoapEndpoint address, then creating a security header with the results of our signin call using the specific vault/user information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;           SecurityServiceLocator loc = new SecurityServiceLocator();
            loc.setSecurityServiceSoapEndpointAddress("http://" + vaultServer + "/autodeskDM/Services/SecurityService.asmx");
            SecurityServiceSoapStub port = (SecurityServiceSoapStub)loc.getSecurityServiceSoap();

           port.signIn(userName, password, vaultName)


            SOAPHeaderElement soapHead = port.getResponseHeader("http://AutodeskDM/Services/Security/1/22/2015/", "SecurityHeader");
            NodeList secNodes = soapHead.getChildNodes();
            String ticket = null;
            long userId = -1;
            for (int i=0; i&amp;lt;secNodes.getLength(); i++)
            {
                Node n = secNodes.item(i);
                String nodeName = n.getNodeName();
                if (nodeName != null &amp;amp;&amp;amp; nodeName.equals("Ticket"))
                {
                    ticket = n.getFirstChild().getNodeValue();
                }else if (nodeName != null &amp;amp;&amp;amp; nodeName.equals("UserId"))
                {
                    String userIdString = n.getFirstChild().getNodeValue();
                    userId = Long.parseLong(userIdString);
                }
            }
            securityHeader = new SecurityHeader(ticket, userId);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We now need to update to the Vault 2016 API and have to update or rewrite the code.&amp;nbsp;&amp;nbsp; All help references I can find are for .NET, c#, VB etc. and seem to reference WebServicesTools classes that I cannot find.&amp;nbsp; Note: we use a wsdl to java class generator to get all the classes for WebServices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My hope is that once I have WebServicesTools I can get the WebServiceManager or UserPasswordCredentials classes.&amp;nbsp; Is this the right approach? Where do I find those?&amp;nbsp; Any other ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Sep 2015 15:36:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-03T15:36:31Z</dc:date>
    <item>
      <title>Vault API login using Java</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5801939#M9144</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;We are dealing with the same issue as &lt;A href="http://forums.autodesk.com/t5/vault-customization/can-t-connect-to-vault-using-api/m-p/5789804/highlight/true#M3487&amp;nbsp;" target="_blank"&gt;http://forums.autodesk.com/t5/vault-customization/can-t-connect-to-vault-using-api/m-p/5789804/highlight/true#M3487&amp;nbsp;&lt;/A&gt; except that we have always used Java (and unfortunately, this can't change).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our old code signed in to Vault using the SecurityService and setting the SoapEndpoint address, then creating a security header with the results of our signin call using the specific vault/user information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;           SecurityServiceLocator loc = new SecurityServiceLocator();
            loc.setSecurityServiceSoapEndpointAddress("http://" + vaultServer + "/autodeskDM/Services/SecurityService.asmx");
            SecurityServiceSoapStub port = (SecurityServiceSoapStub)loc.getSecurityServiceSoap();

           port.signIn(userName, password, vaultName)


            SOAPHeaderElement soapHead = port.getResponseHeader("http://AutodeskDM/Services/Security/1/22/2015/", "SecurityHeader");
            NodeList secNodes = soapHead.getChildNodes();
            String ticket = null;
            long userId = -1;
            for (int i=0; i&amp;lt;secNodes.getLength(); i++)
            {
                Node n = secNodes.item(i);
                String nodeName = n.getNodeName();
                if (nodeName != null &amp;amp;&amp;amp; nodeName.equals("Ticket"))
                {
                    ticket = n.getFirstChild().getNodeValue();
                }else if (nodeName != null &amp;amp;&amp;amp; nodeName.equals("UserId"))
                {
                    String userIdString = n.getFirstChild().getNodeValue();
                    userId = Long.parseLong(userIdString);
                }
            }
            securityHeader = new SecurityHeader(ticket, userId);&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We now need to update to the Vault 2016 API and have to update or rewrite the code.&amp;nbsp;&amp;nbsp; All help references I can find are for .NET, c#, VB etc. and seem to reference WebServicesTools classes that I cannot find.&amp;nbsp; Note: we use a wsdl to java class generator to get all the classes for WebServices.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My hope is that once I have WebServicesTools I can get the WebServiceManager or UserPasswordCredentials classes.&amp;nbsp; Is this the right approach? Where do I find those?&amp;nbsp; Any other ideas?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2015 15:36:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5801939#M9144</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-03T15:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Vault API login using Java</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5807812#M9145</link>
      <description>&lt;P&gt;If you are generating Java classes from the WSDLs you will not have the WebServiceManager or UserPasswordCredentials classes.&amp;nbsp; The reason is because those classes are not part of the web-service API - they are part of a C#/.NET client-side SDK which wraps all the C# classes that we generated from the WSDL. In the process of creating the C#/.NET client-side SDK from the web-service WDSLs, many things were added that are not part of the web-service API (dealing with the security header, automatic re-signin, automatic ownership transfer, etc).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Later we created another layer on top of the SDK called the VDF (also a C#/.NET library).&amp;nbsp; The VDF can do things such as fixing up the references between files after downloading a file whose children have been renamed or moved in the vault.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While it is still possible to call the web-service API directly, doing so excludes you from being able to take advantage of the SDK/VDF.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want to use the SDK and/or VDF from Java, IMHO, your best bet is probably a third party Java to C# bridge, or possibly JNI.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;-Dave&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Sep 2015 18:51:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5807812#M9145</guid>
      <dc:creator>minkd</dc:creator>
      <dc:date>2015-09-08T18:51:39Z</dc:date>
    </item>
    <item>
      <title>Re: Vault API login using Java</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5815983#M9146</link>
      <description>We were able to dig through the classes and find a way around using a bridge. The original way our code was designed is, frankly, dumb, but we are stuck with it for now as a full redesign doesn't make sense. Thanks!</description>
      <pubDate>Mon, 14 Sep 2015 15:51:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/5815983#M9146</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-14T15:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: Vault API login using Java</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/7693945#M9147</link>
      <description>&lt;P&gt;I am also Trying to connect to Vault 2016 via Java,&amp;nbsp;How did you get the connection? Can you share some code to point me in the right direction?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 14:33:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/7693945#M9147</guid>
      <dc:creator>james</dc:creator>
      <dc:date>2018-01-16T14:33:42Z</dc:date>
    </item>
    <item>
      <title>Re: Vault API login using Java</title>
      <link>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/7763650#M9148</link>
      <description>&lt;P&gt;Please tell me you (or somebody else) solved this problem... I'm facing it now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2018 20:40:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vault-customization-forum/vault-api-login-using-java/m-p/7763650#M9148</guid>
      <dc:creator>abroderickHBFN6</dc:creator>
      <dc:date>2018-02-08T20:40:11Z</dc:date>
    </item>
  </channel>
</rss>

