Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Custom Metadata - Metadata Manager
jholmes
Within our Metadata Manager we have some custom Metadata. We'd like to update (add) the values within the "Allowed Values" field from the Java API's. Is this possible and if so, are there any examples that I should follow?
Thanks,
Jay
Find more posts tagged with
Comments
lyman
Sorry to be slow. Do you mean that you want to add to the list of permissible values for a value list or string list field? IN other words add choices?
Is there some reason you want to be able to do this programatically, or wuld using the Windows Native Client suffice? Generally we recommend that changes to metadata definitions be somewhat uncommon as none of the operations go back and change data (e.g., if you wree to rmeove a choice it would not be available in future but no values that used that choice in the past would be affected).
Cheers,
Lyman Hurd
MediaBin Server Team
MediaBin Server Team
Interwoven, Inc.
jholmes
Yes, we would like to add to the list of permissable values...
We are familiar with doing it through the windows client but we'd like to do it programatically. The "permissible values" are actually being created in a different system, so as they're created, we'd like to have them populated into the list (within mediabin).
Thanks,
Jay
lyman
Please let me know what version of MB you are running? There were two incaranations of the java interface and they have different capabilities. The most recent version is a wrapper that exposes the methods in the web services API.
Thanks,
Lyman Hurd
MediaBin Server
MediaBin Server Team
Interwoven, Inc.
lyman
Assuming that you are working with one of the later releases, the web services API and hence the java wrapper of web services does expose the ability to export a metadata definition as XML and reimport it. It shol d be relatively simple to manipulate the XML programatically (the schema is straightforward).
Hope this helps,
Lyman Hurd
MediaBin Server Team
MediaBin Server Team
Interwoven, Inc.
jholmes
We are on version 4.5 SP1. You wouldn't happen to know the API method call would you?
Thanks,
Jay
msnider
The methods are ExportMetadataDefinition( string MetadataID ) and ImportMetadataDefinition( string xmlString )
You may wish to consult the webservice section of the MediaBin API doc and\or the webservice JavaDoc which is included with the webservice SDK.
Mark
jholmes
When I try using the method 'ImportMetadataDefinition', I get the following error message:
AxisFault
faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Server was unable to process request. --> MBException: Import from XML failed. (0x80040444)
faultActor:
faultNode:
faultDetail:
{
http://xml.apache.org/axis/}stackTrace:
AxisFault
faultCode: {
http://schemas.xmlsoap.org/soap/envelope/}Server
faultSubcode:
faultString: Server was unable to process request. --> MBException: Import from XML failed. (0x80040444)
faultActor:
faultNode:
faultDetail:
Server was unable to process request. --> MBException: Import from XML failed. (0x80040444)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java(Compiled Code))
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.mediabin.
www.MediaBinServerSoapStub.importMetadataDefinition(MediaBinServerSoapStub.java:7573)
at com.ejgallo.sharedservices.posimageprocess.LoadPOSProgram.insertRecord(LoadPOSProgram.java:90)
at com.ejgallo.sharedservices.posimageprocess.LoadPOSProgram.main(LoadPOSProgram.java:127)
Server was unable to process request. --> MBException: Import from XML failed. (0x80040444)
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:260)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:169)
at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java(Compiled Code))
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:242)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:538)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:376)
at org.apache.axis.client.Call.invokeEngine(Call.java:2583)
at org.apache.axis.client.Call.invoke(Call.java:2553)
at org.apache.axis.client.Call.invoke(Call.java:2248)
at org.apache.axis.client.Call.invoke(Call.java:2171)
at org.apache.axis.client.Call.invoke(Call.java:1691)
at com.mediabin.
www.MediaBinServerSoapStub.importMetadataDefinition(MediaBinServerSoapStub.java:7573)
at com.ejgallo.sharedservices.posimageprocess.LoadPOSProgram.insertRecord(LoadPOSProgram.java:90)
at com.ejgallo.sharedservices.posimageprocess.LoadPOSProgram.main(LoadPOSProgram.java:127)
Any ideas?
Thanks,
Jay
msnider
Is there anything written in the server's MBP.log that indicates an error? Can you import the XML file using the native Windows client?
Mark
lyman
Also if you could paste the XML of the metadata definition you are trying to import into this thread (hoping it isn't too verbose) we can help diagnose what might be wrong. However, I echo that mbp.log is a good first step.
Lyman Hurd
MediaBin Server Team
MediaBin Server Team
Interwoven, Inc.
jholmes
I found what my issue was...
This is the error I found in the server's MBP.log:
11/29/05 16:48:21 Error Importing Metadata: Error in parsing.
line: 1, col: 296
Message: Expected end of tag 'default'
For testing, I was exporting the xml (from the API) and then I'd edit it within a text editor, then put the edited xml into a String variable and use the import API - which resulted in the original error. It turns out that the text editor I was using (UltraEdit) was converting the value "<DEFAULT>" to "<default>". Once I changed the tags to have matching opening and closing values, everything worked fine.
Thanks everyone for the help!