Service that returns the attributes/fields of the document

Hi everyone!

What product/components do you use and which version/fix level are you on?

webMethods 10.11

What are you trying to achieve? Please describe in detail.

I would like to know if there is any service in the webMethods designer that can return the attributes/fields of a document just by indicating the path of the document

Appreciate your attention, have a nice day!

NSName nsName = NSName.create("your-doc-name-here");
					Namespace ns = Namespace.current();
					NSRecord nsRecord = (NSRecord)ns.getNode(nsName);
					IDataCursor recordCursor =  nsRecord.getValues().getCursor();
					IData rec_fields[] = IDataUtil.getIDataArray(recordCursor , "rec_fields"); //this should give all the attributes and fields
1 Like

We use something similar. Just keep in mind that the use of a couple of these classes is not supported by SAG. You’re on your own if there are issues.