Vault 2016 api C# add item soap exception 155

Vault 2016 api C# add item soap exception 155

Anonymous
Not applicable
538 Views
1 Reply
Message 1 of 2

Vault 2016 api C# add item soap exception 155

Anonymous
Not applicable

Hello, 

 

 I am trying to add a new item

 

using the following code and i am getting soap exception 155

 

try
            {
                using (GV.wServ = GV.connection.WebServiceManager)
                {
                    var cd = (Global.CategoryData)cBox_ItemMasterCategoryList.SelectedItem;
                    var ns = (Global.NumSchemes)cBox_ItemNumScheme.SelectedItem;

                    
                    ItemService IS = GV.wServ.ItemService;
                    var item = IS.AddItemRevision(cd.CatID);
                    ProductRestric[] pres = new ProductRestric[1]; 
                    long[] mID = { item.MasterId };
                    long[] sID = { ns.SchemeID };
                    getItemNum();

                    ItemNum[] newNumbers = IS.AddItemNumbers(mID, sID, ItemNSFieldInputs, out pres);
                    

                }
            }
            catch(SoapException se)
            {
                MessageBox.Show(se.ToString());
            }
            catch (System.Exception ex)
            {

                MessageBox.Show(ex.ToString());
            }

This is the line I am getting the error

ItemNum[] newNumbers = IS.AddItemNumbers(mID, sID, ItemNSFieldInputs, out pres);
0 Likes
539 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

Update:

======

 

The issue with the FieldInputs

 

Names Scheme items having isssues

autogeneration - store - "" to field array

FreeText - Not working if we pass the freetext value in to the field array

 newItemNum = new string[] { TextBox_obj.Text };
                                    tempArr = new StringArray();
                                    tempArr.Items = newItemNum;
                                    ItemNSFieldInputs[index] = tempArr;

Delimiter - Ignore - No need to pass anything in the field array

FixedText - Ignore - No need to pass anything in the field array

Workgroup Ignore - No need to pass anything in the field array

PredefinedList - Not working if we pass the list value in to the field array

newItemNum = new string[] { ComboBox_obj.SelectedItem.ToString() };
                                    tempArr = new StringArray();
                                    tempArr.Items = newItemNum;
                                    ItemNSFieldInputs[index] = tempArr;

 

How do I pass the free text value and the predifined listvalue to the field array which then can be passed to 

 

IS.AddItemNumbers(mID, sID, ItemNSFieldInputs, out pres);

0 Likes