Starting xml with java

hi all,
cud any one provide me with the url that contain the examples of how to integrate xml with java.as i am new in this field so i need something from the very basic.and what all stuff do i need on my system to run the code.
thanx in advance
anshul

http://java.sun.com/xml/index.html

Similar Messages

  • Just Starting out with java packages

    Hello,
    I'm a beginner and I'm starting out with java packages.
    I wrote two simple .java files, one test program and one containing a simple class.
    Both files are compiling without errors but When I run the program I get an error NoClassDeffoundError.
    I use the import <package> statement And I think I'm using the CLASSPATH variable correctly.
    SET CLASSPATH=d:\nopol
    path for the .java containing the test class is:
    d:\nopol\utilities \myapp.
    In the test file I use "import utilities.myapp.*.
    I would be very happy if anyone could help me
    Thanks beforehand
    Nopol.

    The test file should be in d:\nopol, if it's not a part of your package utilities.myapp. Everything should be compiled from d:\nopol, the test class with "javac ClassName.java" and the class in the package with "javac utilities/myapp/ClassName.java".
    Your classpath seems fine for now, though. But yes, do add the period there, otherwise you could run into problems later.

  • How i can start working with Java?

    Right now i am having only 8 months of exp in ABAP. can any one help me out to start working with Java specially for Netweaver Purpose

    It is great if you can get yourself familiar with java syntax, as is the case with any new langauage. However, the worst thing you can do is just code java in a top down approach. If you are not familiarizing yourself with OO concepts and best practices, then you are going to miss two important benefits that you will get from using OO programming - Reusability and flexibility in the frameworks that you develop (leveraging design patterns).
    These benefits will also be directly obtainable when you use ABAP objects.
    I am working in the opposite direction at the moment. I have some java experience, and I am starting to learn ABAP. I have used ABAP objects in my first project, and it was actually much better than I thought it would to be.
    Java and OO programming will be an ongoing learning experience. You will not be an expert for quite some time. I do not consider myself to be an expert by any means, and I've be studying OO and java for a few years.
    There is a fantastic book that explains OO concepts clearly, in much easier terms than the Gof "Design Patterns" book:
    Java Design: Objects, UML, and Process by Kirk Knoernschild
    You can read a few chapters at www.kirkk.com. (Use the JOUP link).
    Hope this helps you.
    - Brendan

  • XML with Java

    Hi,
    I am new in XML and I need to design a Java GUI interface for managing changes to xml data(inserting, deleting of nodes). But i have no idea on how the communication is going to be established (How to link java to xml..).
    Any help will be very very appreciated!
    Thank You
    cheers,
    jun

    if you use the latest JDK (1.4), you will have all what you need to manipulate XML in Java.
    then follow this tutorial: http://java.sun.com/webservices/docs/1.0/tutorial/doc/JAXPDOM.html
    it'll get you started!

  • Start working with Java

    Hi everyone,
    According to this page,
    http://www.java2s.com/
    There are heaps of technologies associated with Java.
    As I am just a complete beginner, where do you think I should be starting with?
    I am currently after a simple application with GUI, database
    I think I should learn JSP afterwards, what is your opinion?
    Thanks
    Jack

    Thanks guys for th replies.
    Now I have the simple program working, so let's move on.
    import java.awt.Button;
    import java.awt.Color;
    import java.awt.BorderLayout;
    import java.awt.TextField;
    import java.awt.Frame;
    import java.awt.Font;
    import java.awt.Label;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.awt.event.WindowListener;
    import java.awt.event.WindowEvent;
    import java.awt.event.WindowAdapter;
    import java.awt.event.FocusEvent;
    import java.awt.event.FocusAdapter;
    import java.awt.event.KeyAdapter;
    import java.awt.event.KeyEvent;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    class Quotation
    String QuotationID;
    String QuotationType;
    Quotation()
    String FindByQuotationNo(String Type)
    if (Type == "Test") {
    return "Q08011132";
    return "Error";
    public class TestSwing extends Frame
    Button post = new Button("Find");
    Label mouseLabel = new Label("");
    Quotation quo = new Quotation();
    TestSwing(String title)
    super(title);
    super.setSize(500,400);
    mouseLabel.setFont(new Font("Arial", Font.BOLD, 20));
    mouseLabel.setBackground(Color.PINK);
    super.add(post, BorderLayout.NORTH);
    super.addWindowListener(new MyWindowListener());
    super.add(mouseLabel, BorderLayout.CENTER);
    mouseLabel.addMouseListener(new MyMouseAdapter(mouseLabel));
    public static void main(String[] args)
    TestSwing demo = new TestSwing("Hello World");
    demo.setVisible(true);
    String QuoType = quo.FindByQuotationNo ("Test");
    class MyAction implements ActionListener
    private String name = null;
    MyAction(String name)
    this.name = name;
    public void actionPerformed(ActionEvent e)
    class MyWindowListener extends WindowAdapter
    public void windowClosing(WindowEvent e)
    System.exit(0);
    class MyMouseAdapter extends MouseAdapter
    private Label label = null;
    MyMouseAdapter(Label label)
    this.label = label;
    public void mouseClicked(MouseEvent e)
    int x = e.getX();
    int y = e.getY();
    String key = null;
    if (e.getButton() == e.BUTTON1)
    key = "left key";
    else if (e.getButton() == e.BUTTON3)
    key = "right key";
    label.setText ("X-" + x + "Y-" + y + "," +key);
    With the above snippet, I wonder how can you connect "FindByQuotationType" to the main class
    ///// Error
    C:\JavaTest>javac TestSwing.java
    TestSwing.java:72: non-static variable quo cannot be referenced from a static co
    ntext
    String QuoType = quo.FindByQuotationNo ("Test");
    ^
    1 error

  • Parsing XML with Java - seeking advice for method to pursue

    Hi guys
    So here's the deal: I want to parse some XML from a server, get all the data I need from it, then shunt that data to the classes that need it. However, I'm really not sure what the best way of parsing the XML is.
    I've just written a class for obtaining the file, and one for building a DOM from the XML file. But looking at org.w3c.dom in the Java API documentation (see HERE) I'll have to implement shedloads of interfaces to be able to take advantage of the DOM, and I don't even know a lot about it.
    So am I best just writing a simple parser based on regular expressions to get the data I want? There's about 5 attributes in the XML file that I need to get - 5 for each instance of the containing element. So I don't think it'll be hard to do with regular expressions.. plus even if I did decide to implement all the DOM interfaces, the only way I'd know how to do half the stuff is with regular expressions anyway. I mean, how else would you do it? How else could you match up Nodes according to the Strings you're using for the elements, attributes etc?
    I worry that a parser using regular expressions might be too slow... I'm building this as an applet to visually display information from the server. I have nothing to support those fears, I'm just not experienced enough to know whether speed would be a problem if I chose this route... I don't think it would, but really need confirmation of that suspicion being unfounded.
    Any advice would be very, very welcome, as I'm tearing my hair out at the moment, unsure what to do.

    Komodo wrote:But JDOM is not in the core class libraries, is it? So if I want to create an applet embedded into a website, am I able to get people to download that as well?
    Sorry, I don't know anything about applets.
    Komodo wrote:Everyone's advice is appreciated, but my core question remains unanswered - would using regular expressions, considering how simple and unchanging the XML files are, be a viable option in terms of speed?
    Yes! I've done more than my fair share of XML processing with REs. It's not always easy. I often wish I could just use something XPath-like. But it's certainly easy to do and would probably mean that you'd have something up and running quicker than if you spent time investigating pure XML parsing approaches.

  • Application Start Fails with java.lang.NumberFormatException: null

    Hi All,
    I am new to Weblogic.
    I am facing issue in starting application in weblogic. I have weblogic 11g(10.3.1.0) installed on windows.
    After deploying my application, when I am starting the application by selecting "Servicing All Requests" I get error message
    java.lang.NumberFormatException: null.
    I have created and tested data sources.
    I checked the server log and based on the log I check the code with the given line number. But that line does not expect any numeric value. It is hardcoded.
    I am not able to make out what else could have caused this issue.
    below is the error stact from log.
    Appreciate your help in resolving this.
    Thanks
    <p>
    weblogic.application.ModuleException: [HTTP:101216]Servlet: "BranchController" failed to preload on startup in Web application: "CCWEB".
    java.lang.ExceptionInInitializerError
         at com.app.ccc.logging.BranchLogger.<init>(BranchLogger.java:77)
         at com.app.infra.controller.BranchController.init(BranchController.java:121)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1913)
         at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1887)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:53)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
         at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Caused by: java.lang.NumberFormatException: null
         at java.lang.Integer.parseInt(Integer.java:415)
         at java.lang.Integer.parseInt(Integer.java:497)
         at com.app.ccc.common.BranchConstants.<clinit>(BranchConstants.java:99)
         ... 46 more
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1376)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:53)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
         at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    java.lang.NumberFormatException: null
         at java.lang.Integer.parseInt(Integer.java:415)
         at java.lang.Integer.parseInt(Integer.java:497)
         at com.app.ccc.common.BranchConstants.<clinit>(BranchConstants.java:99)
         at com.app.ccc.logging.BranchLogger.<init>(BranchLogger.java:77)
         at com.app.infra.controller.BranchController.init(BranchController.java:121)
         at javax.servlet.GenericServlet.init(GenericServlet.java:241)
         at weblogic.servlet.internal.StubSecurityHelper$ServletInitAction.run(StubSecurityHelper.java:283)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.servlet.internal.StubSecurityHelper.createServlet(StubSecurityHelper.java:64)
         at weblogic.servlet.internal.StubLifecycleHelper.createOneInstance(StubLifecycleHelper.java:58)
         at weblogic.servlet.internal.StubLifecycleHelper.<init>(StubLifecycleHelper.java:48)
         at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:521)
         at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:1913)
         at weblogic.servlet.internal.WebAppServletContext.loadServletsOnStartup(WebAppServletContext.java:1887)
         at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1805)
         at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3041)
         at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1374)
         at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:452)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
         at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
         at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
         at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
         at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:629)
         at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
         at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:206)
         at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:53)
         at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
         at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
         at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
         at weblogic.deploy.internal.targetserver.operations.StartOperation.doCommit(StartOperation.java:143)
         at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
         at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
         at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
         at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
         at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <P>

    You'd have to show us the actual lines of code that are failing. I think it will be clear from that.

  • Newbie: Traversing XML with Java

    i have an xml file named contactlist.xml. The DTD is as follows:
    <!DOCTYPE contactlist [
    <!ELEMENT contactlist     (contact+)>
    <!ELEMENT contact     (name,tel,email)>
    <!ELEMENT name (#PCDATA)>
    <!ELEMENT tel (#PCDATA)>
    <!ELEMENT email (#PCDATA)>
    ]>
    It is a well formed document. Now what i need to do is to use java to traverse this document when given a name to return the coresponding telephone number and email address. I have created a java file named TraverseContacts.java using DOM. I have been able to get access of the file contactlist.xml (document = builder.parse(new File("contactlist.xml"))) but i am being unable to traverse it! Here is an extract of the code which traverses the document:
    switch(node.getNodeType()){
                   //if its not a Document node, process its children
                   case Node.DOCUMENT_NODE:
                        Document doc= (Document) node;
                        getResult(doc.getDocumentElement());
                        break;
                   //process element node acording to its tag name
                   case Node.ELEMENT_NODE:
                        if(node.getNodeName().equals("contactlist"))
                             processChildNodes(node.getChildNodes());
                        else if(node.getNodeName().equals("contact"))
                             processChildNodes(node.getChildNodes());
                        else if(node.getNodeName().equals("name"))
                             //find the attribute value for name
                             //check whether it matches the query
                             NamedNodeMap nameAttributes=node.getAttributes();
                             Node value = nameAttributes.item(0);
                             if((value.getNodeValue()).equalsIgnoreCase(name)){
                                  if(node.getNodeName().equals("tel"))
                                       Element telElement = (Element) node;
                                       tel_no += telElement.getAttribute("tel");
                                       result += tel_no;
                                  if(node.getNodeName().equals("email"))
                                       Element emailElement = (Element) node;
                                       e_mail += emailElement.getAttribute("email");
                                       result += e_mail;
                             else return;
                        else if(node.getNodeName().equals("tel")){
                             Element telElement = (Element) node;
                             tel_no += telElement.getAttribute("tel");
                             result += tel_no;
                        else if(node.getNodeName().equals("email")){
                             Element emailElement = (Element) node;
                             e_mail += emailElement.getAttribute("email");
                             result += e_mail;
                        break;
    can somebody please tell me where have i gone wrong. i am sure the mistake is somewhere around here in this java code only but am unable to identify it.

    Your DTD indicates that you have (for eaxample) an email element with text in it but no attributes, but you are using emailElement.getAttribute("email"). You need to get the string value of the text node(s) within emailElement, not the attribute value.
    Pete

  • Starting out with Java client for Web Services

    Hi,
    I'm new to Web Services (but not Java in general). Just looking for some pointers to get me started in the right direction.
    My pressing need is to develop a Java client for a set of Web Services described through a WSDL.
    I've found the "Chapter 12: Building Web Services With JAX-RPC" section of the Web Services Tutorial. Could someone just confirm that this is the right tutorial for me to read for my puropse.
    Also I was wondering about available tools for this purpose.
    I was expecting that there would be a tool that could read a WSDL and generate client side stubs for it automatically. (Like how you can take a Remote interface and rmic it in RMI). Is there such a thing? Is it possible?
    Preferably an open source (free) tool. I use the Netbeans IDE so if anyone knows of anything that integrates with that, all the better. I had a look at their site but couldn't see anything.
    Thanks in advance for any tips anyone can provide.

    Hi,
    I'm new to Web Services (but not Java in general).
    Just looking for some pointers to get me started in
    the right direction.
    My pressing need is to develop a Java client for a set
    of Web Services described through a WSDL.
    I've found the "Chapter 12: Building Web Services
    With JAX-RPC" section of the Web Services Tutorial.
    Could someone just confirm that this is the right
    tutorial for me to read for my puropse.Yes, that's right. It manages to say very little in very many pages.
    Also I was wondering about available tools for this
    purpose.
    I was expecting that there would be a tool that could
    read a WSDL and generate client side stubs for it
    automatically. (Like how you can take a Remote
    interface and rmic it in RMI). Is there such a thing?
    Is it possible?This is exactly what the wscompile tool (distributed with the JWS SDK 1.3) does as one of its options. See http://java.sun.com/webservices/docs/1.1/tutorial/doc/JAXRPC6.html for more info.

  • How to bind dynamic xml with Java objects without xsd

    have a question, and hope someone here can help me.
    In my current project, I will get a xml file, containing some information of each user, and map them into a set of user objects.
    For each user, there are some fixed attributes, such as name, phone#, age, position, etc. The problem is, client can customize, and add new attibutes, such as address, favorite color, so there will be no xsd for the xml.
    What I want to do, is map fixed attributes to user object attributes, for example, name attribute to User.name, and they will have corresponding getters, and setters, but for custom attributes, I want to add them to a HashMap in User object, for example, use string "ADDRESS" as the key, and address as the value.
    Is there any way I can do this? Thank you very much for any help you can provide.

    It would not be too hard to do in regular code.
    First, make a HashSet with the Strings for the names of the known attributes that will be processed with setters.
    Then, get the NamedNodeMap via getAttributes(). That will give you all attributes -- both the ones you will handle with your setters and the ones you will handle via a HashMap.
    Then, loop through the NamedNodeMap. For each attribute, get the name and value. If the name is in the HashSet of known values, process it with a list of
    if ( attName.equals( "name" ))
        whatever.setName( value );
       continue;
    }If it is not in the HashSet, then set the value into your HashMap with the name and value.
    There is no standard way to do this.
    Dave Patterson

  • Server start fails with "\Java\jre6\lib\ext\QTJava.zip was unexpected..."

    Killed the iop server in preparation for bootstrap. When I tried to start it back up, I got the error below. Get the same message when starting the Weblogic admin server. Rebooting didn't help. Has anyone seen this before? Thanks!
    C:\GFBT>REM Uncomment to enable debugging
    C:\GFBT>REM SET JAVA_OPTIONS=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=5555,server=y,suspend=n -Dja
    va.compiler=NONE
    C:\GFBT>CALL c:\Oracle\MIDDLE~1\USER_P~1\EPMSYS~1\bin\deploymentScripts\setCustomParamsIOPServer_gfbt.bat
    C:\GFBT>SET INTERLACE_HOME=c:\Sumant\GFBT
    C:\GFBT>SET INTERLACE_INSTANCE_NAME=gfbt
    C:\GFBT>SET DOMAIN_NAME=EPMSystem
    C:\GFBT>SET DOMAIN_HOME=c:\Oracle\MIDDLE~1\user_projects\domains\EPMSystem
    C:\GFBT>SET WL_HOME=c:\Oracle\MIDDLE~1\wlserver_10.3
    C:\GFBT>SET SERVER_NAME=IOPServer_gfbt
    C:\GFBT>SET USER_MEM_ARGS=-Xmx4096m -Xms512m
    C:\GFBT>SET JAVA_OPTIONS=-XX:-FlightRecorder -ea:com.interlacesystems -Doracle.jdbc.useFetchSizeWithLongColumn=fa
    lse -Dinterlace.home=c:/Sumant/GFBT -Dinterlace.instance.name=gfbt -DEPM_ORACLE_HOME=c:/Oracle/MIDDLE~1/EPMSYS~1 -DEPM_O
    RACLE_INSTANCE=c:/Oracle/MIDDLE~1/USER_P~1/EPMSYS~1 -DHYPERION_HOME=c:/Oracle/MIDDLE~1/EPMSYS~1 -Dhyperion.home=c:/Oracl
    e/MIDDLE~1/EPMSYS~1
    C:\GFBT>SET ADMIN_URL=t3://ordinateur:7001
    C:\GFBT>CD /D c:\Oracle\MIDDLE~1\user_projects\domains\EPMSystem
    c:\Oracle\MIDDLE~1\user_projects\domains\EPMSystem>CALL .\bin\startManagedWebLogic.cmd
    *\Java\jre6\lib\ext\QTJava.zip was unexpected at this time.*
    C:\Oracle\Middleware\user_projects\domains\EPMSystem>

    Hmm...
    I saw it was there when I did installation first time...so i had to remove it....not sure what process triggered it to go again in class path... :)
    -Sumant

  • Help needed to converstae xml with java and database

    I want to make use of xml to read soem data from database and then use that material in java to display or manipulate that data and again feed back it into database through xml.

    why using XML? how about JDBC?

  • Deploy using admin_client.jar to Oracle SOA suite started up with java cmd

    Hey,
    Someone at work asked me to create a deployer command to deploy to a locally running OC4J SOA suite. I got it working like this:
    java -jar %ORACLE_HOME%\j2ee\home\admin_client.jar deployer:oc4j:opmn://localhost/home oc4jadmin oc4jadmin -deploy -file <path> -deploymentName <appname> -bindAllWebApps
    However when I implemented this using Maven2 there was a problem. It seems the SOA suite OC4J instance gets started up alternatively to get debugging to work. I started it up using the startupconsole which is automatically used in the Windows XP start menu.
    They start it up like this:
    java -Xrs -server -XX:MaxPermSize=128M -ms512M -mx1024M -XX:AppendRatio=3 -Djava.security.policy=$ORACLE_HOME/j2ee/home/config/java2.policy -Djava.awt.headless=true -Dhttp.webdir.enable=false -Djava.net.preferIPv4Stack=true -Xdebug -Xrunjdwp:transport=dt_socket,address=5000,suspend=n,server=y -jar oc4j.jar
    This causes the URI for deployment to be invalid. I tried lots of other URI forms I found online but none of them work. Maybe you guys know?
    Thanks in advance

    Something noteworthy it seems...
    I added a few extra lines to the command to enable logging (as found here)
    http://theblasfrompas.blogspot.com/2007/12/adminclientjar-giving-standard-could.html
    This results in the following peculiar stacktrace:
    C:\Thomas\appz\OC4JLA~1\j2ee\home>java -Djava.util.logging.config.file=logging.p
    roperties -jar admin_client.jar deployer:oc4j:opnm://localhost:6003/home oc4jadm
    in oc4jadmin -validateURI
    SEVERE: Oc4jDeploymentFactory.getDeploymentManager For input string: "//localhos
    t"java.lang.NumberFormatException: For input string: "//localhost"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.
    java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.parseInt(Integer.java:497)
    at oracle.oc4j.admin.jmx.client.Oc4jDomainFactory.getDomainFromDeployerU
    rl(Oc4jDomainFactory.java:283)
    at oracle.oc4j.admin.deploy.spi.factories.Oc4jDeploymentFactory.getDeplo
    ymentManager(Oc4jDeploymentFactory.java:127)
    at javax.enterprise.deploy.shared.factories.DeploymentFactoryManager.get
    DeploymentManager(DeploymentFactoryManager.java:112)
    at oracle.oc4j.admin.deploy.api.J2EEDeploymentManager.validateURI(J2EEDe
    ploymentManager.java:911)
    at oracle.oc4j.admin.deploy.cmdline.ValidateURICommand.execute(ValidateU
    RICommand.java:61)
    at oracle.oc4j.admin.deploy.cmdline.Oc4jAdminCmdline.executeCommand(Oc4j
    AdminCmdline.java:96)
    at oracle.oc4j.admin.deploy.cmdline.Oc4jAdminCmdline.main(Oc4jAdminCmdli
    ne.java:73)
    Failed at "Could not get DeploymentManager".
    I find this peculiar because I use an URI format as specified in the documentation.

  • Help with Java Web Start

    Hi everybody,
    I have a simple Java application that has a JFrame containing a TextField displaying some text inside it. I am using the NetBeans IDE. I am trying to Enable Java Web start for this application. The steps I have taken upto now are:
    1. Right click on Project, Java Web Start -> Enable Java Web Start. This created the jnlp file.
    2. In the Resources section, I added the jar file for swing. ( I am not sure if I have to add the path for jnlp.jar etc, or are these found automatically?)
    3. Right click on Project, Java Web Start -> Deploy with Java Web Start. This launches the browser with the Click me link, but on clicking this link, I get the following error.
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Wrapper cannot find servlet class jnlp.sample.servlet.JnlpDownloadServlet or a class it depends on
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:534)
    root cause
    java.lang.ClassNotFoundException: jnlp.sample.servlet.JnlpDownloadServlet
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1332)
         org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1181)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
         org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:534)I have all the jnlp files in my jdk directory, and I am not sure why it can't find it. Is there something I am missing?
    Thanks
    George

    I am not sure what it has to do with servlets, I just followed a tutorial on using Netbeans with Java Web Start, and did only the steps as mentioned in my first post. And ended up with the error.
    Anyways, I added the jnlp jar files(jnlp.jar, jnlp-servlet.jar, jardiff.jar) in the WEB-INF/lib directory. And it seems to deploying it now. I can get my application to load on clicking on the "Click me" link. But the controls on my application don't seem to be working.
    Also, when I try to Right click on my project -> Java Web Start -> Run with Java Web Start, I get the following error message,
    javaws-run: C:\Documents and Settings\Lux\Visualization\nbproject\build-jaws-impl.xml:36: Execute failed: java.io.IOException: CreateProcess: C:\j2sdk1.4.2_13\bin\javaws "file:///C:/Documents and Settings/Lux/Visualization/Visualization.jnlp" error=2
    BUILD FAILED (total time: 0 seconds)
    Any help appreciated.
    Thanks.
    George

  • Is there any way to start weblogic server with java 7?

    Hi. Is there any way to start weblogic server with jdk 1.7?

    Hi,
    You can start your Weblogic Server with java 7(JDK 1.7) 
    Go to Domain_home/bin and click on StartWeblogic.cmd it will start your Admin Server
    It depends on which JDK you have used while creating domain if you have selected Jdk 1.7 it will use the same to start the server
    See the Ex:
    ================
    starting weblogic with Java version:
    java version "1.7.0_51"
    Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
    Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
    Starting WLS with line:
    C:\PROGRA~1\Java\JDK17~1.0_5\bin\java -client   -Xms256m -Xmx512m -XX:CompileThr
    eshold=8000 -XX:PermSize=48m  -XX:MaxPermSize=128m -Dweblogic.Name=AdminServer -
    Djava.security.policy=H:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\weblogic.policy
    -Xverify:none -Xverify:none  -da -Dplatform.home=H:\Oracle\MIDDLE~1\WLSERV~1.3 -
    Dwls.home=H:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=H:\Oracle\MIDDLE~
    1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -
    Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=H:\Oracle\MIDDLE
    ~1\patch_wls1036\profiles\default\sysext_manifest_classpath  weblogic.Server
    <Mar 3, 2015 1:08:32 PM PST> <Info> <Security> <BEA-090905> <Disabling CryptoJ J
    CE Provider self-integrity check for better startup performance. To enable this
    check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
    <Mar 3, 2015 1:08:33 PM PST> <Info> <Security> <BEA-090906> <Changing the defaul
    t Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable
    this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
    <Mar 3, 2015 1:08:33 PM PST> <Info> <WebLogicServer> <BEA-000377> <Starting WebL
    ogic Server with Java HotSpot(TM) 64-Bit Server VM Version 24.51-b03 from Oracle
    Corporation>
    =======================================
    If you are using a Lower version of JDK and want to upgrade to JKD 1.7 you can do so by changing setDomainEnv.sh in Weblogic
    Have a look at the below link to do so
    The Weblogic Wasp: change java version / JDK of a weblogic domain
    http://www.baigzeeshan.com/2012/05/how-to-change-jdk-used-by-weblogic.html
    Hope it helps

Maybe you are looking for

  • How do I move  Windows XP from an older Mac to a newer Mac

    I have Windows XP installed on a Bootcamp partition on an older MacBook. I just purchased a new Alum-MacBook and want to move the Windows XP I own to the new computer. How do I do this? Do you deactivate on the older computer before you install on th

  • Can not create more than one model on one table

    My table and tablespace, and semnetwork have been created successfully, with following SQL: CREATE TABLESPACE MYONTOLOGY_TBS DATAFILE 'C:\Oracle\oradata\odb1\myontology_tbs.dat' SIZE 1024M REUSE AUTOEXTEND ON NEXT 256M MAXSIZE UNLIMITED SEGMENT SPACE

  • Dynamic selections in Report category

    I am trying to create a dynamic selection view for a report category, while doing so i am not able to add any table to table dialog that appears, when i enter PA0001 it says PA0001 is not a table. Same problem for any table i try to insert. Can anyon

  • Charset issues

    I have a JSP that pulls an RSS news feed from another site, via javascript. The news is in french and the french characters are not displaying properly on some browsers. I tried setting the charset and encoding as followings... <%@ page pageEncoding=

  • Virus website?

    i go to website to search maroon 5's song, once i click the link and it direct to separate page to download the rar. file, then click and there are other pop up page said my mac seem is affect virus. I have no idea what is this, the pop up page websi