Community
Vault Customization
Share your knowledge, ask questions, and explore popular Vault API, Data Standard, and VBA topics related to programming, creating add-ins, or working with the Vault API.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unhandled error when retrieving item BOM in Vault 2013

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
412 Views, 2 Replies

Unhandled error when retrieving item BOM in Vault 2013

I have code that accesses the item BOM as follows:

 

if (itemLifeCycleState == "Work In Progress") 
bom = _svc.ItemService.GetItemBOMByItemIdAndDate(itemId, itemEffStart, BOMTyp.Tip, BOMViewEditOptions.Defaults);
else //Obsolete or Released (In Review is not applicable)
bom = _svc.ItemService.GetItemBOMByItemIdAndDate(itemId, DateTime.Now, BOMTyp.Effective, BOMViewEditOptions.Defaults);

The code compiled with the Vault 2012 DLLs works fine against a Vault 2012 repository . But the same EXE generates an unhandled exception when running against a Vault 2013 repository. The data on the 2013 server was restored from a backup of the 2012 server. The exception occurs when the code attempts to retrieve the BOM of an Obsolete item. 

 

I ran into the same exception when testing code against data created in Vault 2013. Unfortunately, I don't recall the exact circumstances except that the item was Obsolete. 

 

I will try to recreate the issue in 2013. In the meantime, I'd really appreciate any suggestions on how get around this. 

 

Thanks.

 

F.

 

2 REPLIES 2
Message 2 of 3
Redmond.D
in reply to: Anonymous

First you need to handle the exception with a catch block.  That will give you more information such as the exception type, error code, and the line of code that is failing.

 



Doug Redmond
Software Engineer
Autodesk, Inc.

Message 3 of 3
Anonymous
in reply to: Anonymous

The error occurs on the line:

 

bom = _svc.ItemService.GetItemBOMByItemIdAndDate(itemId, DateTime.Now, BOMTyp.Effective, BOMViewEditOptions.Defaults);

 

The exception message is:

 

Unhandled Exception: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: 1417

   at Autodesk.Connectivity.WebServices.ItemSvc._ItemService.Invoke(String methodName, Object[] parameters)

   at Autodesk.Connectivity.WebServices.ItemSvc._ItemService.GetItemBOMByItemIdAndDate(Int64 itemIterationId, DateTime dateOfInterest, BOMTyp type, BOMViewEditOptions options)

 

I am able to reproduce this error with a small test Vault. Let me know if you'd like a copy. Thanks.

 

F.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report