Unhandled error when retrieving item BOM in Vault 2013

Unhandled error when retrieving item BOM in Vault 2013

Anonymous
Not applicable
747 Views
2 Replies
Message 1 of 3

Unhandled error when retrieving item BOM in Vault 2013

Anonymous
Not applicable

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.

 

0 Likes
748 Views
2 Replies
Replies (2)
Message 2 of 3

Redmond.D
Autodesk
Autodesk

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.

0 Likes
Message 3 of 3

Anonymous
Not applicable

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.

0 Likes