Working with org.w3c.dom.Element

I have next XML code:
  <union name="FirstUnion">
             <switch disctype="QuestionType">
                  <case discvalue="List" type="ChoiceSeq" name="choices"/>
                  <default type="ChoiceSeq" name="choices"/>
             </switch>
   </union>I have org.w3c.dom.Element link which represents switch element .
So how can I get case or default element by name if i dont want to pass collection by my own code?

Parse using XPath: "/union/switch/case"
The 1.5 (maybe 1.4?) JDK has a set of XPath APIs that will work on a parsed DOM.

Similar Messages

  • Invoking BPEL process from Java servlet with org.w3c.dom.Element as payload

    Hello,
    I'm trying to initiate a BPEL process from my servlet running under Tomcat. When I create the NormalizedMessage passing the XML as a String everything works fine. But if I use an org.w3c.domElement the BPEL server doesn't react at all (even on DEBUG log level there are no outputs).
    This works:
    NormalizedMessage message = new NormalizedMessage();
    message.addPart("payload", "<foo></foo>");
    This doesn't work:
    org.w3c.dom.Element elem;
    oracle.xml.parser.v2.XMLDocument xmlDocument;
    NormalizedMessage message = new NormalizedMessage();
    Element elem = xmlDocument.createElement("foo");
    message.addPart("payload", elem);
    Is there a known problem with payloads using Element or did I get something completely wrong? Thanks in advance,
    Hans.

    Hello,
    I'm trying to initiate a BPEL process from my servlet running under Tomcat. When I create the NormalizedMessage passing the XML as a String everything works fine. But if I use an org.w3c.domElement the BPEL server doesn't react at all (even on DEBUG log level there are no outputs).
    This works:
    NormalizedMessage message = new NormalizedMessage();
    message.addPart("payload", "<foo></foo>");
    This doesn't work:
    org.w3c.dom.Element elem;
    oracle.xml.parser.v2.XMLDocument xmlDocument;
    NormalizedMessage message = new NormalizedMessage();
    Element elem = xmlDocument.createElement("foo");
    message.addPart("payload", elem);
    Is there a known problem with payloads using Element or did I get something completely wrong? Thanks in advance,
    Hans.

  • Validate org.w3c.dom.Element against xsd

    I need to validate a org.w3c.dom.Element against an xsd.
    DOMParser dp = new DOMParser();
    URL xmlurl = new URL("file:\\test.xml");
    XSDBuilder builder = new XSDBuilder();
    URL xsdurl = new URL("file:\\test.xsd");
    XMLSchema schemadoc = (XMLSchema)builder.build(xsdurl);
    dp.setXMLSchema(schemadoc);
    dp.setValidationMode(XMLParser.SCHEMA_LAX_VALIDATION);
    dp.setPreserveWhitespace(true);
    dp.setErrorStream (System.out);
    System.out.println("Parsing "+xmlurl);
    dp.parse(xmlurl);
    This works when my input is an xml file. I cannot get it work against an element. If I convert the element as a string or inputsource it gives the error
    "XML-20220: (Fatal Error) Invalid InputSource.
    java.net.MalformedURLException: no protocol:"
    Any idea how it can be done? I am using jdeveloper 10.1.2
    Thanks
    MM

    Thanks for the reply. I get the following error.
    Exception in thread main
    oracle.xml.parser.v2.XMLDOMException: cannot add a node belonging to a different document
    at oracle.xml.parser.v2.XMLNSNode.checkNodePermissions(XMLNSNode.java:854)
    at oracle.xml.parser.v2.XMLNSNode.appendChild(XMLNSNode.java:257)
    at oracle.xml.parser.v2.XMLDocument.appendChild(XMLDocument.java:1010)
    at test.parser.ParseTest.parse1(ParseTest.java:136)
    at test.parser.ParseTest.main(ParseTest.java:63)
    Process exited with exit code 1.
    This is my code
    public void parse1(Element elem) {
    try{
    //Element docElement;
    //Node elemNode=(Node)docElement;
    DOMParser dp1 = new DOMParser();
    XMLDocument xmlDocument=new XMLDocument();
    xmlDocument.appendChild(elem);
    ByteArrayOutputStream docOutputStream = new ByteArrayOutputStream();
    xmlDocument.print(docOutputStream);
    ByteArrayInputStream docInputStream = new ByteArrayInputStream(docOutputStream.toByteArray());
    InputSource inputSource = new InputSource(docInputStream);
    dp1.parse(inputSource);
    catch (IOException e){e.printStackTrace();}
    catch (XMLParseException e){e.printStackTrace();}
    catch (SAXException e){e.printStackTrace();}
    Thanks
    MM

  • Java.lang.ClassCastException: oracle.xml.parser.v2.XMLText cannot be cast to org.w3c.dom.Element

    Hello
    I am getting java.lang.ClassCastException: oracle.xml.parser.v2.XMLText cannot be cast to org.w3c.dom.Element error. This code is in java which is present in java embedding.
    The SOA is parsing the xml in java code using oracle.xml.parser.v2 . This wont be a problem if the SOA uses default w3c DOM parser. How do i force SOA to use w3c DOM parser.
    Is there any thing i can do with class loading?
    Kindly help.
    Regards
    Sharat

    Can you paste your java code here ? I assume, you must have tried type-casting.

  • Java.lang.NoSuchMethodError: org.w3c.dom.Element.getTextContent()Ljava/lang

    Hello all,
    I recently developed a app that utilizes a xml file for a database.
    I generated a war file and sent it to a co worker for deployment.
    He gets the following error when he tries to access a jsp
    javax.servlet.ServletException: org.w3c.dom.Element.getTextContent()Ljava/lang/String;
           org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
           org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
           org.apache.jsp.services_jsp._jspService(services_jsp.java:88)
           org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NoSuchMethodError: org.w3c.dom.Element.getTextContent()Ljava/lang/String;
           GSMPackage.GSMManager.getNodeList(GSMManager.java:184)
           GSMPackage.GSMManager.getExistingServices(GSMManager.java:283)
           org.apache.jsp.services_jsp._jspService(services_jsp.java:77)
           org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
           org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
           org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
           org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
           javax.servlet.http.HttpServlet.service(HttpServlet.java:802)I had him check his java version using java -version he has 1.5.
    This method that errors is a 1.5 source error from what I have read.
    Is there something else I can look at?
    Thanks.

    Thanks.
    I thought that the method in question was the getTextContext() method. ?
    org.w3c.dom.Element.getTextContent()Ljava/lang/String
    This is the method that contains the line in question(line 184 is last line):
        public ArrayList getNodeList()
           ArrayList arraylist = new ArrayList();
            try
                String serviceHostPort = null;
                Document document = this.getDocument();
                if(file.exists())
                    NodeList serviceName = document.getElementsByTagName("ServiceName");
                    NodeList serviceHost = document.getElementsByTagName("ServiceHost");
                    NodeList servicePort = document.getElementsByTagName("ServicePort");
                    if(serviceName.getLength() > 0)
                        for(int i=0;i<serviceName.getLength();i++)
                            Element serviceNameElement = (Element) serviceName.item(i); //CREATE THE SERVICE NAME ELEMENT
                            String serviceNameString = serviceNameElement.getTextContent(); //CREATE THE SERVICE NAME CONTENT THIS IS THE LINE IN QUESTION Thanks!

  • Org.w3c.dom.Element

    I want to use constructor of class : com.waveset.object.WSUser.Delegate
    WSUser.Delegate(org.w3c.dom.Element e)
    i have a user object and want to pass here as argument.
    So can anyone tell me how to convert it into Element class object?
    Thanks

    This example gives what I call the JDeveloper 9.0.2 way:
    http://otn.oracle.com/tech/webservices/htdocs/series/net/content.html
    as that Web service is now no longer available you have to read the tutorial, particularly step 12 to get an idea of what was done then ... I haven't had time to update it to a new Web service (my apologies).
    If you are using JDeveloper 9.0.3, the manual style of 9.0.2 goes away and it should be able to automatically consume the Web service as in this sample (this happens to also show UDDI which is not necessary):
    http://otn.oracle.com/tech/webservices/htdocs/series/javanet/content.html
    If you are using JDev 9.0.3 and still getting the stub you posted here, what that would appear to mean on the surface is that MS has generated a true doc/literal Web service interface and you have to manually construct the SOAP message as in the first example. Normally, MS gives you some help with their test page (just go to the .asmx page which has the test client for your Web service).
    Hope this gets you started.
    Mike.

  • 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

  • Service parameter receives org.w3c.dom.Element

    All,
    How do you assign a org.w3c.dom.Element as input variable to a input of a invoked service? When I use the assign task it fails as I test within the console.
    Jeff

    Rakesh,
    I deployed a webservice that received and returns a org.w3c.dom.Element because it is a document style webservice, it works fine when I test it from a client. Within the wsdl for the webservice I took your previous advice and changed my message type to type="xsd:anyType" which allowed the process to be deployed. However, I now get another error when I run the process from the initiation page of the process and that error is:
    **************** Error ***************************
    com.oracle.bpel.client.BPELFault: faultName: {{http://schemas.oracle.com/bpel/extension}remoteFault}
    messageType: {null}
    parts: {{code=Client, summary=parsing error: oracle.xml.parser.v2.XMLParseException: Expected name instead of /., detail=parsing error: oracle.xml.parser.v2.XMLParseException: Expected name instead of /.
         at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:221)
         at org.collaxa.thirdparty.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:128)
         at org.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1083)
         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.collaxa.thirdparty.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:226)
         at org.collaxa.thirdparty.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:645)
         at org.collaxa.thirdparty.apache.axis.Message.getSOAPEnvelope(Message.java:424)
         at org.collaxa.thirdparty.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
         at org.collaxa.thirdparty.apache.axis.client.AxisClient.invoke(AxisClient.java:173)
         at org.collaxa.thirdparty.apache.axis.client.Call.invokeEngine(Call.java:2725)
         at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:2708)
         at org.collaxa.thirdparty.apache.axis.client.Call.invoke(Call.java:1738)
         at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeAXISMessaging(WSIFOperation_ApacheAxis.java:1902)
         at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.invokeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1464)
         at com.collaxa.cube.ws.wsif.providers.axis.WSIFOperation_ApacheAxis.executeRequestResponseOperation(WSIFOperation_ApacheAxis.java:1029)
         at com.collaxa.cube.ws.WSIFInvocationHandler.invoke(WSIFInvocationHandler.java:455)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:359)
         at com.collaxa.cube.ws.WSInvocationManager.invoke(WSInvocationManager.java:161)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__invoke(BPELInvokeWMP.java:605)
         at com.collaxa.cube.engine.ext.wmp.BPELInvokeWMP.__executeStatements(BPELInvokeWMP.java:317)
         at com.collaxa.cube.engine.ext.wmp.BPELActivityWMP.perform(BPELActivityWMP.java:195)
         at com.collaxa.cube.engine.CubeEngine.performActivity(CubeEngine.java:3501)
         at com.collaxa.cube.engine.CubeEngine.handleWorkItem(CubeEngine.java:1906)
         at com.collaxa.cube.engine.dispatch.message.instance.PerformMessageHandler.handleLocal(PerformMessageHandler.java:75)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.handleLocalMessage(DispatchHelper.java:101)
         at com.collaxa.cube.engine.dispatch.DispatchHelper.sendMemory(DispatchHelper.java:186)
         at com.collaxa.cube.engine.CubeEngine.endRequest(CubeEngine.java:5604)
         at com.collaxa.cube.engine.CubeEngine.createAndInvoke(CubeEngine.java:1301)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.createAndInvoke(CubeEngineBean.java:117)
         at com.collaxa.cube.engine.ejb.impl.CubeEngineBean.syncCreateAndInvoke(CubeEngineBean.java:146)
         at ICubeEngineLocalBean_StatelessSessionBeanWrapper0.syncCreateAndInvoke(ICubeEngineLocalBean_StatelessSessionBeanWrapper0.java:483)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequestAnyType(DeliveryHandler.java:489)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.initialRequest(DeliveryHandler.java:425)
         at com.collaxa.cube.engine.delivery.DeliveryHandler.request(DeliveryHandler.java:132)
         at com.collaxa.cube.ejb.impl.DeliveryBean.request(DeliveryBean.java:82)
         at IDeliveryBean_StatelessSessionBeanWrapper22.request(IDeliveryBean_StatelessSessionBeanWrapper22.java:479)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:101)
         at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:65)
         at _ngDoInitiate._jspService(_ngDoInitiate.java:220)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
         at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
         at _displayProcess._jspService(_displayProcess.java:303)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:810)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:220)
         at com.collaxa.cube.fe.DomainFilter.doFilter(DomainFilter.java:138)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:649)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:322)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    Please help,
    Jeff                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Org.w3c.dom.Element to javax.xml.soap.SOAPElement

    I have a org.w3c.dom.Element that I want to insert into an existing SOAPBody using
    public SOAPElement addChildElement(SOAPElement element). How can I turn the org.w3c.dom.Element
    into a javax.xml.soap.SOAPElement so that I can do that?
    Steve Watson

    Hi Steve,
    Here's a code segment that may be of some value.
    Bruce
         public SOAPElement populateSOAPElement(SOAPEnvelope envelope,
    SOAPElement element, Element sndElement) throws SOAPException{
    int i, j;
    NamedNodeMap map;
    Node node;
    NodeList list;
    SOAPElement subElement;
    //populate attributes
    map = sndElement.getAttributes();
    for (j = 0; j < map.getLength(); j ++)
    node = map.item(j);
    element.addAttribute(envelope.createName(node.getNodeName()),
    sndElement.getAttribute(node.getNodeName()));
    //populate the element value and subElements
    list = sndElement.getChildNodes();
    for (j = 0; j < list.getLength(); j ++)
    short type = list.item(j).getNodeType();
    String typeString = "";
    if (list.item(j).getNodeType() == 3)
    element.addTextNode(list.item(j).getNodeValue());
    if(list.item(j).getNodeType() == 1)
    subElement =
    element.addChildElement(((Element)list.item(j)).getTagName());
    subElement = populateSOAPElement(envelope, subElement,
    (Element)list.item(j));
    return element;
    Steve wrote:
    >
    I have a org.w3c.dom.Element that I want to insert into an existing SOAPBody using
    public SOAPElement addChildElement(SOAPElement element). How can I turn the org.w3c.dom.Element
    into a javax.xml.soap.SOAPElement so that I can do that?
    Steve Watson

  • Org.w3c.dom.Element Serialization

    I see in the serialization list that org.w3c.dom.Document get's serialized to XML, but is there a reason why org.w3c.dom.Element only get's serialized to an object?  I would think that it should also be serialized to an XML Object, is there a way to do this without having to implement custom serialization for the type?

    I found another way to do this using the BlazeDS BeanProxy.  Essentially when marshalling the object to Blaze I convert the Element to a String (could be a Dom if I chose, but String was sufficient) and on the way back I build it back out.
    http://bugs.adobe.com/jira/browse/BLZ-305 is the place I got the  details from.

  • 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

  • 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

  • RPCElement instanceof org.w3c.dom.Element returned false??

    I use AXIS api to write a client-side SOAP application and am encountering a very weird problem that org.apache.axis.message.RPCElement instanceof org.w3c.dom.Element returned false. Here's the snippet:
    Object obj= call.invoke(params);
         if (obj instanceof Collection) {
                             System.out.println("--------------TEST OBJ2:" + obj.getClass().toString());
                             if (((Collection) obj).size() == 1) {
                                  obj = ((Collection) obj).iterator().next();
                                  System.out.println("--------------TEST OBJ3:" + obj.getClass().toString());
    System.out.println("--------------TEST RESPONSE OBJECT TYPE:" + obj.getClass().toString());
                    System.out.println("--------------TEST RESPONSE OBJECT TYPE Name:" + obj.getClass().getName());
                    System.out.println("--------------Element:" + Element.class.getName());
                    System.out.println("--------------TEST obj instanceof Element:" + (obj instanceof Element));Here's the output:
    --------------TEST OBJ2:class java.util.Vector
    --------------TEST OBJ3:class org.apache.axis.message.RPCElement
    --------------TEST RESPONSE OBJECT TYPE:class org.apache.axis.message.RPCElement
    --------------TEST RESPONSE OBJECT TYPE Name:org.apache.axis.message.RPCElement
    --------------Element:org.w3c.dom.Element
    --------------TEST obj instanceof Element:false
    Edited by: wildmild1978 on Feb 11, 2009 1:30 PM

    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

  • Extends collection using generic type of org.w3c.dom.Element

    Hi, all.
    I am trying to extending collection using PriorityBlockingQueue.
    Extended queue is generic type of org.w3c.dom.Element.
    public class MyQueue<Element> extends PriorityBlockingQueue<Element> {***/}
    Compiler misunderstand to type of Element (as like E ?, not org.w3c.dom.Element), then methods in the code "this.peek ()" will be error reported by type difference.
    At fact, I tried it into MyQueue<Node> extends PriorityBlockingQueue<Node>, it not causes any misunderstanding.
    Is there any hack to indicates that the type is org.w3c.dom.Element ? This mean, MyQueue<org.w3c.dom.Element> extends PriorityBlockingQueue<org.w3c.dom.Element>...
    Thanks.

    public class MyQueue extends PriorityBlockingQueue<org.w3c.dom.Element>

Maybe you are looking for

  • ALV not getting refreshed when call screen is executed second time

    I have 2 screens 9001 and 9002. In 9001 , I am displaying the fields of a database table in a Table Control. The user has to select some of those fields and click on a button 'Generate ALV'. After clicking , the control navigates to 9002 where I am d

  • I have use Apple TV with the remote app on my iPad 4 and my iPhone 5 I reinstalled the app on my iPad but the gestures do not work

    I have been able to use my remote app from my iPad4 and my iPhone 5 until recently. I can connect and the tap to select works fine. But the app stopped responding to hand gesutres to navigate the ATV screen. All my software is updated to the latest v

  • User Settings Not Retained

    Second Admin account with different user name. Set up desktop/user settings etc. Log out and log back in. Hard drive and other icons not on desktop. Dock apps revert to default. Safari history and bookmarks disappeared. Other anomalies. ???

  • Error in using Hibernate with EJB

    I have generated my Hibernate related configurtion file,POJO Classes & hbm files using MyEclipse 5.0. And Iam using JBuilder 10.0.176.0 to develop the EJB module. When i try to compile my module it is saying POJO class is bad. "Bean2InsertBean.java":

  • Changing default gateway on sbs08

    Hello, I need to change the default gateway on my small business server 2008 from 192.168.1.207 to 192.168.1.208. The server is used for exchange 2007 and pretty much runs our network. My manager said this is a big job and I need to read up on DNS, M