AnsweredAssumed Answered

Custom content types

Question asked by naveenkumar on Apr 25, 2007
Latest reply on May 7, 2007 by naveenkumar
I created my own content types, i want to use them while adding node using JCR API. lets take my content type is dml:rsscontent.
here is my java class.

Node rootNode = session.getRootNode();
         // first, access the company home
         Node companyHome = rootNode.getNode("app:company_home");
         Node rssFeeds = companyHome.getNode("app:user_homes");
         //To get items from rss feeds.                       
         // create the content nodegud morning
         Node channelContent = rssFeeds.addNode("cm:","dml:rsscontent");

while executing the above class i am getting this error

org.alfresco.service.namespace.NamespaceException: Namespace prefix dml is not mapped to a namespace URI
   at org.alfresco.service.namespace.QName.createQName(
   at org.alfresco.service.namespace.QName.createQName(
   at org.alfresco.jcr.item.NodeImpl.addNode(
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.alfresco.jcr.util.JCRProxyFactory$SessionContextInvocationHandler.invoke(
   at $Proxy82.addNode(Unknown Source)

I found similar kind of problem in this link
as well as the solution.not able to do that way.

Please any one help me……………..