How to go from a .wsdl to .war file to deploy on Tomcat ? (using jax-rpc?)

I have created a .wsdl file using XMLSpy and I want to deploy the service on tomcat. I have been unsuccessful in using the "wscompile -import" option.
Does anyone know how to cross-compile a .wsdl file into a .war so it can be deployed on tomcat? If there is another way other than a .war file, that is fine too...
Currently, I am using WSDL2Java tool by Apache Axis. I take my .wsdl file use the WSDL2Java tool to get the java files, Then I run the java files through wscompile, wsdeploy etc.... the problem with this approach is that the .wsdl file produced by the wsdeploy does not support the document encoding (everything switched to rpc) and no literal either (I think).
If anyone has figured out a better way of going from .wsdl to java or .war or tomcat.. please let me know.. I'm running out of options...
Thank you !

The link worked correctly for me. You can also refer to a recently published whitepaper at
https://jax-rpc.dev.java.net/whitepaper/1.1/index-part1.html. Scenario 5 in second part (https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario5) of the whitepaper describes how to achieve your scenario.
Post your JAX-RPC related questions to [email protected] for a quicker resolution.
Send an email to [email protected] to subscribe to the alias.
Send an mail to [email protected] for a complete list of help commands.
Thanks for your interest in JAX-RPC.
Regards,
-Arun

