Importing package org.w3c.dom

Hi,
I am quite new to Java programming. Therefore solving my prob. is surely kind of obvious to a lot of you guys...
For my program I need a type named "Element" defined in org.w3c.dom. Though I did not use the type directly anywhere in my code, my Builder (Eclipse) told me that it could not build my prog because: "The compilation unit indirectly references the missing type org.w3c.dom.Element"
I tried to import that package:
1. downloaded the zip (downloded http://www.w3.org/TR/2002/WD-DOM-Level-3-LS-20020725/java-binding.zip)
2. put it in a subfolder of my project
3. set the classpath correctly
4. added import org.w3c.dom.* to my prg (adding "import org.w3c.dom.Element" results in an error)
After that he properly imported the package as the import line of code was not underlined in red anymore. Nevertheless the annoying error message (The comp. unit indirectly...) did not disappear. I still can not build the prog. So I expected not to find the type "Element" defined in that package. But unziping the package showed me that there is in fact a type named "Element" in "./org/w3c/dom".
Maybe it is worth noting that using the "Java Browsing" functionality of my Eclipse on this package results in "Selected package fragment does not contain any Java resource". The package symbol in the tree structure is displayed in gray instead of yellow too (all yellow packages permit browsing).
Does anyone have a clue how to overcome that da... prob?
Must the package be compiled before, as there are no classes within? And if yes, how do I accomplish that?
Regards
Matthias

Even I have faced the same problem, the Reasons can be:
1. Take the latest packages of all the JAR files U need for XML Parsing.
2. Set the class path for all the JAR files.
2nd thing should be the reason for U getting the error.
All The Best.

Similar Messages

  • Help: program error: package org.w3c.dom does not exist

    i 've already downloaded and unpacked the java-xml-pack by following the given instruction. again when i compile the program, the compiler still can't locate the package.. org.w3c.dom where i've already import org.w3c.dom.* at the beginning of the program. so, until now, the symbol like Document, Node still can't be resolved.
    is there any important step that i've missed ??

    Even I have faced the same problem, the Reasons can be:
    1. Take the latest packages of all the JAR files U need for XML Parsing.
    2. Set the class path for all the JAR files.
    2nd thing should be the reason for U getting the error.
    All The Best.

  • Java Importer and org.w3c.dom.Element

    I am getting the following error when attempting to import a class generated in Jdeveloper.
    Exception occurred: java.lang.NoClassDefFoundError: org/w3c/dom/Element
    The package has the following header
    package mypackage3;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    Has anyone else run into this problems ?

    Kevin,
    it looks as if a dependency file (class) is not in the classpath. If you deploy your Java class in JDeveloper then not all dependency files are deployed automatically. You can explixitly select and add them for deployment.
    In your case the org.w3c.dom.Element class is in the classpath of Jdeveloper, but not Forms.
    Frank

  • Org.w3c.dom.html and org.w3c.dom.ls ?

    Please help.
    I use JAXB in VisualAge. When I imported jar files for JAXB from jwsdp-1.1. I have some errors.
    In jwsdp-1.1. I can't found classes from packages org.w3c.dom.html and org.w3c.dom.ls.
    What jar files and where I have to download?

    org.w3c.dom.DOMErrorHandler is a DOM Level 3 class.
    The Xerces2 Java Parser 2.4.0 contains an implementation of the Document Object Model Level 3.
    Get Xerces-J-src.2.4.0.zip from http://xml.apache.org/dist/xerces-j/
    DOMErrorHandler is in the xerces-2_4_0/src/dom3/org/w3c/dom/ drectory.
    Xerces-J-src.2.4.0.zip also has the org.w3c.dom.html and org.w3c.dom.ls packages.

  • Which jar file has org.w3c.dom ?

    Hello,
    Can someone tell me please which jar file has this package
    org.w3c.dom ? or Where can I find ?
    Additionally : Is there a reference where I can easily see ?
    It takes time if you have so much Jar files .
    Many thanks
    Cado

    If you are looking for an XML parser try the xerxes.jar that can be found at the Apache Project web site.

  • Importing org.w3c.dom

    I am trying to use DOM for some XML parsing, but I am getting the error that org cannot be found. I looked in the src and org is there with all of the DOM stuff. Why would I be getting this error. I can import everything else just fine. Is there an additional setting that I need to have set. When I type org.w3c.dom it recognizes those folders, but I get that the package does not exist. I am using JDK 5.0 with net beans 4.0

    I am trying to use DOM for some XML parsing, but I am
    getting the error that org cannot be found. I looked
    in the src and org is there with all of the DOM
    stuff. Why would I be getting this error. I can
    import everything else just fine. Is there an
    additional setting that I need to have set. When I
    type org.w3c.dom it recognizes those folders, but I
    get that the package does not exist. I am using JDK
    5.0 with net beans 4.0What is the exact error message? Do you have any import statements that import org.*?
    World spins
    RD-R
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Finding import org.w3c.dom.ls.DOMOutput in rt.jar

    I'm taking over some code which uses
    import org.apache.xerces.dom.DOMOutputImpl;
    import org.apache.xerces.parsers.DOMParser;
    import org.apache.xml.serialize.DOMSerializerImpl;
    import org.w3c.dom.ls.DOMOutput;
    DOMOutput dOut = new DOMOutputImpl();
    private DOMSerializerImpl writer = new DOMSerializerImpl();That interace doesnt' appear to exist in 1.5.0_02, nor in 1.4.2_03. Does anyone know which version of the JDK/JRE included this?
    Thanks,
    Jeff

    I did a search on Sun site, nothing came back.
    It is on http://xml.apache.org/xerces2-j though.
    You might need to go there and download it. or make sure your
    classpath includes the right jar file.

  • I want to download org.w3c.dom package

    I want org.w3c.dom package plz send me the name of the jar file containing the org.w3c.dom package

    it is available in the rt.jar

  • Method invokeMethod(java.lang.String, org.w3c.dom.Element) not found

    I am calling a Web Service that returns an XML-file. The XML-file should be passed to a method that puts the xml into a table in my database.
    I will upload the 3 files that are being used for this.
    When I rebuild my files I get the following error in CustomerCO.java:
    Error(78,38): method invokeMethod(java.lang.String, org.w3c.dom.Element) not found in interface oracle.apps.fnd.framework.OAApplicationModule
    Line 78 reads as follows:
    String Status = (String)am.invokeMethod("initSaveXml", wsXml);
    Any suggestions?
    PS: I am a newbie to java and framework :-(
    Here are my files:
    CustomerCO.java:
    /*===========================================================================+
    | Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA |
    | All rights reserved. |
    +===========================================================================+
    | HISTORY |
    +===========================================================================*/
    package xxcu.oracle.apps.ar.customer.server.webui;
    import java.io.Serializable;
    import java.lang.Exception;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import org.w3c.dom.Element;
    import xxcu.oracle.apps.ar.customer.ws.LindorffWS;
    * Controller for ...
    public class CustomerCO extends OAControllerImpl implements Serializable
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    * 2009.07.09, Roy Feirud, lagt til for å utføre spørring
    if (pageContext.getParameter("Search") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    //Setter søkekriteriene til LindorffWS
    String Name = pageContext.getParameter("SearchName");
    String Address = pageContext.getParameter("SearchAddress");
    String Zip = pageContext.getParameter("SearchZipCode");
    String City = pageContext.getParameter("SearchCity");
    String Born = pageContext.getParameter("SearchBorn");
    String Phone = pageContext.getParameter("SearchPhoneNo");
    Serializable[] param = { Name, Address, Zip, City, Born, Phone };
    //Bygger søkestrengen
    String SearchString = (String)am.invokeMethod("initBuildString", param );
    //Initialiserer LindorffWS
    LindorffWS WsConnection = new LindorffWS();
    try
    //Kaller Web Sevice fra Lindorff
    Element wsXml = (Element)WsConnection.XmlFulltextOperator(SearchString);
    String Status = (String)am.invokeMethod("initSaveXml", wsXml);
    catch(Exception WsExp)
    // WsConnection = new LindorffWS();
    System.out.println("Kall til LindorffWS feilet!");
    am.invokeMethod("initQueryCustomer");
    CustomerAMImpl.java:
    package xxcu.oracle.apps.ar.customer.server;
    import java.io.Serializable;
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.server.OAExceptionUtils;
    import org.w3c.dom.Element;
    // --- File generated by Oracle Business Components for Java.
    public class CustomerAMImpl extends OAApplicationModuleImpl implements Serializable
    * This is the default constructor (do not remove)
    public CustomerAMImpl()
    * Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    launchTester("xxcu.oracle.apps.ar.customer.server", "CustomerAMLocal");
    * Container's getter for CustomerVO1
    public CustomerVOImpl getCustomerVO1()
    return (CustomerVOImpl)findViewObject("CustomerVO1");
    * 2009.07.09, Roy Feirud, Lagt til for å utføre spørring.
    public void initQueryCustomer()
    CustomerVOImpl vo = getCustomerVO1();
    if (vo!=null)
    vo.initQuery();
    * 2009.08.31, Roy Feirud, Lagt til for å bygge opp input til WebService hos Lindorff.
    public String initBuildString(String Name
    ,String Address
    ,String Zip
    ,String City
    ,String Born
    ,String Phone)
    String ws_string = null;
    CallableStatement cs = null;
    try
    String sql= "BEGIN ISS_WS_LINDORFF_PKG.BUILD_STRING (?,?,?,?,?,?,?); END;";
    OADBTransaction txn = getOADBTransaction();
    cs = txn.createCallableStatement(sql,1);
    cs.setString(1,Name);
    cs.setString(2,Address);
    cs.setString(3,Zip);
    cs.setString(4,City);
    cs.setString(5,Born);
    cs.setString(6,Phone);
    cs.registerOutParameter(7,Types.VARCHAR);
    cs.execute();
    OAExceptionUtils.checkErrors (txn);
    ws_string = cs.getString(7);
    cs.close();
    catch (SQLException sqle)
    String Prosedyre = "ISS_WS_LINDORFF_PKG.BUILD_STRING";
    String Errmsg = sqle.toString();
    MessageToken[] tokens = {new MessageToken("PROSEDYRE", Prosedyre), new MessageToken("ERRMSG", Errmsg)};
    throw new OAException("ISS", "ISS_PLSQL_ERROR",tokens,OAException.ERROR, null);
    return ws_string;
    public String initSaveXml(Element WsXml)
    String Status = "Error";
    CallableStatement cs = null;
    try
    String sql= "BEGIN ISS_XML2TABLE_PKG.ISS_AR_CUSTOMERS_TMP (?,?); END;";
    OADBTransaction txn = getOADBTransaction();
    cs = txn.createCallableStatement(sql,1);
    cs.setObject(1,WsXml);
    cs.registerOutParameter(2,Types.VARCHAR);
    cs.execute();
    OAExceptionUtils.checkErrors (txn);
    Status = cs.getString(2);
    cs.close();
    catch (SQLException sqle)
    String Prosedyre = "ISS_XML2TABLE_PKG.ISS_AR_CUSTOMERS_TMP";
    String Errmsg = sqle.toString();
    MessageToken[] tokens = {new MessageToken("PROSEDYRE", Prosedyre), new MessageToken("ERRMSG", Errmsg)};
    throw new OAException("ISS", "ISS_PLSQL_ERROR",tokens,OAException.ERROR, null);
    return Status;
    LindorffWS.java:
    package xxcu.oracle.apps.ar.customer.ws;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    //import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    //import org.apache.soap.util.xml.QName;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    import oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Fri Jul 10 10:37:21 CEST 2009
    * WSDL URL: http://services.lindorffmatch.com/Search/Search.asmx?WSDL
    public class LindorffWS extends WrappedDocLiteralStub
    public LindorffWS()
    m_httpConnection = new OracleSOAPHTTPConnection();
    public String endpoint = "http://services.lindorffmatch.com/Search/Search.asmx";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public Element XmlFulltextOperator(String xmlString) throws Exception
    URL endpointURL = new URL(endpoint);
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    String wrappingName = "XmlFulltextOperator";
    String targetNamespace = "http://services.lindorffmatch.com/search";
    Vector requestData = new Vector();
    requestData.add(new Object[] {"xmlString", xmlString});
    requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.setSOAPTransport(m_httpConnection);
    msg.send(endpointURL, "http://services.lindorffmatch.com/search/XmlFulltextOperator", requestEnv);
    Envelope responseEnv = msg.receiveEnvelope();
    Body responseBody = responseEnv.getBody();
    Vector responseData = responseBody.getBodyEntries();
    return (Element)fromElement((Element)responseData.elementAt(0), org.w3c.dom.Element.class);
    _______________________________________________________________________________________________________________________________

    Hi,
    Create an Interface to your application Module then from interface call your method,
    refer http://www.oraclearea51.com/oracle-technical-articles/oa-framework/oa-framework-beginners-guide/213-how-to-call-am-methods-from-controller-without-using-invokemethod.html for creating Interface for AM and calling it in controller.
    Regards,
    Reetesh Sharma

  • Jdev: method invokeMethod(java.lang.String, org.w3c.dom.Element) not found

    I am calling a Web Service that returns an XML-file. The XML-file should be passed to a method that puts the xml into a table in my database.
    I will upload the 3 files that are being used for this.
    When I rebuild my files I get the following error in CustomerCO.java:
    Error(78,38): method invokeMethod(java.lang.String, org.w3c.dom.Element) not found in interface oracle.apps.fnd.framework.OAApplicationModule
    Line 78 reads as follows:
    String Status = (String)am.invokeMethod("initSaveXml", wsXml);
    Any suggestions?
    PS: I am a newbie to java and framework
    Here are my files:
    CustomerCO.java:
    /*===========================================================================+
    Copyright (c) 2001, 2005 Oracle Corporation, Redwood Shores, CA, USA
    All rights reserved.
    ===========================================================================
    HISTORY
    +===========================================================================*/
    package xxcu.oracle.apps.ar.customer.server.webui;
    import java.io.Serializable;
    import java.lang.Exception;
    import oracle.apps.fnd.common.VersionInfo;
    import oracle.apps.fnd.framework.OAApplicationModule;
    import oracle.apps.fnd.framework.webui.OAControllerImpl;
    import oracle.apps.fnd.framework.webui.OAPageContext;
    import oracle.apps.fnd.framework.webui.beans.OAWebBean;
    import org.w3c.dom.Element;
    import xxcu.oracle.apps.ar.customer.ws.LindorffWS;
    * Controller for ...
    public class CustomerCO extends OAControllerImpl implements Serializable
    public static final String RCS_ID="$Header$";
    public static final boolean RCS_ID_RECORDED =
    VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
    * Layout and page setup logic for a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    * Procedure to handle form submissions for form elements in
    * a region.
    * @param pageContext the current OA page context
    * @param webBean the web bean corresponding to the region
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    * 2009.07.09, Roy Feirud, lagt til for å utføre spørring
    if (pageContext.getParameter("Search") != null)
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    //Setter søkekriteriene til LindorffWS
    String Name = pageContext.getParameter("SearchName");
    String Address = pageContext.getParameter("SearchAddress");
    String Zip = pageContext.getParameter("SearchZipCode");
    String City = pageContext.getParameter("SearchCity");
    String Born = pageContext.getParameter("SearchBorn");
    String Phone = pageContext.getParameter("SearchPhoneNo");
    Serializable[] param = { Name, Address, Zip, City, Born, Phone };
    //Bygger søkestrengen
    String SearchString = (String)am.invokeMethod("initBuildString", param );
    //Initialiserer LindorffWS
    LindorffWS WsConnection = new LindorffWS();
    try
    //Kaller Web Sevice fra Lindorff
    Element wsXml = (Element)WsConnection.XmlFulltextOperator(SearchString);
    String Status = (String)am.invokeMethod("initSaveXml", wsXml);
    catch(Exception WsExp)
    // WsConnection = new LindorffWS();
    System.out.println("Kall til LindorffWS feilet!");
    am.invokeMethod("initQueryCustomer");
    CustomerAMImpl.java:
    package xxcu.oracle.apps.ar.customer.server;
    import java.io.Serializable;
    import java.sql.CallableStatement;
    import java.sql.SQLException;
    import java.sql.Types;
    import oracle.apps.fnd.common.MessageToken;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OAApplicationModuleImpl;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.server.OAExceptionUtils;
    import org.w3c.dom.Element;
    // --- File generated by Oracle Business Components for Java.
    public class CustomerAMImpl extends OAApplicationModuleImpl implements Serializable
    * This is the default constructor (do not remove)
    public CustomerAMImpl()
    * Sample main for debugging Business Components code using the tester.
    public static void main(String[] args)
    launchTester("xxcu.oracle.apps.ar.customer.server", "CustomerAMLocal");
    * Container's getter for CustomerVO1
    public CustomerVOImpl getCustomerVO1()
    return (CustomerVOImpl)findViewObject("CustomerVO1");
    * 2009.07.09, Roy Feirud, Lagt til for å utføre spørring.
    public void initQueryCustomer()
    CustomerVOImpl vo = getCustomerVO1();
    if (vo!=null)
    vo.initQuery();
    * 2009.08.31, Roy Feirud, Lagt til for å bygge opp input til WebService hos Lindorff.
    public String initBuildString(String Name
    ,String Address
    ,String Zip
    ,String City
    ,String Born
    ,String Phone)
    String ws_string = null;
    CallableStatement cs = null;
    try
    String sql= "BEGIN ISS_WS_LINDORFF_PKG.BUILD_STRING (?,?,?,?,?,?,?); END;";
    OADBTransaction txn = getOADBTransaction();
    cs = txn.createCallableStatement(sql,1);
    cs.setString(1,Name);
    cs.setString(2,Address);
    cs.setString(3,Zip);
    cs.setString(4,City);
    cs.setString(5,Born);
    cs.setString(6,Phone);
    cs.registerOutParameter(7,Types.VARCHAR);
    cs.execute();
    OAExceptionUtils.checkErrors (txn);
    ws_string = cs.getString(7);
    cs.close();
    catch (SQLException sqle)
    String Prosedyre = "ISS_WS_LINDORFF_PKG.BUILD_STRING";
    String Errmsg = sqle.toString();
    MessageToken[] tokens = {new MessageToken("PROSEDYRE", Prosedyre), new MessageToken("ERRMSG", Errmsg)};
    throw new OAException("ISS", "ISS_PLSQL_ERROR",tokens,OAException.ERROR, null);
    return ws_string;
    public String initSaveXml(Element WsXml)
    String Status = "Error";
    CallableStatement cs = null;
    try
    String sql= "BEGIN ISS_XML2TABLE_PKG.ISS_AR_CUSTOMERS_TMP (?,?); END;";
    OADBTransaction txn = getOADBTransaction();
    cs = txn.createCallableStatement(sql,1);
    cs.setObject(1,WsXml);
    cs.registerOutParameter(2,Types.VARCHAR);
    cs.execute();
    OAExceptionUtils.checkErrors (txn);
    Status = cs.getString(2);
    cs.close();
    catch (SQLException sqle)
    String Prosedyre = "ISS_XML2TABLE_PKG.ISS_AR_CUSTOMERS_TMP";
    String Errmsg = sqle.toString();
    MessageToken[] tokens = {new MessageToken("PROSEDYRE", Prosedyre), new MessageToken("ERRMSG", Errmsg)};
    throw new OAException("ISS", "ISS_PLSQL_ERROR",tokens,OAException.ERROR, null);
    return Status;
    LindorffWS.java:
    package xxcu.oracle.apps.ar.customer.ws;
    import oracle.soap.transport.http.OracleSOAPHTTPConnection;
    //import org.apache.soap.encoding.soapenc.BeanSerializer;
    import org.apache.soap.encoding.SOAPMappingRegistry;
    //import org.apache.soap.util.xml.QName;
    import java.util.Vector;
    import org.w3c.dom.Element;
    import java.net.URL;
    import org.apache.soap.Body;
    import org.apache.soap.Envelope;
    import org.apache.soap.messaging.Message;
    import oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub;
    * Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
    * Date Created: Fri Jul 10 10:37:21 CEST 2009
    * WSDL URL: http://services.lindorffmatch.com/Search/Search.asmx?WSDL
    public class LindorffWS extends WrappedDocLiteralStub
    public LindorffWS()
    m_httpConnection = new OracleSOAPHTTPConnection();
    public String endpoint = "http://services.lindorffmatch.com/Search/Search.asmx";
    private OracleSOAPHTTPConnection m_httpConnection = null;
    private SOAPMappingRegistry m_smr = null;
    public Element XmlFulltextOperator(String xmlString) throws Exception
    URL endpointURL = new URL(endpoint);
    Envelope requestEnv = new Envelope();
    Body requestBody = new Body();
    Vector requestBodyEntries = new Vector();
    String wrappingName = "XmlFulltextOperator";
    String targetNamespace = "http://services.lindorffmatch.com/search";
    Vector requestData = new Vector();
    requestData.add(new Object[] {"xmlString", xmlString});
    requestBodyEntries.addElement(toElement(wrappingName, targetNamespace, requestData));
    requestBody.setBodyEntries(requestBodyEntries);
    requestEnv.setBody(requestBody);
    Message msg = new Message();
    msg.setSOAPTransport(m_httpConnection);
    msg.send(endpointURL, "http://services.lindorffmatch.com/search/XmlFulltextOperator", requestEnv);
    Envelope responseEnv = msg.receiveEnvelope();
    Body responseBody = responseEnv.getBody();
    Vector responseData = responseBody.getBodyEntries();
    return (Element)fromElement((Element)responseData.elementAt(0), org.w3c.dom.Element.class);
    _______________________________________________________________________________________________________________________________

    Hi,
    wrong forum. If this is a problem related to the use of OA framework, please use the OA framework forum here on OTN
    Frank

  • No Serializer found to serialize a 'org.w3c.dom.Element' using encoding style ...

    I use oc4j903 and win2k. I write a document style web service following Demo for Stateless Java Document Web Services.
    I Create an EAR file using WebServicesAssembler and deploy it .and my config.xml:
    <web-service>
    <display-name>Stateful Java Document milkdemo Web Service</display-name>
    <description>Stateful Java Document milkdemo Web Service Example</description>
    <!-- Specifies the resulting web service archive will be stored in ./docws.ear -->
    <destination-path>./milkdemo.ear</destination-path>
    <!-- Specifies the temporary directory that web service assembly tool can create temporary files. -->
    <temporary-directory>./temp</temporary-directory>
    <!-- Specifies the web service will be accessed in the servlet context named "/docws". -->
    <context>/milkdemo</context>
    <!-- Specifies the web service will be stateful -->
    <stateful-java-service>
    <interface-name>com.brightdairy.client.sync.SyncServerDoc</interface-name>
    <class-name>com.brightdairy.client.sync.SyncServerDocImpl</class-name>
    <!-- Specifies the web service will be accessed in the uri named "/docService" within the servlet context. -->
    <uri>/milkdemo</uri>
    <!-- Specifies the location of Java class files ./classes -->
    <java-resource>./classes</java-resource>
    <!-- Specifies that it uses document style SOAP messaging -->
    <message-style>doc</message-style>
    </stateful-java-service>
    <!-- generate the wsdl -->
    <wsdl-gen>
         <wsdl-dir>wsdl</wsdl-dir>
    <!-- over-write a pregenerated wsdl , turn it 'false' to use the pregenerated wsdl-->
         <option name="force">true</option>
         <option name="httpServerURL">http://localhost:8888</option>
    </wsdl-gen>
    <!-- generate the proxy -->
    <proxy-gen>
         <proxy-dir>proxy</proxy-dir>
         <option name="include-source">true</option>
    </proxy-gen>
    </web-service>
    my webservice java file:
    * Title: BrightDairy SOAP demo
    * Description:
    * Copyright: Copyright (c) 2002
    * Company: ufoasia
    * @author
    * @version 1.0
    package com.brightdairy.client.sync;
    import java.sql.*;
    import java.util.Vector;
    import java.util.Iterator;
    import org.w3c.dom.Element;
    import org.w3c.dom.Document;
    import org.w3c.dom.NodeList;
    import oracle.xml.parser.v2.XMLDocument;
    import oracle.xml.parser.v2.XMLElement;
    //import com.brightdairy.client.object.Product;
    import com.brightdairy.client.sync.SyncServerDoc;
    public class SyncServerDocImpl implements SyncServerDoc {
    public SyncServerDocImpl() {
    public Element getProductIDList() {
    Connection connServer = null;
    PreparedStatement stmtServerProduct = null;
    ResultSet rsServerProduct = null;
    Document doc = new XMLDocument();
    Element elProduct = doc.createElement("product");
    doc.appendChild(elProduct);
    long m_msec;
    m_msec = System.currentTimeMillis();
    try {
    connServer = makeConnection();
    System.out.println("1");
    stmtServerProduct = connServer.prepareStatement(
    "SELECT ID FROM " + SERVER_TABLE_PRODUCT );
    System.out.println("");
    rsServerProduct = stmtServerProduct.executeQuery();
    System.out.println("2");
    while(rsServerProduct.next()) {
    Element elID = doc.createElement("id");
    elID.appendChild(doc.createTextNode(rsServerProduct.getString("ID")));
    elProduct.appendChild(elID);
    System.out.println("3");;
    System.out.println("4");
    return doc.getDocumentElement();
    } catch(SQLException e) {
    e.printStackTrace();
    System.out.println("SQL exception has occured");
    System.out.println(e.getMessage());
    return doc.getDocumentElement();
    }finally {
    try {
    rsServerProduct.close();
    stmtServerProduct.close();
    connServer.close();
    m_msec = System.currentTimeMillis() - m_msec;
    System.out.println("6");
    System.out.println("getProductIDList:It take time:" m_msec/1000 "s");
    } catch(Exception e1) {}
    Now my firts question: when i generate the proxy WebServicesAssembler will failure (couldn't import jar.....) and i had imported all jar files,But if i commented proxy-gen , no error.
    and my second question: I commented proxy-gen and deployed ite and success. when i invoked it through web page , then error:
    java.lang.IllegalArgumentException: No Serializer found to serialize a 'org.w3c.
    dom.Element' using encoding style 'http://schemas.xmlsoap.org/soap/encoding/'.
    at org.apache.soap.util.xml.XMLJavaMappingRegistry.querySerializer(XMLJa
    vaMappingRegistry.java:157)
    at org.apache.soap.encoding.soapenc.ParameterSerializer.marshall(Paramet
    erSerializer.java:106)
    at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:265)
    at org.apache.soap.Body.marshall(Body.java:148)
    at org.apache.soap.Envelope.marshall(Envelope.java:203)
    at org.apache.soap.Envelope.marshall(Envelope.java:161)
    at oracle.j2ee.ws.InvocationWrapper.invoke(InvocationWrapper.java:309)
    at oracle.j2ee.ws.RpcWebService.doGetRequest(RpcWebService.java:540)
    at oracle.j2ee.ws.BaseWebService.doGet(BaseWebService.java:1106)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletReque
    stDispatcher.java:721)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(Ser
    vletRequestDispatcher.java:306)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpReques
    tHandler.java:767)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:259)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.ja
    va:106)
    at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
    utor.java:803)
    at java.lang.Thread.run(Thread.java:484)
    I took much time and couln't get answer ,please help me!!!!!!!!!!!!

    Yeah!
    I have resolved it .
    It take me one day time!
    my error is 1: Element which I used is no namespace.
    2: no import enough jar files
    just so so .
    sorry! I am poor in English

  • Org.w3c.dom ?

    Hi,
    i tried import org.w3c.dom.*; and it failed. couldnt find the classes.
    ive got jdk 1.3 and the jre is installed and functioning.
    do i have to download this extra package? if so, from where? www.w3c.org didnt seem to have it. i tried this java.sun.com without success.
    im positive my problem is realy easy to fix.. i have a feeling.. please help!
    thanks!!
    party hard.

    Basically.. i wanted to have java to javascript communication.. as specifiied at
    http://java.sun.com/products/plugin/1.3/docs/jsobject.html
    i was thinking i really should use com.w3c.dom.*; freak.. it doesnt look tasty using netscape.javascript.JSObject's cause then what about IE? or are they compataible..
    i was thinking before that the com.w3c.dom is compatible with both.. thats why im after it...
    has anyone tried java -> javascript communication, and have been sucessfuly in a wide browser usability?
    thanks.. up the dukes now. thanks all.....

  • Obtaining org.w3c.dom.html implementation?

    I'm would like to obtain implementations of the org.w3c.dom.html interfaces so that I can create HTML documents/fragments from scratch (as opposed to parsing files). After some pretty lengthy investigation (and much frustration), it looks like I need to (as one possible option) use JAXP to obtain implementation-independent versions of those interfaces. I still can't figure out how to wire everything up.
    Any help would be appreciated.
    Thanks,
    Gary

    I've been able to get an instance of DOMImplementation using the following code:
    private DOMImplementation getDomImplementation() throws ParserConfigurationException {
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = factory.newDocumentBuilder();
        return builder.getDOMImplementation();
        // // get an instance of the DOMImplementation registry
        // DOMImplementationRegistry registry =
        // DOMImplementationRegistry.newInstance();
        // // get a DOM implementation the Level 3 XML module
        // return registry.getDOMImplementation("XML 3.0");
    }I tried casting the returned DOMImplementation to HTMLDOMImplementation but received a cast exception.
    The commented code was actually my first unsuccessful attempt (it would return null). I tried calling
    System.getProperty("org.w3c.dom.DOMImplementationSourceList") just to see what was listed and it also returned null. I'm guessing that maybe I need to configure/install/register/etc. an implementation but I'm not sure where to start with that. I downloaded the J2SE 5.0 source code and discovered the com.sun.org.apache.html.internal.dom package which contains implementations of all the interfaces I need but I'm not sure how to point to them.
    This seems much harder than it should be. Any help would be appreciated.
    Thanks,
    Gary

  • Jboss and org/w3c/dom/ranges/DocumentRange error

    Hi folks,
    Is any JBoss expert able to help me?
    I'm working on MacOSX Panther that comes with JBoss readily installed, so I'm presuming that it should start without any problems. However, when I I run the run.sh script I get an error that it doesn't find the class:
    org/w3c/dom/ranges/DocumentRange
    Yet, I can see this class in my java browser - so I'm almost 100% certain it exists on my machine. What might the problem be? The other strange thing is that my colleague, working on a nearly identical machine can start up jboss without any problems by invoking exactly the same script. This is the first time I've used jboss and I haven't tampered with any of the setup files there. I've searched the documentation thoroughly but can't find any reference to this error. Has anyone else encountered it?
    I wonder if it might not be a classpath problem - but that strikes me as odd - shouldn't it just work straight out of the box if it came readily installed?
    The only possible explanation is that a while back I was working with castor and jdom and installed jdom.jar and castor-0.9.5.2-xml.jar in my Library/java/Extensions folder. Could it be that these jars cause some sort of conflict?
    Just for the record, I'll post below the full printout that I get when I try to start up jboss.
    Many thanks,
    Damian
    [damian:JBoss/3.2/bin] damian% ./run.sh
    09:40:37,623 INFO  [Server] Starting JBoss (MX MicroKernel)...
    09:40:37,662 INFO  [Server] Release ID: JBoss [WonderLand] 3.2.2RC2 (build: CVSTag=JBoss_3_2_2_RC2 date=200309130127)
    09:40:37,666 INFO  [Server] Home Dir: /Library/JBoss/3.2
    09:40:37,668 INFO  [Server] Home URL: file:/Library/JBoss/3.2/
    09:40:37,671 INFO  [Server] Library URL: file:/Library/JBoss/3.2/lib/
    09:40:37,678 INFO  [Server] Patch URL: null
    09:40:37,724 INFO  [Server] Server Name: default
    09:40:37,768 INFO  [Server] Server Home Dir: /Library/JBoss/3.2/server/default
    09:40:37,770 INFO  [Server] Server Home URL: file:/Library/JBoss/3.2/server/default/
    09:40:37,772 INFO  [Server] Server Data Dir: /Library/JBoss/3.2/server/default/data
    09:40:37,774 INFO  [Server] Server Temp Dir: /var/tmp/jbosstmpdata1039
    09:40:37,776 INFO  [Server] Server Config URL: file:/Library/JBoss/3.2/server/default/conf/
    09:40:37,778 INFO  [Server] Server Library URL: file:/Library/JBoss/3.2/server/default/lib/
    09:40:37,780 INFO  [Server] Root Deployemnt Filename: jboss-service.xml
    09:40:37,795 INFO  [Server] Starting General Purpose Architecture (GPA)...
    09:40:40,414 INFO  [ServerInfo] Java version: 1.4.2_03,Apple Computer, Inc.
    09:40:40,417 INFO  [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.4.2-34,"Apple Computer, Inc."
    09:40:40,419 INFO  [ServerInfo] OS-System: Mac OS X 10.3.2,ppc
    09:40:40,663 INFO  [ServiceController] Controller MBean online
    09:40:40,991 INFO  [MainDeployer] Creating
    09:40:41,158 INFO  [MainDeployer] Created
    09:40:41,164 INFO  [MainDeployer] Starting
    09:40:41,166 INFO  [MainDeployer] Started
    09:40:41,509 INFO  [JARDeployer] Creating
    09:40:41,605 INFO  [JARDeployer] Created
    09:40:41,609 INFO  [JARDeployer] Starting
    09:40:41,666 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.JARDeployer@fa385
    09:40:41,670 INFO  [JARDeployer] Started
    09:40:41,737 INFO  [SARDeployer] Creating
    09:40:41,826 INFO  [SARDeployer] Created
    09:40:41,838 INFO  [SARDeployer] Starting
    09:40:41,841 INFO  [MainDeployer] Adding deployer: org.jboss.deployment.SARDeployer@e88e24
    09:40:41,927 INFO  [SARDeployer] Started
    09:40:42,017 INFO  [Server] Core system initialized
    09:40:42,089 INFO  [MainDeployer] Starting deployment of package: file:/Library/JBoss/3.2/server/default/conf/jboss-service.xml
    09:40:42,463 ERROR [Server] Failed to start
    java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
            at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
            at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
            at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:495)
            at org.jboss.deployment.SARDeployer.init(SARDeployer.java:115)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:686)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:629)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy6.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
            at org.jboss.Main.boot(Main.java:150)
            at org.jboss.Main$1.run(Main.java:388)
            at java.lang.Thread.run(Thread.java:552)
    java.lang.NoClassDefFoundError: org/w3c/dom/ranges/DocumentRange
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
            at java.lang.ClassLoader.defineClass0(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
            at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
            at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
            at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
            at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(Unknown Source)
            at org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Unknown Source)
            at org.jboss.deployment.SARDeployer.parseDocument(SARDeployer.java:495)
            at org.jboss.deployment.SARDeployer.init(SARDeployer.java:115)
            at org.jboss.deployment.MainDeployer.init(MainDeployer.java:686)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:629)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
            at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
            at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:550)
            at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
            at $Proxy6.deploy(Unknown Source)
            at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:383)
            at org.jboss.system.server.ServerImpl.start(ServerImpl.java:290)
            at org.jboss.Main.boot(Main.java:150)
            at org.jboss.Main$1.run(Main.java:388)
            at java.lang.Thread.run(Thread.java:552)
    09:40:42,783 INFO  [Server] JBoss SHUTDOWN: Undeploying all packages
    09:40:42,787 INFO  [MainDeployer] Undeploying file:/Library/JBoss/3.2/server/default/conf/jboss-service.xml
    09:40:42,794 INFO  [DeploymentInfo] Cleaned Deployment: file:/var/tmp/jbosstmpdata1039/deploy/tmp33887jboss-service.xml
    09:40:42,796 INFO  [MainDeployer] Undeployed file:/Library/JBoss/3.2/server/default/conf/jboss-service.xml
    09:40:42,800 INFO  [MainDeployer] Undeployed 1 deployed packages
    09:40:42,807 INFO  [Server] Shutting down all services
    Shutting down
    09:40:42,813 INFO  [ServiceController] Stopping 3 services
    09:40:42,817 INFO  [SARDeployer] Stopping
    09:40:42,820 INFO  [MainDeployer] Removing deployer: org.jboss.deployment.SARDeployer@e88e24
    09:40:42,822 INFO  [SARDeployer] Stopped
    09:40:42,840 INFO  [JARDeployer] Stopping
    09:40:42,897 INFO  [JARDeployer] Stopped
    09:40:42,900 INFO  [MainDeployer] Stopping
    09:40:42,902 INFO  [MainDeployer] Stopped
    09:40:42,903 INFO  [ServiceController] Stopped 3 services
    09:40:42,915 INFO  [Server] Shutdown complete
    Shutdown complete
    Halting VM

    To answer my own question...
    It seemed as if xmlParserAPIs.jar was missing from my machine (no idea why). I downloaded xerxes, copied the jar into my Extensions folder, ran the script and, lo-and-behold, jboss now works!

  • Org.w3c.dom.Document not found

    I'm using jdk 1.6 and I'm getting "cannot find symbol" element when I try to compile to following simple code:
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Element;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class TestXml {
        public static void main(String[] args) {
          DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
          DocumentBuilder builder = factory.newDocumentBuilder();
          Document = builder.newDocument();
          Element root = (Element) document.createElement("gene");
    }What do I need to get this to compile? I thought jaxp was built into jdk1.6, so why is it not being found?

    javac TestXml.java
    TestXml.java:14: cannot find symbol
    symbol  : variable Document
    location: class TestXml
          Document = builder.newDocument();
          ^
    TestXml.java:15: cannot find symbol
    symbol  : variable document
    location: class TestXml
          Element root = (Element) document.createElement("gene");
                                   ^
    2 errorsIn eclipse, the problem is shown as "Document cannot be resolved."

Maybe you are looking for