Hi I am using this code in my Inventor Addin
Dim mgr As VaultServiceManager = GetServiceManager()
If (mgr.docSvc Is Nothing) Then
mgr.docSvc = New DocumentServiceWse()
mgr.docSvc.Url = mgr.SetSvcUrl(mgr.docSvc, Connectivity.InventorAddin.EdmAddin.EdmSecurity.Instance.GetEdmSecurityContext. RemoteHost)
mgr.docSvc.SecurityHeaderValue = New DocumentSvc.SecurityHeader()
mgr.docSvc.SecurityHeaderValue.Ticket = Connectivity.InventorAddin.EdmAddin.EdmSecurity.Instance.GetEdmSecurityContext. Ticket
mgr.docSvc.SecurityHeaderValue.UserId = Connectivity.InventorAddin.EdmAddin.EdmSecurity.Instance.GetEdmSecurityContext. UserID
end if
Private Function SetSvcUrl(ByVal svc As System.Web.Services.Protocols.SoapHttpClientProtocol, ByVal HOST As String) As String
Dim url As UriBuilder = New UriBuilder(svc.Url)
url.Host = HOST
svc.Url = url.Uri.ToString()
Return svc.Url
End Function
René J
I have a problem with this code line
Dim mgr As VaultServiceManager = GetServiceManager()
What the library is applied here?
Where can I find VaultServiceManager
Would you be so kind to help me? René J
The ServiceManager is a factory for easily creating web service objects. It's not part of the API in Vault 2011 and earlier, but it shows up in multiple sample applications. See VaultFileBrowser in the SDK for an example ServiceManager.
The code you mention eailer in this thread does not work for 2011 and I can't user the VaultServiceManager to get the SercurityHeader until 2012. Besides the references you've mentioned in an earlier thread, the Security object also requires Connectivity.Proxies.utils to be referenced which I've done. I can't find a reference in any of the loading libraries to ServiceAttributeTest (Object Browser) so I'm assuming it used to be in one of the two libraries that you've said requires referencing (just a guess). In any case, are there any changes I can make to get the SercurityHeader in 2011?
Just to confirm ( & bump ) : This "hack" still works in IV2013, but it would be a #### of a lot easier if an IWebService was exposed to create a WebServiceCredentials out of the box..
( but then it wouldn´t have the cool notion of a hack now would it 😉 )
Back in 2011this was the answer to a question about getting security header information - in a inventor plug-in - from the Vault plug-in.
Reply 09/16/2011 at 04:45 PM
It appears that this no longer works in Inventor 2015 Professional. Is there still a way to do this?
Yes, there is a way for your Inventor plug-in to get the security header from the Vault plug-in.
This topic is covered in a discussion group post:
http://forums.autodesk.com/t5/Autodesk-Vault/SecurityHeader-in-Inventor/m-p/1713249/highlight/true#M...