Similar Messages

  • How to bind soap header using jax-rpc

    To Whom It May Concern:
    I am using Rad7, Ibm Websphere 6.1, on Windows XP.
    I created an SoapHeader first using a string and bind it using jax-ws.
    It works for jax-ws but unfortunately, my work services uses jax-rpc.
    Does anybody know how to bind the soap header using jax-rpc.
    Any help or hint would be greatly appreciated it.
    Here is my code:
    import org.apache.cxf.headers.Header;
    import org.apache.cxf.headers.Header.Direction;
    import org.apache.cxf.helpers.DOMUtils;
    import org.apache.cxf.binding.soap.SoapHeader;
    import javax.xml.namespace.QName;
    import java.io.StringReader;
    import java.util.List;
    import java.util.ArrayList;
    import javax.xml.ws.BindingProvider;
                   @Test
         public void testService() throws Exception {     
                   try
                        URL wsdlURL = new URL("http://localhost:9087/abc/services/ServiceABCService");
                        ServiceRequestServiceService service = new ServiceRequestServiceServiceLocator();
                        ServiceRequestService port = service.getServiceRequestService(wsdlURL);
                   //How to Add Soap Header using jax-ws
              String xml = "<?xml version=\"1.0\" encoding=\"utf-8\"?><ABCHdrRq "
              + "xmlns=\"http://xmlns.ABCgc.net/ABC/2002/header/\" "
              + ">"
              + "<version>1.0</version><srcInfo><chType>abc</chType><chInst>0124</chInst>" +
                        "<appName>sSAR</appName><hostName>DW70210521</hostName><userId>fxue</userId>" +
                        "</srcInfo><startTimeStamp>2010-06-04T13:44:45.132</startTimeStamp><clientDt>2010-06-04T13:44:53.242</clientDt><serviceInfo><serviceName>ServiceRequestService</serviceName>" +
                        "<serviceFunc>addServiceRequest</serviceFunc></serviceInfo>" +
                   "<prevTransInfo><prevRqUID>BORS2010-06-04T13:41:10.2067f9368d1-8c5c</prevRqUID>" +     
                   "<prevRespTimestamp>2010-06-04T13:41:10.871</prevRespTimestamp>"+
                   "<prevRespEndTimestamp>2010-06-04T13:41:10.902</prevRespEndTimestamp>+</prevTransInfo>"+
                   "</ABCHdrRq>";
              SoapHeader dummyHeader1 = new SoapHeader(new QName("uri:http://xmlns.ABCgc.net/ABC/2002/header/", "ABCHdrRq"),
              DOMUtils.readXml(new StringReader(xml)).getDocumentElement());
              dummyHeader1.setDirection(Direction.DIRECTION_OUT);
              List<Header> headers = new ArrayList<Header>();
                   headers.add(dummyHeader1);
                   ((BindingProvider)port).getRequestContext().put(Header.HEADER_LIST, headers);
                   //How to Add Soap Header to the request using jax-ws
                   catch(Exception e)
                        System.out.println("Exception message:"+e.getMessage());
    Yours,
    Frustrated

    Well, how an attachment is processed depends on your application logic...if your application logic requires to processing attachments and verify it before processing the SOAP message, handlers could be better option.
    If you need to process the attachment while processing the SOAP message, you can do it in the service implementation class.
    In both the cases you need to get access to SOAPMessage object and from there get the attachments with getAttachments method.

  • Extract WAR file while deploying

    hi
    Is there any way or option which we need to give in deployment descripter to
    extract the war file while deploying.
    Any one can suggest me how to proceed in this aspact.
    Thanks and Regards
    Anand Mohan

    Anand,
    Can you give a context for this question? Are you packaging your J2EE modules
    into an ear file and need to extract the war file? What is the use case for
    the scenario you are describing?
    Chuck Nelson
    DRE
    BEA Technical Support

  • Hi,Can a WAR file be deployed as EAR file and vice versa.

    Hi,Can a WAR file be deployed as EAR file and vice versa.If so what are the changes we need to do.

    hi tel me in detail why u want 2 do that
    why u want to cnvert a web arch into enterp arch

  • How to set classpath for classes in war files

    Hi All,
    After deploying the WAR file I could access the JSP files but gives classnotfound exception when the information is expected from the java servlet.DO I need to set the classpath if yes how to do for the war file.
    thanks

    The web.xml,file structure and error is below let me know if more information is required.
    As you said weblogic is looking for the classes in lib directory inspite of having the classes in web-inf/classes directory.
    web-app>
    <servlet>
    <servlet-name>ControllerServlet</servlet-name>
    <servlet-class>com.test.site.pds.Controller</servlet-class>
    </servlet>
    <servlet-mapping>
    <servlet-name>ControllerServlet</servlet-name>
    <url-pattern>/controller</url-pattern>
    </servlet-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    </web-app>
    File Structure:
    C:\test\PDSWebApp\WEB-INF\classes\com\test\site\pds\*.class
    PDSWebApp
         css
         html
         images
         javascript
         jsp
         WEB-INF
         classes
         com/test/site/pds/*.java
         lib
         servlets
    The error:
    javax.servlet.ServletException: [HTTP:101249][ServletContext(id=18129862,name=PdsApp,context-path=/PdsApp)]: Servlet class com.test.site.pds.Controller for servlet ControllerServlet could not be loaded because the requested class was not found in the classpath C:\bea\user_projects\domains\mydomain\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\PdsApp.war;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\classes12.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-beanutils.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-collections-2.1.1.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\commons-lang-2.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\displaytag-1.0.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\jstl.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\WEB-INF\lib\standard.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp\jarfiles\_wl_cls_gen.jar;C:\bea\user_projects\domains\mydomain\.\myserver\.wlnotdelete\extract\myserver_PDSAPP_PdsApp.
    java.lang.ClassNotFoundException: com.test.site.pds.Controller.

  • JDeveloper 10g, ADF, ANT:How to define ant task for EAR & WAR file creation

    I am trying to automate the deployment process of our ADF Faces & BC application. I have reviewed this doc:
    http://download.oracle.com/docs/cd/B31017_01/web.1013/b28951/anttasks.htm
    and followed the procedure for integrating ant onto the server. I can build the project and also successfully deploy the ear file. Howerver, I did not find any instruction on how to generate the EAR file. Can anyone point me to the right place for this task definition?
    Here is my current build.xml file.
    <?xml version="1.0" encoding="windows-1252" ?>
    <!--Ant buildfile generated by Oracle JDeveloper-->
    <!--Generated Jul 16, 2007 12:20:13 PM-->
    <project name="CRDBApps" default="build-all" basedir="." xmlns:oracle="antlib:oracle">
    <property file="build.properties"/>
    <property file="ant-oracle.properties"/>
    <target name="clean-all" depends="">
    <ant antfile="build.xml" dir="CRDBView" target="clean"/>
    <ant antfile="build.xml" dir="CRDBLib" target="clean"/>
    <ant antfile="build.xml" dir="CRDBModel" target="clean"/>
    </target>
    <target name="build-all" depends="clean-all">
    <ant antfile="build.xml" dir="CRDBView" target="compile"/>
    <ant antfile="build.xml" dir="CRDBLib" target="compile"/>
    <ant antfile="build.xml" dir="CRDBModel" target="compile"/>
    </target>
    <target name="deployear" depends="">
    <echo message="-----> Deploying the application module deployment (ear) file"/>
    <oracle:deploy deployerUri="deployer:oc4j:opmn://myserver/home"
    userid="oc4jadmin"
    password="password"
    file="CRDBView/deploy/CRDBApps.ear"
    deploymentName="CRDBApps"
    bindAllWebApps="default-web-site"/>
    </target>
    </project>
    thanks!
    Wes

    Thanks all for the tips. After reading up a bit today on ear/war files and ant. I ended up just creating a task to mimic the ear/war file structure. My script isnt pretty but I'll work on refining that later. Here is what I have if anyone ever is interested:
    <target name="war" depends="">
    <echo message="Executing target war..."/>
    <mkdir dir="war"/>
    <copydir src="CRDBView\public_html" dest="war\"/>
    <copydir src="CRDBView\classes" dest="war\WEB-INF\classes"/>
    <copydir src="CRDBModel\classes" dest="war\WEB-INF\classes"/>
    <copydir src="CRDBLib\classes" dest="war\WEB-INF\classes"/>
    <echo message="Creating war file..."/>
    <jar basedir ="war" destfile="CRDBApps.war"/>
    <echo message="Done executing target war..."/>
    </target>
    <target name="ear" depends="war">
    <echo message="Executing target ear..."/>
    <mkdir dir="ear\META-INF"/>
    <copydir src="CRDBView\deploy\META-INF" dest="ear\META-INF"/>
    <copy file="CRDBApps.war" todir="ear\"/>
    <jar basedir ="ear" destfile="CRDBApps.ear"/>
    <echo message="Done executing target ear..."/>
    </target>
    <target name="cleanAndDeployCRDBApps" depends="build-all,deployear">
    <echo message="Executing target cleanAndDeployCRDBApps..."/>
    <delete dir="war"/>
    <delete dir="ear"/>
    <echo message="Done executing target cleanAndDeployCRDBApps..."/>
    </target>
    <target name="deployear" depends="ear">
    <echo message="Executing target deployear"/>
    <oracle:deploy deployerUri="deployer:oc4j:opmn://myserver:6003/home"
    userid="oc4jadmin"
    password="password"
    file="CRDBApps.ear"
    deploymentName="CRDBApps"
    bindAllWebApps="default-web-site"/>
    <delete file="CRDBApps.ear"/>
    <delete file="CRDBApps.war"/>
    <echo message="Done executing target deployear"/>
    </target>
    ...

  • How to save from a JTable to .CSV file format?

    i am building a client sever model in which the client will send the details to the server...
    the server will take all the details and display it in a jtable..
    now, after sorting it using autorowsorter(..), how can i save the data from table to a .CSV file???
    Thanks in advance..

    Here is one code from my own my application. It should compile straight away, but if there are any compile time bugs, you can easily fix them. Pls do read the comments at the top.
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.table.*;
    * This class is now JDK 1.6 Dependent, with the addition of the use of the Desktop
    * class instead of the default application launch procedure, and the use of the new
    * FileNameExtensionFilter class introduced under javax.swing.filechooser.
    * This class can be used in one line of code by passing the appropriate JTable to the
    * desired constructor.
    public class ExcelExporter extends Object {
        public JTable source;
        public JFileChooser chooser;
        public File csvFile;
        private boolean cancelOp = false, isDefault = true;
        private String topText = "";
        public ExcelExporter(JTable source) {
            this(source, "");
        public ExcelExporter(JTable source, String topText) {
            this(source, topText, true);
        public ExcelExporter(JTable source, String topText, boolean isDefault, File target, JProgressBar bar) {
            super();
            this.source = source;
            this.topText = topText;
            this.isDefault = isDefault;
            new ProgressDialog(source, target, bar);
        public ExcelExporter(JTable source, String topText, boolean isDefault) {
            super();
            this.source = source;
            this.topText = topText;
            this.isDefault = isDefault;
            obtainFileName();
        public void obtainFileName() {
            cancelOp = false;
            FileNameExtensionFilter filter = new FileNameExtensionFilter("Excel Format (CSV)", "csv");
            if(chooser == null) {
                chooser = new JFileChooser();
                chooser.setDialogTitle("Saving Database");
                chooser.setFileFilter(filter);
                chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                chooser.setSelectedFile( new File("database.csv") );
                chooser.setAcceptAllFileFilterUsed(false);                     
            int val = chooser.showSaveDialog((Component)null);
            if(val == JFileChooser.APPROVE_OPTION) {
                csvFile = chooser.getSelectedFile();
                boolean fixed = fixExtension(csvFile, "csv");
                if(!fixed && !cancelOp) {
                    JOptionPane.showMessageDialog(null,"File Name Specified Not Supported",
                    "File Name Error", JOptionPane.ERROR_MESSAGE);
                    obtainFileName();
                    return;
                if(!cancelOp) {
                    //storeTableAsCSV(csvFile, source);
                    new ProgressDialog(source, csvFile).setVisible(true);
        public boolean fixExtension(File file, String prefExt) {
            String fileName = file.getName();
            String dir = file.getParentFile().getAbsolutePath();
            String ext = null;
            try {
                ext = fileName.substring( fileName.lastIndexOf("."), fileName.length() );
                System.out.println("Original File Extension: " + ext);
            } catch(StringIndexOutOfBoundsException e) {
                ext = null;
            if(ext != null && !ext.equalsIgnoreCase("."+prefExt)) {
                return false;
            String csvName = null;
            if(ext == null || ext.length() == 0) {
                csvName = fileName + "." + prefExt;
            } else {
                csvName = fileName.substring(0, fileName.lastIndexOf(".") + 1) + prefExt;
            System.out.println("Corrected File Name: " + csvName);
            File csvCert = new File(dir, csvName);
            if(csvCert.exists()) {
                int val = JOptionPane.showConfirmDialog(null, "Replace Existing File?", "File Exists",
                            JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE);
                if(val == JOptionPane.NO_OPTION) {
                    obtainFileName();
                    cancelOp = true;
                    return false;
                } else if(val == JOptionPane.CANCEL_OPTION) {
                    cancelOp = true;
                    return false;              
            if(!file.renameTo(csvCert)) {
                file = new File(dir, csvName);
                try {
                    file.createNewFile();
                } catch(IOException ioe) {}
            System.out.println("Exporting as: " + file.getAbsolutePath() );
            return true;
        public void storeTableAsCSV(File target, JTable src) {
            String csvData = topText + "\n\n";
            for(int i = 0; i < src.getModel().getRowCount(); i++) {
                for(int x = 0; x < src.getModel().getColumnCount(); x++) {
                    int col = src.convertColumnIndexToView(x);
                    String curVal = (String)src.getModel().getValueAt(i,col);
                    if(curVal == null) {
                        curVal = "";
                    csvData = csvData + removeAnyCommas(curVal) + ",";
                    if(isDefault) {
                        if(x == src.getModel().getColumnCount() - 3) {
                            csvData = csvData + "\n";
                            continue;
                    } else {
                        if(x == src.getModel().getColumnCount() - 1) {
                            csvData = csvData + "\n";                      
            try {
                FileWriter writer = new FileWriter(target);
                    writer.write(csvData);
                    writer.flush();
                    writer.close();
                writer = null;
                csvData = null;
            } catch(IOException ioe) {
                JOptionPane.showMessageDialog(source, "Error Writing File.\nFile may be in use by another application."
                + "\nCheck and try re-exporting", "Export Error", JOptionPane.ERROR_MESSAGE);
        public String removeAnyCommas(String src) {
            if(src == null) {
                return "";
            for(int i = 0; i < src.length(); i++) {
                if(src.charAt(i) == ',') {
                    src = src.substring(0,i) + src.substring(i+1, src.length());
            return src;
        class ProgressDialog extends JDialog {
            JProgressBar progress;
            JLabel progressLabel;
            javax.swing.Timer timer;
            int rowPoint = -1;
            StringBuffer data;
            JTable srcTable;       
            DefaultTableModel srcModel;
            File targetFile;
            public ProgressDialog(JTable src, File target) {
                super( new JDialog(), "Exporting", true);
                createUI();
                setLocationRelativeTo(null);
                srcTable = src;
                srcModel = (DefaultTableModel)src.getModel();
                targetFile = target;
                exportDataProgressively();
            public ProgressDialog(JTable src, File target, JProgressBar progress) {
                super();
                srcTable = src;
                srcModel = (DefaultTableModel)src.getModel();
                targetFile = target;
                setProgressBar(progress);
                exportDataProgressively();
            public void createUI() {
                progress = new JProgressBar(0, 100);
                progress.setIndeterminate(true);
                progress.setValue(0);
                progress.setBorder( BorderFactory.createCompoundBorder(
                                        BorderFactory.createEmptyBorder(10,10,10,10),
                                    UIManager.getBorder("ProgressBar.border") ) );
                progress.setPreferredSize( new Dimension(300, 38) );
                progressLabel = new JLabel("Writing Excel Format. Please Wait...");
                progressLabel.setFont( new Font("Verdana", Font.PLAIN, 11) );
                progressLabel.setBorder( BorderFactory.createEmptyBorder(10,10,10,10) );
                JPanel progressPanel = new JPanel( new BorderLayout() );
                    progressPanel.add(progressLabel, BorderLayout.NORTH );
                    progressPanel.add(progress, BorderLayout.CENTER);
                    progressPanel.setBorder( BorderFactory.createEmptyBorder(10,10,10,10) );
                setContentPane(progressPanel);         
                pack();
            public void exportDataProgressively() {
                //progress.setString("");
                progress.setMaximum(srcModel.getRowCount());
                progress.setIndeterminate(false);
                data = new StringBuffer("Autogenerated Excel Format"
                     + topText + "\n\n");          
                timer = new javax.swing.Timer(15, new ActionListener() {
                    public void actionPerformed(ActionEvent e) {                   
                        if(rowPoint > -1 && srcModel.getValueAt(rowPoint,0) == null) {
                            timer.stop();
                        progress.setValue(rowPoint);
                        appendData();
                timer.setRepeats(false);
                timer.start();
            public void appendData() {
                timer.stop();
                for(int j = 0; j < srcModel.getColumnCount(); j++) {
                    int col = srcTable.convertColumnIndexToView(j);
                    if(rowPoint == -1) {
                        data.append(removeAnyCommas((String)srcModel.getColumnName(col)).toUpperCase());
                    } else if(col != -1){
                        String text = (String)srcModel.getValueAt(rowPoint,col);
                        if(srcModel.getColumnName(col).equalsIgnoreCase("Phone Number(s)") && !isPrintableText(text) ) {
                            text = "\'" + getPrintableText(text);
                        } else if( srcModel.getColumnName(col).equalsIgnoreCase("Phone Number(s)") && isPrintableText(text)  ) {
                            text = "\'" + removeAnyCommas(text);
                        } else {
                            text = removeAnyCommas(text);
                        data.append(text);
                    if(isDefault) {
                        if(j != srcModel.getColumnCount() - 3 ){
                            data.append(",");
                        } else {
                            data.append("\n");
                            break;
                    } else {
                        if(j != srcModel.getColumnCount() - 1 ){
                            data.append(",");
                        } else {
                            data.append("\n");
                rowPoint++;
                if(rowPoint < srcModel.getRowCount()) {
                    timer.start();
                } else {
                    try {
                        if(!targetFile.exists())
                            targetFile.createNewFile();
                        FileWriter writer = new FileWriter(targetFile);
                            writer.write(data.toString());
                            writer.close();
                            progress.setValue(progress.getMaximum());
                            progress.setStringPainted(true);
                            progress.setString("Done");
                            openFile(targetFile);                      
                            setVisible(false);
                            data = null;
                    } catch(IOException ioe) {
                        JOptionPane.showMessageDialog(source, "Error Writing File. Try Resaving",
                        "Save Error", JOptionPane.ERROR_MESSAGE);
                    } catch(Exception exc) {
                        System.out.println(exc);
            public void setProgressBar(JProgressBar bar) {
                progress = bar;
            public boolean isPrintableText(String text) {
                return !text.contains("::");
            public String getPrintableText(String text) {          
                try {
                    text = text.substring(2);
                } catch(StringIndexOutOfBoundsException sie) {
                    System.out.println(sie);
                String generated = "";
                StringTokenizer st = new StringTokenizer(text, ",");
                try {
                    for(int i = 0; st.hasMoreTokens(); i++ ) {
                        if(i > 0) {
                            generated = generated + " / ";
                        String token = st.nextToken();
                        generated = generated + token.substring( token.indexOf("-") + 2 );
                } catch(NoSuchElementException nse) {}
                return generated;
            public void openFile(File file) {
                int val = JOptionPane.showConfirmDialog(null, "Would You Like To View The File Right Now?",
                "View File", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);
                try {
                    if(val == JOptionPane.YES_OPTION) {
                        if(Desktop.isDesktopSupported()) {
                            Desktop.getDesktop().open(file);
                        } else {
                            new ExcelExecutor(file.getAbsolutePath());
                } catch(IOException ioe) {
                    JOptionPane.showMessageDialog(null, "Failed to Open File", "Error",
                     JOptionPane.ERROR_MESSAGE);
    }ICE

  • How to build an EJB as a war file

    Hi All,
    I am new to EJB . I am trying to build the EJB project as a WAR file. I am supposed to use EJB as a war file instead of EAR.Can any one provide a sample script to build EJB project as a war file which loads the xml files using spring.
    Thanks in advance.

    900161 wrote:
    Hi All,
    I am new to EJB . I am trying to build the EJB project as a WAR file. I am supposed to use EJB as a war file instead of EAR.Can any one provide a sample script to build EJB project as a war file which loads the xml files using spring.A sample script. There are so many different types of scripts for so many different tools and so many different platforms. Shall we guess which is the one you need or are you going to provide actual details?
    Of course you're not going to actually get it, nobody here is going to do your work for you.

  • How to control (the input and output) EXE file after I call it using exec?

    Hi,
    I knew that I can use runtime.exec() to call one EXE file, and this works. But this EXE has two characteristics:
    1. After this exe starts, it asks user to input number such as 1 or 2 onto computer screen, then press return. Then the exe will start the calculation.
    2. after it starts calculation, it prints 3 columns of numbers onto the screen.
    My two questions are:
    1. How to use java to input the number such as 1 or 2 automatically? this EXE can not work like this in DOS command line:
    C:> file.exe parameter
    The parameter is the number such as 1 or 2 that I wanna input.
    2. how to redirect the 3 columns of numbers from computer screen to txt file?
    My colleague can solve these two questions using Mathematica. So I know that definitely there is at least one solution for it. I just can not do it using Java. This wierd exe file bothered me a lot and I really wish that I can get help from someone in java community.
    Thank you!
    Tony

    When you call Runtime.exec, you get a Process object. (I presume something similar happens when you use ProcessBuilder.) Process has methods with names getOutput, getInput, and getError. These correspond to the standard input, standard output, and standard error streams of the spawned process.
    You can read and write to the process on the streams corresponding to input and output that the process writes to the console.
    [add]
    In fact, you should be grabbing and reading the output/error streams anyway, because of the points raised by the Traps article. Google "Java Runtime exec traps" and you'll probably get a link to this JavaWorld article, which describes common Runtime.exec problems and how to solve them.
    Edited by: paulcw on Jun 15, 2010 4:09 PM

  • Problem redeploying war files with deployment tool

    I'm going thru the j2ee tutorial(downloaded Dec 03). I can't successfully redeploy war files. After making changes to a java file and then rebuilding using asant, using the deploytool I save changes and then redeploy. I always get the old version unless I completely remove the old web module and create a new one. I've seen this problem over and over in the forum but nobody has addressed it properly. Please help.

    To be more specific, I'm working on the bookstore example in the J2ee tutorial. If I just add a single web module(banner servlet) to the existing standalone war module bookstore1, The tools->update module tools->deploy works fine. If I add the rest of the modules(bookDetailsServlet,bookStoreServlet,etc). After making changes and rebuilding the .java files if I go to tools->update module the window displays nothing under the heading "the following entries have changes".
    Under the heading "the following entries were not found on disk" is a list of all the files under the war module bookstore1.war. I'm don't understand why it is not recognizing the changes. Any help would be appreciated.

  • How to enable SSL in order to access web appln. deployed in CE using https?

    Hi,
    I am new to Netweaver and this forum. Not sure if I am posting my question in right forum category. Please let me know otherwise.
    Question -
    I would like to know how to enable SSL in order to access the deployed web application in Netweaver environment using https instead of http.
    System Info:
    Netweaver 7.1
    Database: SAP DB (KERNEL    7.7.04   BUILD 021-123-186-883)
    OS: Linux (amd64) 2.6.18-194.el5
    Note: I have general idea about how to enable SSL in a non-SAP application server like tomcat using valid certificate (like enabling SSL in tomcat and adding certificate to server & Java keystore). But since I am new to Netweaver, not sure how to enable the same in Netweaver environment.
    Any help would be much appreciated.
    Thanks
    Edited by: Gopi.j on Oct 15, 2010 8:04 PM

    hi
    check the following sap help.
    http://help.sap.com/saphelp_nwce71core/helpdata/en/f1/2de3be0382df45a398d3f9fb86a36a/frameset.htm
    Best regards,
    John

  • War file and deployment

    Hi,
    im new to j2ee and there are some qns i hope you can help me with.
    1. why is there a need to put my jsp and servlets in a .war file?
    2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?
    thanks a lot!

    1. why is there a need to put my jsp and servlets in a .war file?Answer- As technology evolved over ther period of time, it became more and more evident that the smaller and easier the things the better it is. WAR format is a ZIP format created to deploy your web application data. Hence called WAR(Web Application Archive). It usually contains your Images, JSP pages, and servlets and other related helper files needed by your web application. Java being a cross platform technology, it becomes easy and standardized to distribute your application(web) to other vendors/teams/people if one makes use of a WAR file. Once dropped in the root directory of the App server(i mean the proper webapp directory) the application server is smart enuf to load your WAR file and create respective directory structure.
    2. where do i do my placements of ejb and jsp into the respective jar and war files? in my web server?Answer:- When you add the EJB files and distribute it along with your WAR file, its called EAR(Enterprise Archive) which is WAR+ EJB jar files. As for the JSP's they form a part of the WAR and should be bundled up while creating the WAR file.
    Hope this answers the question.

  • How to do from the wsdl by the JWSDP1.1?

    I am a newer for web services.now when give me a wsdl file if i want to call the service how can i do by the tool of jwsdp?? 3xs for all

    no news?or no one can answer?i dont think so.
    3ks,

  • How to restore from back up when some files are corrupt and crash the restore?

    iphone 4 16gb
    IOS 5.0.1
    iTunes 10.5.3
    History:
    installed iOS5 back on release date. install was interrupted, likely due to high volumes. Completed install. Initial problem noted: unable to add events to calendar. Then problem progressed to "Voice Memo" app crashing. I installed "Quick Voice" app as an alternative. Problem progressed further to an unexplained increase in "other" content on iphone. Last week I tried syncing my phone and received error message that I didn't have enough space to complete sync. Noted then that "other" content was around 5.4gb! Removed "voice memos" playlist from selected playlists to sync under music tab and noted that other content dropped to 4.5gb
    Synced the phone and noticed that it appeared to move through the sync process faster than usual. Sync showed "audio" content and "other" content to be the same size at about 4.5gbs.
    After sync was completed I disconnected the phone and looked at the content of my phone. No apps, No music, No photo albums! SMS texts, Notes and Contacts still all intact on phone.
    Tried multiple solutions including restore to fix the problem. Each time, when the phone is plugged in and mounted in iTunes, it shows audio content at 4.5gb and other content at 4.5gbs yet the phone itself has no music, no apps and no photo albums. It does still have pictures in "camera roll", though.
    After trying many suggested solutions, I gave up and went to Apple store to see the Geniuses (Genii ) They did a firmware update and reset my phone. I was advised to restore from back up. However, when I tried to restore from my back up, it would fail to complete. Unable to restore from back up and sync attempts fail.
    The only data I really don't want to lose is my text message history, my notes and my voice files from "Quick Voice" app.
    Restoring from back up is not an option since I believe there are corrupt files in the back up. So what I want to know is can I restore my phone as a new phone, and then re-install my text message history, notes and the sound files from the "Quick Voice" app? Perhaps using a 3rd party app to retrieve those particular files from my back up and copy them to the phone directly? Or can I create a new back up file and copy those files to the new back up file. Hopefully I would then be able to restore from the newly created back up successfully since the likely corrupt files will be in the old back up file?
    All other information; apps, photos, music and contacts can be re-installed from iTunes.

    Sigh....
    And it just keeps getting stranger! I just disconnected the internet and opened iTunes on my Mac. It opens just fine when disconnected from the internet. iTunes crash seems to be caused when it's trying to connect to iTunes store????
    Really need help!
    1) Why is iTunes crashing when connected to internet?
    2) If I am unable to restore from my back up due to corrupted files within the back up, how can I preserve my text messages, notes and "Quick Voice" app files?

  • How to recover from one corrupted redo log file in NOARCHIVE mode?

    Oracle 10.2.1.
    The redo log file was corrupted and Oracle can't work.
    When I use STARTUP mount, I got no error msg.
    SQL> startup mount
    ORACLE instance started.
    Total System Global Area 1652555776 bytes
    Fixed Size 1251680 bytes
    Variable Size 301991584 bytes
    Database Buffers 1342177280 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    But I have some applications which are depended on Oracle can't be started.
    So, I tried STARTUP open. But I got error msg.
    SQL> startup open
    ORACLE instance started.
    Total System Global Area 1652555776 bytes
    Fixed Size 1251680 bytes
    Variable Size 301991584 bytes
    Database Buffers 1342177280 bytes
    Redo Buffers 7135232 bytes
    Database mounted.
    ORA-00368: checksum error in redo log block
    ORA-00353: log corruption near block 497019 change 42069302 time 11/07/2007
    23:43:09
    ORA-00312: online log 4 thread 1:
    'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
    So, how can I restore and recover my database?
    If use RMAN, how to do that?
    Any help will be appreciated.
    Thanks.

    Hi, Yingkuan,
    Thanks for the helps.
    Actually, I have 10 redo log files exists. All of them are here.
    I tried your suggestion:
    alter database clear unarchived logfile group 4;
    The error msg I got is the same as before:
    SQL> alter database clear unarchived logfile group 4;
    alter database clear unarchived logfile group 4
    ERROR at line 1:
    ORA-01624: log 4 needed for crash recovery of instance nmdata (thread 1)
    ORA-00312: online log 4 thread 1:
    'G:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\REDO04.LOG'
    Compared to losing all the data, it is OK for me lose some of them.
    I have more than 1 TB data stored and 99.9% of them are raster images.
    The loading of these data were the headache. If I can save them, I can bear the lost.
    I want to grasp the last straw.
    But I don't know how set the parameter: allowresetlogs_corruption
    I got the error msg:
    SQL> set allowresetlogs_corruption=true;
    SP2-0735: unknown SET option beginning "_allow_res..."
    I have run the command:
    Recover database until cancel
    Alter database open resetlogs
    The error msg I got is the following:
    SQL> recover database until cancel
    ORA-00279: change 41902930 generated at 11/05/2007 22:01:48 needed for thread 1
    ORA-00289: suggestion :
    D:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\NMDATA\ARCHIVELOG\2007_11_09\O1_MF_
    1_1274_%U_.ARC
    ORA-00280: change 41902930 for thread 1 is in sequence #1274
    Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
    cancel
    ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
    ORA-01194: file 1 needs more recovery to be consistent
    ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\NMDATA\SYSTEM01.DBF'
    ORA-01112: media recovery not started
    SQL>
    From the log file, I got the following:
    ALTER DATABASE RECOVER database until cancel
    Fri Nov 09 00:12:48 2007
    Media Recovery Start
    parallel recovery started with 2 processes
    ORA-279 signalled during: ALTER DATABASE RECOVER database until cancel ...
    Fri Nov 09 00:13:20 2007
    ALTER DATABASE RECOVER CANCEL
    Fri Nov 09 00:13:21 2007
    ORA-1547 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Fri Nov 09 00:13:21 2007
    ALTER DATABASE RECOVER CANCEL
    ORA-1112 signalled during: ALTER DATABASE RECOVER CANCEL ...
    Thank you very much. and I am looking forward to your followup input.

Maybe you are looking for