Getting Namespace From Document Object

In my JSP I have an Document that contains the contents of an xsl file. I want to search for a specific variable element and then replace its contents with some new value. I think the problem I'm having though relates to namespaces. When calling method selectSingleNode I think I need to pass the namespace node as the 3rd parameter. I'm not sure how to get that though. I know there's a method getNamespaceURI but that returns a string instead of the node. Is there any way to get the namespace node?
<%
Document xslDoc = myClass.loadTheXml((new File("test.xsl"))); // assume loadTheXML works correctly
Node node = XPathAPI.selectSingleNode(xslDoc.getDocumentElement(), "/xsl:stylesheet/xsl:variable[@name='myVariable']");
%>

public static Node selectSingleNode(Node contextNode,
                                    java.lang.String str,
                                    Node namespaceNode)The namespaceNode parameter in the selectSingleNode is a Node of the type namespace, for example
http://exist.sourceforge.net/api/org/exist/memtree/NamespaceNode.html
http://www.jdocs.org/jaxen/1.0/api/org/jaxen/dom/NamespaceNode.html

Similar Messages

  • How to get File  object from Document Object . ?

    In conventional Dom Parsing we pass file to DocumentBuilder to get Document Object .
      File file = new File("c:\\MyXMLFile.xml");
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.parse(file); // gOT Document here . My problem is how do i get File object back from Document . If i have Document object with mi.
    Please consider above code as example i dont have File object in my code . i am using Xhive DB API where i get Document directly from API method .
    I need to convert this Document to File to get size of file
    Please suggest solution on this
    Edited by: AmitChalwade123456 on Dec 5, 2008 6:10 AM

    Hello Guys any views on this topic

  • Getting null in document object Help me

    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                   DocumentBuilder builder = factory.newDocumentBuilder();
                   InputSource inputSource = new InputSource();
                   inputSource.setCharacterStream(new StringReader("<?xml version=\"1.0\"?><address></address>"));
                   System.out.println(inputSource);
                   Document doc = builder.parse(inputSource);
    Getting doc object as null. CAn anyone please find out what could be the error in my code?

    This works:
         * Get DOM document from a string containing XML.
         * @param inputStream InputStream to read XML content from.
         * @return DOM document or null if failed.
         * @throws Exception if failed.
        static public Document toDocument(InputStream inputStream) throws Exception {
            Document result = null;
            if (inputStream != null) {
                DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    //            factory.setValidating(true);  //needs error handler
                factory.setNamespaceAware(true);
                DocumentBuilder db = factory.newDocumentBuilder();
                result = db.parse(new InputSource(inputStream));
            }//else: input unavailable
            return result;
        }//toDocument()

  • Using EL to get values from View Objects

    Hello again!
    I' m using jdev 11.1.1.4.0, with adf and business components
    Is there any way i can get a value to an af:outputText from a view object's field without
    a) having to expose all fields that I need in bindings tab?
    b) having to declare all fields to a backing bean
    I have a statistical table with about 30 numbers in a record and it would make my project impossible to follow!
    Some EL on the af:outputText with a parameter to a function on my backing bean, would sound perfect, but I've read that it's impossible...
    Any clues?
    Thank you for your efforts!
    Nikos

    I did not understand you.
    will the drag and drop your attribute on your page will solve your problem?
    or do you need to create attributeValues biding for single attribute? if yes do the following:
    1- From your page, right click and select Go to Page Definition.
    2- From the binding section, click the plus green icon to create a new control biding, and choose attributeValues from the list.
    3- select your data source from the list or create a new one, then select the attribute you need.
    4- now you have a biding, and you can set the value for your output text.
    value =#{biding.yourAttribute.inputValue}

  • Problems in getting userid from Appscontext object

    Hi,
    Just a novice on OA ..Need a way to get userid .Currently i initiate an appsContext object using a DBC filepath. and then call getUserID() on the initialized object but I get it as -1 .
    WebAppsContext app = new WebAppsContext("dbc file name along with the path");
    app.getUserID(); // Gets me -1
    As a cross check on the appsContext object app I acquired a jdbc connection from the appscontext object and fired a dummy query , which did worked implying the object app has been initialized.
    Hopin for a quick resolution or an alternate way of doin this,.

    Hi .
    sorry i hadnt made my reqmt clear ...
    the thing is i m hitting a servlet from OA. And in this servlet i need to fetch userid so that i can query on fnd_users for getting the logged in user description , letz say i get user desc as abc ..so as to display welcome abc on top of the my custom page.
    as itz a normal servlet ..i dont have pagecontext object ..just the usual servlet stuff like httpRequest . So how to get userid / user desc in this case...
    any alternate way .. does an OA exception trace has userid info that can be extracted....
    just a quest ..does AppsContext.getUserID() return -1 if itz initialized thru DBC filepath ?
    Regards,
    Ashley.

  • Problems getting namespace from XML

    hi all....
    I'm trying to parse this XML using SAX.
    <soap: Envelope xmlns:..... (several namespaces)>
    <soap:Body>
    <GetResponse xmlns="http://altnamespace">
    <GetResult>data</GetResult>
    </GetResponse>
    </soap:body>
    </soap:Envelope>
    my problem is I can't get to the embedded altnamespace in GetReponse.
    here is a code snippet:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(httpConn.getInputStream());
    Element root = doc.getRootElement();
    Namespace ns = root.getNamespace();
    Element element = root.getChild("Body",ns)
    ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
    I've tried:
    Namespace altNamespace = element.getChild("GetResponse").getNamespace();
    but that returns null....
    I need it so that I can execute the following code to get the data:
    Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
    String data = dataElement.getText();
    any help would be appreciated..... forgive my ignorance....
    sean

    hi all....
    I'm trying to parse this XML using SAX.
    <soap: Envelope xmlns:..... (several namespaces)>
    <soap:Body>
    <GetResponse xmlns="http://altnamespace">
    <GetResult>data</GetResult>
    </GetResponse>
    </soap:body>
    </soap:Envelope>
    my problem is I can't get to the embedded altnamespace in GetReponse.
    here is a code snippet:
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(httpConn.getInputStream());
    Element root = doc.getRootElement();
    Namespace ns = root.getNamespace();
    Element element = root.getChild("Body",ns)
    ok so far -- I get the soap:Body element. But my problem is, I need that embedded "altnamespace" of the next element down, Get Response.
    I've tried:
    Namespace altNamespace = element.getChild("GetResponse").getNamespace();
    but that returns null....
    I need it so that I can execute the following code to get the data:
    Element dataElement = element.getChild("GetImageResponse",altNamespace).getChild("GetImageResult",altNamespace);
    String data = dataElement.getText();
    any help would be appreciated..... forgive my ignorance....
    sean

  • Getting data from view object into backing bean

    Hi,
    My requirement is explained below -
         I have a ADF editable table in a jsf page which is connected to backend database table. In the table there are 6 columns and only 2 are editable. So when user inputs a value in first input column an event is triggered such that the data for all the remaining columns should be fetched from another database table.
    Typically if we are not using ADF development environment. We would have had a simple business method which creates the sql query by taking the input from textbox with simple where clause and I would have got the data. I am not getting any idea how to do this in ADF. I have the second table as view object but how to access the view object from backing bean and get data based on the input given.

    Hi,
    step 1) Expose a method on the ViewObject Impl class
    step 2) define arguments for the method as needed to identify the row to read data from
    step 3) retrieve the row from the VO that holds the data you want to add and return a HashMap with this information
    step 4) expose the method on the client interface (Java menu selection on the View Object)
    step 5) In the PageDef file, create a method binding to the method you exposed on the ViewObjectImpl
    step 6) Call the method binding from the managed bean like
    OperationBinding getDataFromVO = (OperationBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("Name of method binding);
    getDataFromVO.getParamsMap().put("name of arguments1", value1);
    getDataFromVO.getParamsMap().put("name of arguments2", value2);
    Object retData = getDataFromVO.execute();
    if(retData != null && getDataFromVO.getErrors().size()==0){
      HashMap retDataMap = (HashMap) retData;
    ... follow the rest of your logic ....
    Frank

  • Get Value From Combo Object

    when i declare
    ===================================
    Dim vCombo As SAPbouiCOM.ComboBox
    set vCombo = oTmpForm.Items("44").Specific
    sGRSC = vCombo.Selected.Value
    'to get combo current value into variable sGRSC
    ============================================
    i always get this error message
    "Run Time Error 91 Object Variable or With Block Variable not set ".
    Am i wrong using Combo Properties. Any Suggestion ?

    Hamdi,
    U might not have set a value for the combobox.
    Set a value like this:
              oCombo.ValidValues.Add "I", "In process"
              oCombo.ValidValues.Add "H", "On Hold"
              oCombo.ValidValues.Add "C", "Completed"
              oCombo.Select 0, psk_Index
    This will set the first value ( index starts at 0 )
    as Selected.
    Later, when u pull the combobox value into a string , it will have "I".
    ===============================================
    Hope this helps.

  • Getting data from on object!!

    Hello!
    Well I'm having a problem when I try to get the data from a class i my jsp page.
    I have a database conection class and methods to conect to tha database and get the data :
    package teste;
    public class Data {
        Connection con;
        Detalhes detalhes;
        ArrayList list;
        public Data()throws Exception {       
            try {
                Class.forName("org.gjt.mm.mysql.Driver");
                con = DriverManager.getConnection("jdbc:mysql://127.0.0.1/Loja?user=root&password=131283");            
            } catch (Exception ex) {
                throw new Exception(" Database not found!!" +
                    ex.getMessage());
        public void remove() {
            try {
                con.close();
            } catch (SQLException ex) {
                System.out.println(ex.getMessage());
        public Detalhes getDetalhes(int codigo){
            try {
                String selectStatement = "select * from produto where codigo="+codigo;
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next())
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
            }catch(Exception e){
                return detalhes;
        public ArrayList getList(){
            try {
                String selectStatement = "select * from produto";
                PreparedStatement prepStmt = con.prepareStatement(selectStatement);
                ResultSet rs = prepStmt.executeQuery();
                while(rs.next())
                     detalhes = new Detalhes(rs.getString(1), rs.getString(2), rs.getDouble(3), rs.getInt(4));          
                     list.add(detalhes);
            }catch(Exception e){
                return list;
    }    i have too, a context class to put the database conection avalaible:
    package teste;
    public final class ContextPage implements ServletContextListener {
        private ServletContext context = null;
        Data dados;
        public void contextInitialized(ServletContextEvent event) {
            context = event.getServletContext();
            try {
                dados = new Data();
                context.setAttribute("bookDB", dados);
            } catch (Exception ex) {
                System.out.println("Couldn't create bookstore database bean: " +
                    ex.getMessage());
        public void contextDestroyed(ServletContextEvent event) {
            context = event.getServletContext();
            Data dados = (Data) context.getAttribute("bookDB");
            if (dados != null) {
                dados.remove();
            context.removeAttribute("bookDB");              
    }I have too a class with methods to store and show the data that i'd got from the conection class:
    package teste;
    public class Detalhes {
        String titulo, autor;
        Double preco;
        int codigo;
        public Detalhes(String titulo, String autor, Double preco, int codigo) {
            this.titulo = titulo;
            this.autor = autor;
            this.preco = preco;
            this.codigo = codigo;
        public String getTitulo(){
            return titulo;
        public String getAutor(){
            return autor;
        public Double getPreco(){
            return preco;
        public int getCodigo(){
            return codigo;
    }and the last class is to intermediate the data flow between Data.class and Detalhes.class.
    package teste;
    import java.util.ArrayList;
    public class GetData {
         Data db;
         int codigo;
         Detalhes detalhes;
         public GetData() {       
        public void setCodigo(int codigo){
            this.codigo = codigo;
        public void setDb(Data db){
            this.db = db;
        public Detalhes getDetalhes()throws Exception{
            detalhes = (Detalhes)db.getDetalhes(codigo);
            return detalhes;
        public ArrayList getList()throws Exception{
            return db.getList();
        public void remove() {
            db.remove();
    }and the piece of my page with proble is
    <p><b><h1>Resultado:</h1></b></p><br>
    <jsp:useBean id="dados" class="teste.GetData" scope="page">
          <jsp:setProperty name="dados" property="db" value="${dados}"/>
    </jsp:useBean>    
    <jsp:setProperty name="codigo" property="db" value="1"/>So the problem is that when i acess this page i get an error message
    could you geve me some advice with some code?
    the exception is:
    org.apache.jasper.JasperException: Attempt to coerce a value of type "teste.GetData" to type "teste.Data"
         org.apache.jasper.runtime.JspRuntimeLibrary.handleSetPropertyExpression(JspRuntimeLibrary.java:659)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:53)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)I thank you very much for this help!! All the best!!

    Thanks for trying to help me, but I just have done this:
    <jsp:useBean id="gDados" class="teste.GetData" scope="page">
          <jsp:setProperty name="gDados" property="db" value="${dados}"/>
    </jsp:useBean>    
    <jsp:setProperty name="codigo" property="db" value="1"/>
    <p><b><h1>${gDados.detalhes.titulo}</h1></b></p><br>and it brings me the excption :
    org.apache.jasper.JasperException
         org.apache.jasper.runtime.JspRuntimeLibrary.internalIntrospecthelper(JspRuntimeLibrary.java:365)
         org.apache.jasper.runtime.JspRuntimeLibrary.access$000(JspRuntimeLibrary.java:60)
         org.apache.jasper.runtime.JspRuntimeLibrary$PrivilegedIntrospectHelper.run(JspRuntimeLibrary.java:90)
         java.security.AccessController.doPrivileged(Native Method)
         org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(JspRuntimeLibrary.java:306)
         org.apache.jsp.Resposta_jsp._jspService(Resposta_jsp.java:60)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         java.lang.reflect.Method.invoke(Method.java:585)
         org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         java.security.AccessController.doPrivileged(Native Method)
         javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)have youany other suggestion?Thanks!!

  • Jaxp-Unable to remove an attribute permanently from document object

    Hi
    I have a requirement where I have to strip out an attribute called "xmlns" at the root element of my xml document.
    for eg: <UserProfile xmlns="http://foo">
    <ID>1234</ID>
    <Name>Bob</Name>
    </UserProfile>
    I tried using API's
    1) document.getDocumentElement.removeAttribute("xmlns")
    After this my xml document look like this
    <UserProfile >
    <ID>1234</ID>
    <Name>Bob</Name>
    </UserProfile>
    Also tried this..
    2) Attr att=document.getDocumentElement().getAttributeNode("xmlns");
    att.setValue("");
    document.getDocumentElement().setAttributeNodeNS(att);
    After this my xml document look like this
    <UserProfile xmlns="">
    <ID>1234</ID>
    <Name>Bob</Name>
    </UserProfile>
    Irrespective of all this , when I gave the new xml document to Jaxb for processing , Jaxb complains that
    unexpected root element
    uri:http://foo
    Though this attribute neither visible nor accessible using any DOM apis, still this attribute exists as part of this document.
    Could somebody explains a little more about this behaviour or help me to resolve this..
    Any feedback will be deeply appreciated,
    Ranjith Pillai.

    Ranjith,
    I am facing the same problem and still not been able to figure out what's wrong with parsing.
    Here is the XML document before cleaning
    INFO: Clean CamMessage=
    <?xml version='1.0' encoding='UTF-8'?>
    <CamMessage>
    <originator name="CLARIFYCRM" version="1.0"/><security><key>rO0ABXNyACFjb20uY2luZ3VsYXIuY2FtLmF1dGguU2VjdXJpdHlLZXkhdeFvAoQflwIABEoADGNy
    ZWF0aW9uVGltZUoAB2V4cERhdGVMAApjbGllbnRUeXBldAARTGphdmEvbGFuZy9DbGFzcztMAAh1
    c2VySW5mb3QAD0xqYXZhL3V0aWwvTWFwO3hwAAAA/HwfQv8AAAD8fDGSf3ZyACJjb20uY2luZ3Vs
    YXIuY2FtLmNhcmUuYXV0aC5DU1JBdXRoAAAAAAAAAAAAAAB4cHNyABFqYXZhLnV0aWwuSGFzaE1h
    cAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAH
    dAAIUGFzc3dvcmR0AAtDTEFSSUZZQ1JNO3QAEm9yaWdpbmF0b3IudmVyc2lvbnQAAzEuMHQABFNp
    dGV0AAMwMDF0AAZVc2VySWR0AApDTEFSSUZZQ1JNdAAKQ29tcGFueU5icnQAAjM1dAAPb3JpZ2lu
    YXRvci5uYW1ldAAKQ0xBUklGWUNSTXQAD1Byb2Nlc3NPbkJlaGFsZnEAfgAPeA==</key></security><request action="Login"><select><field name="Password">CLARIFYCRM;</field><field name="Site">001</field><field name="UserId">CLARIFYCRM</field><field name="ProcessOnBehalfUserId">CLARIFYCRM</field><field name="CompanyNbr">35</field></select></request><response><resultSet/></response>
    </CamMessage>
    INFO: Clean CamMessage=
    <?xml version='1.0' encoding='UTF-8'?>
    <CamMessage>
    <originator name="CLARIFYCRM" version="1.0"/><security><key>rO0ABXNyACFjb20uY2luZ3VsYXIuY2FtLmF1dGguU2VjdXJpdHlLZXkhdeFvAoQflwIABEoADGNy
    ZWF0aW9uVGltZUoAB2V4cERhdGVMAApjbGllbnRUeXBldAARTGphdmEvbGFuZy9DbGFzcztMAAh1
    c2VySW5mb3QAD0xqYXZhL3V0aWwvTWFwO3hwAAAA/HwfQv8AAAD8fDGSf3ZyACJjb20uY2luZ3Vs
    YXIuY2FtLmNhcmUuYXV0aC5DU1JBdXRoAAAAAAAAAAAAAAB4cHNyABFqYXZhLnV0aWwuSGFzaE1h
    cAUH2sHDFmDRAwACRgAKbG9hZEZhY3RvckkACXRocmVzaG9sZHhwP0AAAAAAAAx3CAAAABAAAAAH
    dAAIUGFzc3dvcmR0AAtDTEFSSUZZQ1JNO3QAEm9yaWdpbmF0b3IudmVyc2lvbnQAAzEuMHQABFNp
    dGV0AAMwMDF0AAZVc2VySWR0AApDTEFSSUZZQ1JNdAAKQ29tcGFueU5icnQAAjM1dAAPb3JpZ2lu
    YXRvci5uYW1ldAAKQ0xBUklGWUNSTXQAD1Byb2Nlc3NPbkJlaGFsZnEAfgAPeA==</key></security><request action="Login"><select><field name="Password">CLARIFYCRM;</field><field name="Site">001</field><field name="UserId">CLARIFYCRM</field><field name="ProcessOnBehalfUserId">CLARIFYCRM</field><field name="CompanyNbr">35</field></select></request><response><resultSet/></response>
    </CamMessage>
    Code to unmarshal
    Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
    unmarshaller.setValidating(false);
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    dbf.setNamespaceAware(true);
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(new File( "test.xml"));
    //Document doc = db.parse(inMessage);
    cmcamList = (CamMessage )unmarshaller.unmarshal( doc );
    //test.xml is actually the clean xml message as above.
    Appreciate any help in resolving the problem.
    Thanks,
    Nilesh

  • How get data from business object to xml file

    Hi all,
    My new problem is ,,
    In my application, I have check list of selected business partners. In that , I want to save the checked oBusinessPartners complete information to an XML file(created dynamically),
    How to do?
    Thanks in advance
    shashi kiran

    Shashi Kiran,
    Can you explain me detail where
    you want to save check business partners in xml ?
    Jeyakanthan

  • Generic way to get Document object for CS products

    Just going through the CS SDK documentation it appears, for each product - Photoshop, InDesign, Illustrator, InCopy - one has to
    get hold of a Document object that is tied to each product. In other words com.adobe.illustrator.Document for Illustrator and so on.
    It would be a life saver to have a base Document class that provides common properties across al CS products, ad have product
    specific Document class inherit from the common Document base class. That way developers could write more generic code
    that doesn't need to couple with the specific application so tightly. Is there such a class already ? Didn't find it in the CS SDK docs
    or the sdk itself.
    Also beyond the 4 products (Photoshop, InDesign, Illustrator, InCopy) how does one get hold of Document object for Flash Pro etc.
    Are there plans to add ActionScript support beyond the 4 products ?  There are ~ 15 products in CS and it seems we need to now use
    CS SDK and the old C++ sdk for the unsupported products in CS SDK, make sit hard to write apps that are cross platform and
    work seemlessly with all CS products.
    Oliver A @ Evolphin
    http://www.evolphin.com

    In Computer Science we say all problems can be solved by one more level of indirection . While each product has
    different scripting models, why can't a generic base class bridge them via a delegation pattern that invokes the product specific document method
    for common properties like document path, document folder etc. Product specific methods can be implemented as they are now I am just
    talking about common methods.
    For e.g.
       com.adobe.product.Document.getDocumentPath() ----> via derived clas soverride will call photoshop.Document.getDocumentPath()
    If generic base class is hard to implement how about a common interface to shield us from product specific details when not needed ?
    What we need is a generic interface or abstract class that provides gettters for common properties. This is OOPS 101, am I missing something
    here ?
    Again I am not saying this will work fo rall properties just for a few common properties would be a good start..
    Oliver @ A
    http://www.evolphin.com

  • Record Management: get logical document object from physical doc. object

    Hello,
    I'd like to get logical document from physical document (sdok object - stricture containing class and objid).
    There is BAPI for "opposite direction": SDOK_LOIO_PHYSICAL_OBJECT_GET. By this FM I can get physical document's sdok object from logical document's sdok object.
    Can anybody tell me BAPI's name for it?
    I tried SDOK_PHIO_LOGICAL_OBJECT_GET, but this BAPI doesn't exist.
    Best regards,
    Josef Motl

    Josef,
    There are I don't believe there are any bapi's for this. You probably have to do this via ABAP OO. Create an object of the type CL_SRM_DOCUMENT. This is your logical (LOIO) object of your document. You have to enter the documentclass and the objectid of the document. This class has a method get_variant. This variant is your fysical (PHIO) object of the document. Use version and variant 0 so you will get the latest version object of your document.
    If this isn't the answer, can you please explain where do you get the fysical object from if you haven't got the logical first?
    Regards,
    Tjalling-Jan

  • Create DMS document from direct object transaction instead of CV01N

    Dear Experts,
    I have raised an issue for the same thing in past and got helpful reply also. However it is not working here. I have searched enough but did not get satisfactorily answer.
    My requirement here is to create and store DMS document directly from the object attached to DMS document type instead of CV01N e.g. create PR ME51N, create project CJ20N etc.
    So far I have done the required configuration to get create option in transaction while entering DMS document number. I kept document description field as an optional for respective document type and created and assigned role in Define profile step. Number range is internal. So I think all necessary configuration in place. Now problem here is when I am clicking on create easy document icon, it ask me to select document type and file from local machine also. But nothing is happening afterwards and document is not getting created and stored. Transaction return on screen without any number and so. Please help me out. Did I miss anything?
    Looking forward for your reply. Points will be allocated for answer.
    Best Regards,
    Bhagat

    Hi Bhagat,
    Select the document type in question,navigate to "Define object links".Please verify if the following values have been maintained:
    Screen no-233
    When new version-1
    Create document-1
    Document version-1
    Additional functions-checked
    Post this,re-test the scenario and share the results.Also,do confirm if you are able to create documents of the above document type using CV01n transaction successfully.
    Regards,
    Pradeepkumar Haragoldavar

  • How to create a Document object from a string.

    If I use the following code, the input String cannot contain "\n", otherwise, it generates errors.
    in the following code, inputXMLString is a String object that has xml content.
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    Document document = builder.parse(new InputSource(new StringReader(inputXMLString)));          How can I create a Document object from a string with "\n" in the string?
    Thanks.

    If I use the following code, the input String cannot
    contain "\n", otherwise, it generates errors.That's going to be a huge surprise to thousands of people who process XML containing newline characters every day without errors.
    Perhaps your newline characters are in the middle of element names, or something else that causes your XML to be not well-formed. I'm just guessing here, though, because you didn't say what errors you were getting.

Maybe you are looking for

  • Raising error in process chain

    Hi, I have a change routine that calls a function within an InfoPackage.  The InfoPackage is in turn in a process chain.  The change routine calls a function which can raise an exception.  If an exception is returned the predefined field 'p_subrc' wi

  • Insert internal table fieldname into itab

    Hi, I want to download data into a textfile with the fieldname of an internal table as the header line. What would be the easiest way of doing that ? For eg. PERNR     BEGDA    ENDDA        <-- is the Header 10000000  20070101  99991231     <-- is th

  • System Copy results in Framework Error

    Hi all, I've just done a System Copy for NW2004s system.  I've been able to access the Portal fine from the Administrator account but I'm getting a "Error occurred while trying to access framework page" from any other account.  I'm using a custom Por

  • Installed mac osx10.4 now my computer wont start!!

    installed mac osx 10.4 on my powerbook G4 now my mac wont work when it starts up it gets stuck on the starting mac osx scren the bar across the screan only loads about 1cm accross the scren then frezzes PLEASE HELP powerbook G4   Mac OS X (10.4)  

  • Crossing my fingers..found a solution to MMS issue on the LG G2

    So, I've been pouring over forum posts here and elsewhere discovering that this MMS sending/receiving issue I've been having is not "just me" and seems to be an android/google issue with no future fix until at the earliest Sept.  I was all set to go