AED CALCULATION -IMPORT PO

hIII
When I am capturing excise invoice of import purchase order
1) AED value is not getting captured.system is displaying BED + Ecess
2) In the Excise item tab system is displaying excise duty but in header tab the duty is showing duty multiplied by 10.
Please advise.
Regards,
Ayushika

Hi SAP IN,
That is correct. Adding to that you will do MIRO first for all the conditions in Step 2,3,4 & 7 that are recoverable and then do MIGO where nonrecoverable components will be loaded on to the inventory. Here the invoice reference is also given.
The steps of Imports PO:
1) PO with all customs conditions (Basic customs, CVD, Ed.cess on cvd, S.edces on CVD, Ed.cess on total duty, S.ed.cess on total duty, and Addl customs duty)
2) You have to verify the invoice MIRO for Customs conditions before doing GR. Here you must enter the quantity and prices for customs conditions one by one, as system doesnt know what qty is reached on shore.
3) Do MIGO, by capturing the excise invoice i.e.Customs invoice
4) Post the excise invoice
5) Do MIRO for the goods
You will observe the CVD, ed.cess on cvd, S.edcesson cvd and Addl customs are claimable, where as basic customs, ed.cess on total duty, s.edcess on total duty are get added with the material cost.
Please make sure all the above conditions are available in the Imports pricing procedure not in taxprocedure and all customization done properly in Logistics general> Taxes> India
Regards
Ayyallas

Similar Messages

  • AED for import purchase of  capital goods.

    Hi guys,
    We are executing the import flow for capital goods.In this case we also have the AED for customs(4%) applicable.In case of AED for customs we can take credit of 100% in the 1st year itself even for capital goods.But the problem is that after GR takes place the GL for carry forward gets updated for the AED even though we are taking complete credit in the 1st year.Hence the creadit is being taken twice for the same amount.
    PLease suggest any solutions for the above problem.
    Thanks in advance,
    Akshay

    Hi
    Please go through the SAP note on the same
    Regards,
    abhay

  • CVD,ECVD,SECVD are wrongly calculating imports MIGO

    Hi,
    I am unable to post MIGO due to BED,AED,ECS values flowing wrongly. please guide to clear the issue.
    Please help ASAP..
    Hari Krishna

    Hi ,
    check that did  you completed MIRO for Customs before GR  ????
    Also check the duty is flowing in PO condition TAB.
    please tell us the process you are following
    Check following links
    [LINK1|http://help.sap.com/saphelp_46c/helpdata/en/fd/45c23d9d6411d189b60000e829fbbd/content.htm]
    [LINK2|Import PO process;

  • AED Calculation

    Dear All,
    I am making IMPORT PO my material is spare when I am doing J1IEX that case AED calculate 100% tax but my requirment is as per rull RG23C AED calculate 50% for current year and rest of 50% calculate next year were to I set thise thing please tell me deatila.
    Thanka and Regards
    Rakesh

    Check Maintain Company Code Settings for the company code in which you are posting the excise invoice. Also check your GL accout determination wrt to ETT setings.
    You can check it in SPRO->Log general->Tax on goods movements->India-> Basic settings->Maintain Company Code Settings.
    & SPRO->Log general->Tax on goods movements->India-> Account determination->Specify G/L Accounts per Excise Transaction
    here check for the ETT you have maintain the on hold account.
    BR

  • Excel formulas not calculating imported SSIS data

    I have an SSIS package that exports data to a password protected worksheet.  The SSIS package works great and all the data is in the right cells.  However, some of the cells that are protected have formulas in them that do calculations the data
    that has been imported.  The cells with formulas don't pick up the new data.  I have tried F9 and that doesn't work.  The only thing that works is to either re-enter the data manually or I can copy and paste the data right back into the same
    cells and then the formula picks up the new data.
    The client has specific formulas that they do not want to be changed.  Adding macros to the workbook is not allowed.
    How can I get the formulas to pick up the imported data?  
    This is very frustrating.  I have spent the better part of 2 months converting data from MS ACCESS to SQL, built massive queries and put together a very nice SSIS package that does exactly what I want it to do, only to get stonewalled by Excel.

    Leo,
    Some of the cells in the worksheet are un-protected to allow users to enter in values, then the cell with the formula - which are protected - updates with the results of the formula.
    For instance cell A1 is protected, cells B1 through F1 are un-protected.  Cell A1 has the formula =Sum(B1:F1)  if the user manually enters in the values 2, 2, 3, 2, 4 into cells B1, C1, D1, E1, & F1 respectively then cell A1 would update to
    2, 2, 7, 9, 13 as the numbers get entered.
    I am exporting data from a SQL table to Excel through SSIS.   So for example if I export the same values (2,2,3,2,4) to cells B1 through F1 and then open the Excel file, the values that were exported are in the correct cells, but the value in cell A1
    is blank.  
    If I then select cells B1:F1 and do a copy and past, then the formula picks up the values, and does the calculation, showing 13.
    dc

  • Calculating Import Duties on an Export Customs Shipment

    Hello Experts -
    On an Export Customs shipment, does GTS calculate the import duty for importing the material(s) into the final country of destination?
    For example, a company in the U.S. ships a material to a customer located in Brazil. GTS can be configured create the export documentation & statistical values off the proforma invoice. Can GTS also calculate any import duties that may be due to import the material into Brazil?

    We have very similar situation dor Aero Defence Industry , while exporting from US to Brazil , we are able to comply with US Export documents but we are not able to fulfill for Brazilian importing and shipments are getting struck resulting in penalties and delays.
    If any knows about the documentation needed from Brazil side, can you please let me know.
    Thanks,

  • CIN - Manual AED in Taxinn

    Hi All,
       My client having trading scenario.They consider sales return invoice as Purchase.So, when import material rejected, we have to include manual BED and manual AED value.I try this scenario by including manual JEXC with subtotal 5 and manual JAXC with subtotal 2.During PO creation, system will replace both manual values in JMOP and JAOP. But, Education cess and Secondary cess calculated from BED only not along with AED.I check for standard 10% and  4%  with 2 and 1%, its working fine in PO creation.Problem in manual AED calculation with cess value.Kinly clarify.
    Thanks and regards
    SAPMM

    Hi,
    Thnks for the reply.. i need manual AED condition type in Local pricing procedure.Is it possible to do this?
    Thnks and Regards
    SAPMM

  • Capital Excise Invoice with Import PO

    Dear All,
    I came acorss with 1 strange thing in case of Excise invoice capture against capital Import purchase order. The excise transaction type is GRPO & sub transaction type is IP.
    If u post the excise invoice with GRPO for capital import PO then systen passes correct FI entry i.e. 50% on cenvat account & 50% on hold account in case of AED But if u select GRPO with IP ( Sub Trasnsaction) then system pass 100% entry in cenvat account for AED
    What would be the reason ?
    Please help me out. Thanks in advance

    HI,
    GeneralySUB Trans type is used to post to seperate G/L acct.This AED for import as per excise law 100% can be availed.For normal PO only 50%.So pleasev check in
    TAXON GM>Acct det>Speify excise acct per ex trans> whether u have specified sub transaction type IP cenvat offset acct.Based on the acct entry happens in J1IEX.U have SAP note 964190
    MURUGAN

  • URGENT Help With Scientific Calculator!

    Hi everybody,
    I designed a calculator, and I need help with the rest of the actions. I know I need to use the different Math methods, but I tried tried that and it didn't work. Also, it needs to work as an applet and application, and in the applet, the buttons don't appear in order, how can I fix that?
    I will really appreciate your help with this program, I can't get it to work and I'm frustrated, I need to finish this for next Tuesday 16th. Please e-mail me at [email protected].
    Below is the code for the calcualtor.
    Thanks a lot!
    -Maria
    // calculator
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class calculator extends JApplet implements
    ActionListener
      private JButton one, two, three, four, five, six, seven,
      eight, nine, zero, dec, eq, plus, minus, mult, div, clear,
      mem, mrc, sin, cos, tan, asin, acos, atan, x2, sqrt, exp, pi, percent;
      private JLabel output, blank;
      private Container container;
      private String operation;
      private double number1, number2, result;
      private boolean clear = false;
      //GUI
      public void init()
        container = getContentPane();
        //Title
        //super("Calculator");
        JPanel container = new JPanel();     
        container.setLayout( new FlowLayout( FlowLayout.CENTER
        output = new JLabel("");     
        output.setBorder(new MatteBorder(2,2,2,2,Color.gray));
        output.setPreferredSize(new Dimension(1,26));     
        getContentPane().setBackground(Color.white);     
        getContentPane().add( "North",output );     
        getContentPane().add( "Center",container );
        //blank
        blank = new JLabel( "                    " );
        container.add( blank );
        //clear
        clear = new JButton( "CE" );
        clear.addActionListener(this);
        container.add( clear );
        //seven
        seven = new JButton( "7" );
        seven.addActionListener(this);
        container.add( seven );
        //eight
        eight = new JButton( "8" );
        eight.addActionListener(this);
        container.add( eight );
        //nine
        nine = new JButton( "9" );
        nine.addActionListener(this);
        container.add( nine );
        //div
        div = new JButton( "/" );
        div.addActionListener(this);
        container.add( div );
        //four
        four = new JButton( "4" );
        four.addActionListener(this);
        container.add( four );
        //five
        five = new JButton( "5" );
        five.addActionListener(this);
        container.add( five );
        //six
        six = new JButton( "6" );
        six.addActionListener(this);
        container.add( six );
        //mult
        mult = new JButton( "*" );
        mult.addActionListener(this);
        container.add( mult );
        //one
        one = new JButton( "1" );
        one.addActionListener(this);
        container.add( one );
        //two
        two = new JButton( "2" );
        two.addActionListener(this);
        container.add( two );
        //three
        three = new JButton( "3" );
        three.addActionListener(this);
        container.add( three );
        //minus
        minus = new JButton( "-" );
        minus.addActionListener(this);
        container.add( minus );
        //zero
        zero = new JButton( "0" );
        zero.addActionListener(this);
        container.add( zero );
        //dec
        dec = new JButton( "." );
        dec.addActionListener(this);
        container.add( dec );
        //plus
        plus = new JButton( "+" );
        plus.addActionListener(this);
        container.add( plus );
        //mem
        mem = new JButton( "MEM" );
        mem.addActionListener(this);
        container.add( mem );   
        //mrc
        mrc = new JButton( "MRC" );
        mrc.addActionListener(this);
        container.add( mrc );
        //sin
        sin = new JButton( "SIN" );
        sin.addActionListener(this);
        container.add( sin );
        //cos
        cos = new JButton( "COS" );
        cos.addActionListener(this);
        container.add( cos );
        //tan
        tan = new JButton( "TAN" );
        tan.addActionListener(this);
        container.add( tan );
        //asin
        asin = new JButton( "ASIN" );
        asin.addActionListener(this);
        container.add( asin );
        //acos
        acos = new JButton( "ACOS" );
        cos.addActionListener(this);
        container.add( cos );
        //atan
        atan = new JButton( "ATAN" );
        atan.addActionListener(this);
        container.add( atan );
        //x2
        x2 = new JButton( "X2" );
        x2.addActionListener(this);
        container.add( x2 );
        //sqrt
        sqrt = new JButton( "SQRT" );
        sqrt.addActionListener(this);
        container.add( sqrt );
        //exp
        exp = new JButton( "EXP" );
        exp.addActionListener(this);
        container.add( exp );
        //pi
        pi = new JButton( "PI" );
        pi.addActionListener(this);
        container.add( pi );
        //percent
        percent = new JButton( "%" );
        percent.addActionListener(this);
        container.add( percent );
        //eq
        eq = new JButton( "=" );
        eq.addActionListener(this);
        container.add( eq );
        //Set size and visible
        setSize( 190, 285 );
        setVisible( true );
    public static void main(String args[]){
        //execute applet as application
         //applet's window
         JFrame applicationWindow = new JFrame("calculator");
    applicationWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         //applet instance
         calculator appletObject = new calculator();
         //init and start methods
         appletObject.init();
         appletObject.start();
      } // end main
      public void actionPerformed(ActionEvent ae)
        JButton but = ( JButton )ae.getSource();     
        //dec action
        if( but.getText() == "." )
          //if dec is pressed, first check to make shure there
    is not already a decimal
          String temp = output.getText();
          if( temp.indexOf( '.' ) == -1 )
            output.setText( output.getText() + but.getText() );
        //clear action
        else if( but.getText() == "CE" )
          output.setText( "" );
          operation = "";
          number1 = 0.0;
          number2 = 0.0;
        //plus action
        else if( but.getText() == "+" )
          operation = "+";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //minus action
        else if( but.getText() == "-" )
          operation = "-";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //mult action
        else if( but.getText() == "*" )
          operation = "*";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //div action
        else if( but.getText() == "/" )
          operation = "/";
          number1 = Double.parseDouble( output.getText() );
          clear = true;
          //output.setText( "" );
        //eq action
        else if( but.getText() == "=" )
          number2 = Double.parseDouble( output.getText() );
          if( operation == "+" )
            result = number1 + number2;
          else if( operation == "-" )
            result = number1 - number2;
          else if( operation == "*" )
            result = number1 * number2;
          else if( operation == "/" )
            result = number1 / number2;       
          //output result
          output.setText( String.valueOf( result ) );
          clear = true;
          operation = "";
        //default action
        else
          if( clear == true )
            output.setText( "" );
            clear = false;
          output.setText( output.getText() + but.getText() );
    }

    Multiple post:
    http://forum.java.sun.com/thread.jsp?forum=31&thread=474370&tstart=0&trange=30

  • Help Please Needed for Java Calculator - ActionListener HELP

    Hi. I am constructing a simple Java calculator and need help with the actionlistener and how it could work with my program. I am not too sure how to begin constructing the actionlistener. I would like to know the best and most simple solution to get this program work the way it should, like a real calculator. If anyone can help me, that would be much appreciated.
    package calculator;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    public class CalculatorGUI extends JFrame implements ActionListener{
    JTextField screen;
    JButton button7;
    JButton button8;
    JButton button9;
    JButton button4;
    JButton button5;
    JButton button6;
    JButton button1;
    JButton button2;
    JButton button3;
    JButton button0;
    JButton add;
    JButton minus;
    JButton multiply;
    JButton divide;
    JButton equals;
    JButton clear;
    private JTextField m_displayField;
    private boolean m_startNumber = true;
    private String m_previousOp = "=";
    private CalculatorLogic m_logic = new CalculatorLogic();
    public CalculatorGUI() {
    CalculatorGUILayout customLayout = new CalculatorGUILayout();
    getContentPane().setFont(new Font("Helvetica", Font.PLAIN, 12));
    getContentPane().setLayout(customLayout);
    screen = new JTextField("textfield_1");
    getContentPane().add(screen);
    button7 = new JButton("7");
    getContentPane().add(button7);
    button7.addActionListener(this);
    button8 = new JButton("8");
    getContentPane().add(button8);
    button8.addActionListener(this);
    button9 = new JButton("9");
    getContentPane().add(button9);
    button9.addActionListener(this);
    button4 = new JButton("4");
    getContentPane().add(button4);
    button4.addActionListener(this);
    button5 = new JButton("5");
    getContentPane().add(button5);
    button5.addActionListener(this);
    button6 = new JButton("6");
    getContentPane().add(button6);
    button6.addActionListener(this);
    button1 = new JButton("1");
    getContentPane().add(button1);
    button1.addActionListener(this);
    button2 = new JButton("2");
    getContentPane().add(button2);
    button2.addActionListener(this);
    button3 = new JButton("3");
    getContentPane().add(button3);
    button3.addActionListener(this);
    button0 = new JButton("0");
    getContentPane().add(button0);
    button0.addActionListener(this);
    add = new JButton("+");
    getContentPane().add(add);
    add.addActionListener(this);
    minus = new JButton("-");
    getContentPane().add(minus);
    minus.addActionListener(this);
    multiply = new JButton("*");
    getContentPane().add(multiply);
    multiply.addActionListener(this);
    divide = new JButton("/");
    getContentPane().add(divide);
    divide.addActionListener(this);
    equals = new JButton("=");
    getContentPane().add(equals);
    equals.addActionListener(this);
    clear = new JButton("Clear");
    getContentPane().add(clear);
    clear.addActionListener(this);
    setSize(getPreferredSize());
    addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
    public void actionPerformed(ActionEvent event) {
    public static void main(String args[]) {
    CalculatorGUI window = new CalculatorGUI();
    window.setTitle("Calculator");
    window.pack();
    window.show();
    class CalculatorGUILayout implements LayoutManager {
    public CalculatorGUILayout() {
    public void addLayoutComponent(String name, Component comp) {
    public void removeLayoutComponent(Component comp) {
    public Dimension preferredLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    Insets insets = parent.getInsets();
    dim.width = 421 + insets.left + insets.right;
    dim.height = 494 + insets.top + insets.bottom;
    return dim;
    public Dimension minimumLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    return dim;
    public void layoutContainer(Container parent) {
    Insets insets = parent.getInsets();
    Component c;
    c = parent.getComponent(0);
    if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+8,408,64);}
    c = parent.getComponent(1);
    if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+80,96,56);}
    c = parent.getComponent(2);
    if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+80,96,56);}
    c = parent.getComponent(3);
    if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+80,96,56);}
    c = parent.getComponent(4);
    if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+144,96,56);}
    c = parent.getComponent(5);
    if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+144,96,56);}
    c = parent.getComponent(6);
    if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+144,96,56);}
    c = parent.getComponent(7);
    if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+208,96,56);}
    c = parent.getComponent(8);
    if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+208,96,56);}
    c = parent.getComponent(9);
    if (c.isVisible()) {c.setBounds(insets.left+232,insets.top+208,96,56);}
    c = parent.getComponent(10);
    if (c.isVisible()) {c.setBounds(insets.left+120,insets.top+272,96,56);}
    c = parent.getComponent(11);
    if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+80,72,56);}
    c = parent.getComponent(12);
    if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+144,72,56);}
    c = parent.getComponent(13);
    if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+208,72,56);}
    c = parent.getComponent(14);
    if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+272,72,56);}
    c = parent.getComponent(15);
    if (c.isVisible()) {c.setBounds(insets.left+344,insets.top+336,72,56);}
    c = parent.getComponent(16);
    if (c.isVisible()) {c.setBounds(insets.left+8,insets.top+408,408,72);}
    }

    Yeah, I have a rough idea of what the calculator
    should do, like most people would. Its just that I
    dont know how to implement this in Java. Thats the
    problem. Can anyone provide me with code snippets
    that I can try?No I would rather see you make an effort from what has been discussed here. This is not a Java problem this is a general programming problem.

  • Error when running mortgage calc program from DOS prompt

    I have a GUI Mortgage Calculator program. It probably isn't the most efficient use of code, but it gets the job done. I am running java SDK 1.6.0_06. This is a class assignment. We are to compile the code and post the .class file for our team members to run. I am trying to get the .class file to run after I compile it with javac. I used jCreator LE to create it... it compiles and runs there just fine. The program will compile at the DOS prompt, but will not run properly. The following is the error I get (any help would be appreciated):
    Exception in thread "mani" java.lang.NoClassDefFoundError: manchorMortgage3
    Caused by: java.lang.ClassNotFoundException: manchorMortgage3
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader1.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Below is my code:
    * manchorMortgage3.java
    * Created on July 10, 2008
    * This program calculates and displays the mortgage amount
    * from user input of the amount of the mortgage and the user's
    * selection from a menu of available mortgage loans.
    import java.math.*; //*loan calculator
    import java.text.*; //*formats numbers
    import java.util.*;
    import java.io.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class manchorMortgage3 extends javax.swing.JFrame {
        /** Creates new form manchorMortgage3 */
             public manchorMortgage3() {
             initComponents();
             setLocation(300,200);
        /** This method is called from within the constructor to
         * initialize the form.
        // Begin Initialize Components
        private void initComponents() {
            mortgageAmount = new javax.swing.JLabel();
            jTextField1 = new javax.swing.JTextField();
            termAndInterest = new javax.swing.JLabel();
            jRadioButton1 = new javax.swing.JRadioButton();
            jRadioButton2 = new javax.swing.JRadioButton();
            jRadioButton3 = new javax.swing.JRadioButton();
            calcButton = new javax.swing.JButton();
            enterAmount = new javax.swing.JLabel();
            jScrollPane1 = new javax.swing.JScrollPane();
            jTextArea1 = new javax.swing.JTextArea();
            jButton2 = new javax.swing.JButton();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            setTitle("Manchor - Mortgage Calculator - Week 3");
            mortgageAmount.setText("Enter the Mortgage Amount:");
            termAndInterest.setText("Select Your Term and Interest Rate:");
            jRadioButton1.setText("7 years at 5.35%");
            jRadioButton1.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton1.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton1.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton1ActionPerformed(evt);
            jRadioButton2.setText("15 years at 5.5%");
            jRadioButton2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton2.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton2ActionPerformed(evt);
            jRadioButton3.setText("30 years at 5.75%");
            jRadioButton3.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));
            jRadioButton3.setMargin(new java.awt.Insets(0, 0, 0, 0));
            jRadioButton3.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jRadioButton3ActionPerformed(evt);
            calcButton.setText("Calculate");
            calcButton.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    calcButtonActionPerformed(evt);
            jTextArea1.setColumns(20);
            jTextArea1.setEditable(false);
            jTextArea1.setRows(5);
            jScrollPane1.setViewportView(jTextArea1);
            jButton2.setText("Quit");
            jButton2.addActionListener(new java.awt.event.ActionListener() {
                public void actionPerformed(java.awt.event.ActionEvent evt) {
                    jButton2ActionPerformed(evt);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(26, 26, 26)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 324, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addContainerGap())
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                                .addComponent(enterAmount)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 222, Short.MAX_VALUE)
                                .addComponent(calcButton)
                                .addGap(75, 75, 75))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jRadioButton3)
                                    .addComponent(jRadioButton2)
                                    .addComponent(jRadioButton1)
                                    .addComponent(termAndInterest)
                                    .addComponent(mortgageAmount)
                                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addContainerGap(224, Short.MAX_VALUE)))))
                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                    .addContainerGap(277, Short.MAX_VALUE)
                    .addComponent(jButton2)
                    .addGap(70, 70, 70))
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGap(31, 31, 31)
                    .addComponent(mortgageAmount)
                    .addGap(14, 14, 14)
                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(20, 20, 20)
                    .addComponent(termAndInterest)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jRadioButton1)
                    .addGap(15, 15, 15)
                    .addComponent(jRadioButton2)
                    .addGap(19, 19, 19)
                    .addComponent(jRadioButton3)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(calcButton)
                        .addComponent(enterAmount))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 112, Short.MAX_VALUE)
                    .addGap(18, 18, 18)
                    .addComponent(jButton2)
                    .addGap(20, 20, 20))
            pack();
        }// End initialize components
        private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//event_jButton2ActionPerformed
            System.exit(1);
        }//event_jButton2ActionPerformed
        static NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.US);
        static NumberFormat np = NumberFormat.getPercentInstance();
        static NumberFormat ni = NumberFormat.getIntegerInstance();
        static BufferedReader br;
        private void calcButtonActionPerformed(java.awt.event.ActionEvent evt) {//event_calcButtonActionPerformed
            enterAmount.setText(null);
            jTextArea1.setText(null);
            double monthlyPayment;
            double interest;
            double amount ;       
            int years ;
            double monthlyInterest, monthlyPrinciple, principleBalance;
            int paymentsRemaining, lineCount;
            np.setMinimumFractionDigits(2);
        br = new BufferedReader(new InputStreamReader(System.in));
      lineCount = 0;
            try
                    amount=Double.parseDouble(jTextField1.getText());
            catch (Exception e)
                enterAmount.setText("Please Enter Mortgage Amount");
                return;
            if(jRadioButton1.isSelected())
                interest=0.0535;
                years=7;
            else if(jRadioButton2.isSelected())
                interest=0.055;
                years=15;
            else if(jRadioButton3.isSelected())
                interest=0.0575;
                years=30;
            else
                enterAmount.setText("Please Select Your Term and Interest Rate");
                return;
        jTextArea1.append(" For a mortgage of " + nf.format(amount)+"\n"+" With a Term of " + ni.format(years) + " years"+"\n"+" And an Interest rate of " + np.format(interest)+"\n"+" The Payment Amount is " + nf.format(getMortgagePmt(amount, years, interest)) + " per month."+"\n"+"\n");
        principleBalance = amount - ((getMortgagePmt(amount, years, interest)) - (amount*(interest/12)));
        paymentsRemaining = 0;
        do
            monthlyInterest = principleBalance * (interest/12);//*Current monthly interest
             monthlyPrinciple = (getMortgagePmt(amount, years, interest)) - monthlyInterest;//*Principal payment each month minus interest
            paymentsRemaining = paymentsRemaining + 1;
            principleBalance = principleBalance - monthlyPrinciple;//*New balance of loan
            jTextArea1.append(" Principal on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(monthlyPrinciple)+"\n");
                    jTextArea1.append(" Interest on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(monthlyInterest)+"\n");
                    jTextArea1.append(" New loan balance on payment  " + ni.format(paymentsRemaining) + " is " + nf.format(principleBalance)+"\n"+"\n"+"\n");
         while (principleBalance > 1);
        }//Begin event_jRadioBtton1Action Performed
        public static double getMortgagePmt(double balance, double term, double rate)
                double monthlyRate = rate / 12;
                double monthlyPayment = (balance * monthlyRate)/(1-Math.pow(1+monthlyRate, - term * 12));
                return monthlyPayment;
        private void jRadioButton3ActionPerformed(java.awt.event.ActionEvent evt) {//Begin event_jRadioButton3ActionPerformed
             if(jRadioButton2.isSelected())
                jRadioButton2.setSelected(false);
             if(jRadioButton1.isSelected())
                jRadioButton1.setSelected(false);
        }//End event_jRadioButton3ActionPerformed
        private void jRadioButton2ActionPerformed(java.awt.event.ActionEvent evt) {//Begin event_jRadioButton2ActionPerformed
             if(jRadioButton1.isSelected())
                jRadioButton1.setSelected(false);
             if(jRadioButton3.isSelected())
                jRadioButton3.setSelected(false);
        }//End event_jRadioButton2ActionPerformed
        private void jRadioButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButton1ActionPerformed
            if(jRadioButton2.isSelected())
                jRadioButton2.setSelected(false);
            if(jRadioButton3.isSelected())
                jRadioButton3.setSelected(false);
        }//End event_jRadioButton1ActionPerformed
         * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new manchorMortgage3().setVisible(true);
        // Begin variables declaration
        private javax.swing.JButton calcButton;
        private javax.swing.JButton jButton2;
        private javax.swing.JLabel mortgageAmount;
        private javax.swing.JLabel termAndInterest;
        private javax.swing.JLabel enterAmount;
        private javax.swing.JRadioButton jRadioButton1;
        private javax.swing.JRadioButton jRadioButton2;
        private javax.swing.JRadioButton jRadioButton3;
        private javax.swing.JScrollPane jScrollPane1;
        private javax.swing.JTextArea jTextArea1;
        private javax.swing.JTextField jTextField1;
        // End  variables declaration
    }

    The class is not in your classpath. Likely you blew away your classpath with some silly environment variable.
    If you are in the directory where your class file is then execute
    java -cp . manchorMortgage3and it will work. (Note the -cp . which tells java to include the current directory in the runtime classpath)

  • How to Store something in a text file.

    Store the record of the session in a text file.
    please can any one tell me how can i create this thing.
    i cerate the button but does not work correctly and i can not save any calculation/
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.Math.*;
    import java.math.BigInteger;
    public class Calculator2 extends JFrame implements ActionListener{
    JLabel lN1, lN2,lN3;//here are the Label.
    JTextField tN1, tN2;// here the place for the text field.
    JButton btnAdd,btnSub,btnMul,btnDiv,btnClear,btnSave; JTextArea outArea;//all our Button which are in the program.
    Calculator2(){//constructor.
    Box box=Box.createVerticalBox();//creation of the box.
    // input
    lN1=new JLabel("Write first number"); box.add(lN1);//creation of the input,the number which we want use.
    tN1=new JTextField(100); tN1.setEditable(true); box.add(tN1);//allows or prevents the user editing the text
    lN2=new JLabel("write second number"); box.add(lN2);
    tN2=new JTextField(100); tN2.setEditable(true); box.add(tN2);
    // buttons
    btnAdd=new JButton("+"); btnAdd.addActionListener(this); box.add(btnAdd);// button of addition operation
    // setPreferredSize();
    btnSub=new JButton("-"); btnSub.addActionListener(this); box.add(btnSub);// button of subtraction operation
    btnMul=new JButton("*"); btnMul.addActionListener(this); box.add(btnMul);// button of multiplication operation
    btnDiv=new JButton("/"); btnDiv.addActionListener(this); box.add(btnDiv);// button of division operation
    btnClear=new JButton("Clear"); btnClear.addActionListener(this); box.add(btnClear);// button of Clear operation
    btnSave=new JButton("Save"); btnSave.addActionListener(this); box.add(btnSave);// button of save operation
    // Output
    String desc="This is a simple integer calculator\n";//here the out put with text area.
    outArea=new JTextArea(desc,30,60);//out put area with the hight and length.
    ScrollPane scrollPane=new ScrollPane();//Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed
    scrollPane.add(outArea);
    box.add(scrollPane);
    Container c=getContentPane();
    c.add(box);
    c.setBackground(Color.green);//back ground color.
    setTitle("Calculator");//title
    setSize(600,375);//size
    setVisible(true);// visiblity of the program.
    private void showStatus(String status) {
    lN3.setText(status);
    public void actionPerformed(ActionEvent actionEvent){
    if(actionEvent.getSource()==btnClear){
    outArea.selectAll(); outArea.cut();
    } else {
    String sN1=tN1.getText(), sN2=tN2.getText(), sOp="";
    BigInteger bN1=new BigInteger(sN1);
    BigInteger bN2=new BigInteger(sN2);
    BigInteger bRes=BigInteger.ZERO, bResDiv[]={BigInteger.ZERO,BigInteger.ZERO};
    BigInteger bRemainder=BigInteger.ZERO;
    if(actionEvent.getSource()==btnAdd){bRes=bN1.add(bN2); sOp=" + ";}
    if(actionEvent.getSource()==btnSub){bRes=bN1.subtract(bN2); sOp=" - ";}
    if(actionEvent.getSource()==btnMul){bRes=bN1.multiply(bN2); sOp=" * ";}
    if(actionEvent.getSource()==btnDiv){sOp=" / ";
                if(bN2.signum()!=0)bResDiv=bN1.divideAndRemainder(bN2);//Math.signum() tells you what sign a number is....
                //returns zero if the argument is zero, 1.0 if the argument is greater than zero,
                //-1.0 if the argument is less than zero
                bRes=bResDiv[0]; bRemainder=bResDiv[1];
    if(sOp.equals(" / ") && bN2.signum()==0){
    // showStatus("Cannot divide by zero");
    } else {
    outArea.append(bN1.toString() + sOp+bN2.toString() + " = " + bRes.toString() + "\n");
    if(actionEvent.getSource()==btnDiv)outArea.append("Remainder = "+bRemainder.toString()+"\n");
    public static void main(String[] args) {//the main method of the program.
    new Calculator2().setVisible(true);
    }

    // This is a simple calculator that calculate 4 mathematical operations, addition,
    // subtraction, multiplication and division.
    // Author: Jean Chedid.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.lang.Math.*;
    import java.math.BigInteger;
    public class Calculator2 extends JFrame implements ActionListener{
        JLabel lN1, lN2,lN3;//here are the Label.
        JTextField tN1, tN2;// here the place for the text field.
        JButton btnAdd,btnSub,btnMul,btnDiv,btnClear,btnSave; JTextArea outArea;//all our Button which are in the program.
        Calculator2(){//constructor.
            Box box=Box.createVerticalBox();//creation of the box.
            // input
            lN1=new JLabel("Write first number"); box.add(lN1);//creation of the input,the number which we want use.
            tN1=new JTextField(100); tN1.setEditable(true); box.add(tN1);//allows or prevents the user editing the text
            lN2=new JLabel("write second number"); box.add(lN2);
            tN2=new JTextField(100); tN2.setEditable(true); box.add(tN2);
            // buttons
            btnAdd=new JButton("+"); btnAdd.addActionListener(this); box.add(btnAdd);// button of addition operation
            // setPreferredSize();
            btnSub=new JButton("-"); btnSub.addActionListener(this); box.add(btnSub);// button of subtraction operation
            btnMul=new JButton("*"); btnMul.addActionListener(this); box.add(btnMul);// button of multiplication operation
            btnDiv=new JButton("/"); btnDiv.addActionListener(this); box.add(btnDiv);// button of division operation
            btnClear=new JButton("Clear"); btnClear.addActionListener(this); box.add(btnClear);// button of Clear operation
            btnSave=new JButton("Save"); btnSave.addActionListener(this); box.add(btnSave);// button of save operation
            // Output
            String desc="This is a simple integer calculator\n";//here the out put with text area.
            outArea=new JTextArea(desc,30,60);//out put area with the hight and length.
            ScrollPane scrollPane=new ScrollPane();//Creates an empty (no viewport view) JScrollPane where both horizontal and vertical scrollbars appear when needed
            scrollPane.add(outArea);
            box.add(scrollPane);
            Container c=getContentPane();
            c.add(box);
            c.setBackground(Color.green);//back ground color.
            setTitle("Calculator");//title
            setSize(600,375);//size
            setVisible(true);// visiblity of the program.
         private void showStatus(String status) {
         lN3.setText(status);
        public void actionPerformed(ActionEvent actionEvent){
            if(actionEvent.getSource()==btnClear){
                outArea.selectAll(); outArea.cut();
            } else {
                String sN1=tN1.getText(), sN2=tN2.getText(), sOp="";
                BigInteger bN1=new BigInteger(sN1);
                BigInteger bN2=new BigInteger(sN2);
                BigInteger bRes=BigInteger.ZERO, bResDiv[]={BigInteger.ZERO,BigInteger.ZERO};
                BigInteger bRemainder=BigInteger.ZERO;
                if(actionEvent.getSource()==btnAdd){bRes=bN1.add(bN2); sOp=" + ";}
                if(actionEvent.getSource()==btnSub){bRes=bN1.subtract(bN2); sOp=" - ";}
                if(actionEvent.getSource()==btnMul){bRes=bN1.multiply(bN2); sOp=" * ";}
                if(actionEvent.getSource()==btnDiv){sOp=" / ";
                if(bN2.signum()!=0)bResDiv=bN1.divideAndRemainder(bN2);//Math.signum() tells you what sign a number is....
                //returns zero if the argument is zero, 1.0 if the argument is greater than zero,
                //-1.0 if the argument is less than zero
                bRes=bResDiv[0]; bRemainder=bResDiv[1];
                if(sOp.equals(" / ") && bN2.signum()==0){
                    // showStatus("Cannot divide by zero");
                } else {
                    outArea.append(bN1.toString() + sOp+bN2.toString() + " = " + bRes.toString() + "\n");
                    if(actionEvent.getSource()==btnDiv)outArea.append("Remainder = "+bRemainder.toString()+"\n");
        public static void main(String[] args) {//the main method of the program.
            new Calculator2().setVisible(true);
    }

  • There is an Oracle Certified Trainer program?

    Hi all,
    Can anyone tell me if there is an Oracle Certified Trainer program, in the same way as the Microsoft MCT (Microsoft Certified Trainer)? If the answer is yes, how to achieve  it? I´m already OCP (Java Programmer I/II). Can an OCP teaches
    Who can get access the official PDF materials for the trainings (Instructor-Led Courses)? Can the trainer download it or the Learning Partner Center only?
    An Certified Professional (OCP) can minister Official Oracle Training or is there any special requirement?
    Thanks in advance!

    compile-single:
    run-single:
    java.lang.NullPointerException
    at java.awt.Container.addImpl(Container.java:621)
    at java.awt.Container.add(Container.java:307)
    at calculator1.calculator1.<init>(calculator1.java:31)
    at calculator1.calculator1.main(calculator1.java:48)
    Exception in thread "main"
    Java Result: 1
    BUILD SUCCESSFUL (total time: 7 seconds)
    package calculator;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class calculator1 extends JFrame {
    JLabel welcome;
    JLabel value1;
    JTextField value1text;
    JLabel value2;
    JTextField value2text;
    JTextField result;
    JButton addition;
    JButton subtract;
    JButton multiply;
    JButton divide;
    JLabel operation;
    JLabel equals;
    public calculator1() {
    super("Calculator");
    setSize(600, 400);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    FlowLayout flow = new FlowLayout(FlowLayout.CENTER);
    getContentPane().setLayout(flow);
    getContentPane().add(value1);
    getContentPane().add(value1text);
    getContentPane().add(operation);
    getContentPane().add(value2);
    getContentPane().add(value2text);
    setVisible(true);
    public static void main(String args[]) {
    try {
    UIManager.setLookAndFeel(
    UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) { }
    new calculator1();
    calculator1 window = new calculator1();
    window.setTitle("Input Two Values Calculator");
    window.pack();
    window.show();
    }

  • Applet not working - Please Help!

    Hi everybody,
    I'm trying to make this calculator program work as an applet AND as an application. I tried using:
    public class calcg extends JApplet implements ActionListener{ in many different ways, but it didn't work. Can sombody help me make it work?
    Below is the source code for my calculator program.
    Thanks in advance,
    -Maria
    ps-You can also e-mail me at [email protected]
    // calculator
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    public class calcg extends JFrame implements ActionListener
      private JButton one, two, three, four, five, six, seven,
    eight, nine, zero, dec, eq, plus, minus, mult, div, clear;
      private JLabel output, spacer;
      private Container container;
      private String operation;
      private double num1, num2, answer;
      private boolean clear_flag = false;
      //set up GUI
      public calcg()
        //Create Title
        super("Calculator");
        JPanel container = new JPanel();     
        container.setLayout( new FlowLayout( FlowLayout.CENTER
        output = new JLabel("");     
        output.setBorder(new MatteBorder(2,2,2,2,Color.gray));
        output.setPreferredSize(new Dimension(1,26));     
        getContentPane().setBackground(Color.white);     
        getContentPane().add( "North",output );     
        getContentPane().add( "Center",container );
        //set up spacer
        spacer = new JLabel( "                                        
        container.add( spacer );
        //set up clear
        clear = new JButton( "CE" );
        clear.addActionListener(this);
        container.add( clear );
        //set up seven and register its event handler
        seven = new JButton( "7" );
        seven.addActionListener(this);
        container.add( seven );
        //set up eight
        eight = new JButton( "8" );
        eight.addActionListener(this);
        container.add( eight );
        //set up nine
        nine = new JButton( "9" );
        nine.addActionListener(this);
        container.add( nine );
        //set up div
        div = new JButton( "/" );
        div.addActionListener(this);
        container.add( div );
        //set up four
        four = new JButton( "4" );
        four.addActionListener(this);
        container.add( four );
        //set up five
        five = new JButton( "5" );
        five.addActionListener(this);
        container.add( five );
        //set up six
        six = new JButton( "6" );
        six.addActionListener(this);
        container.add( six );
        //set up mult
        mult = new JButton( "*" );
        mult.addActionListener(this);
        container.add( mult );
        //set up one
        one = new JButton( "1" );
        one.addActionListener(this);
        container.add( one );
        //set up two
        two = new JButton( "2" );
        two.addActionListener(this);
        container.add( two );
        //set up three
        three = new JButton( "3" );
        three.addActionListener(this);
        container.add( three );
        //set up minus
        minus = new JButton( "-" );
        minus.addActionListener(this);
        container.add( minus );
        //set up zero
        zero = new JButton( "0" );
        zero.addActionListener(this);
        container.add( zero );
        //set up dec
        dec = new JButton( "." );
        dec.addActionListener(this);
        container.add( dec );
        //set up eq
        eq = new JButton( "=" );
        eq.addActionListener(this);
        container.add( eq );
        //set up plus
        plus = new JButton( "+" );
        plus.addActionListener(this);
        container.add( plus );
        //Set size and make visible
        setSize( 190, 225 );
        setVisible( true );
        setResizable( false );
      public void actionPerformed(ActionEvent ae)
        JButton but = ( JButton )ae.getSource();     
        //Handle what button was pushed
        //Action for dec button
        if( but.getText() == "." )
          //if dec is pressed, first check to make shure there
    is not already a decimal
          String temp = output.getText();
          if( temp.indexOf( '.' ) == -1 )
            output.setText( output.getText() + but.getText() );
        //Action for clear button
        else if( but.getText() == "CE" )
          output.setText( "" );
          operation = "";
          num1 = 0.0;
          num2 = 0.0;
        //Action for plus button
        else if( but.getText() == "+" )
          operation = "+";
          num1 = Double.parseDouble( output.getText() );
          clear_flag = true;
          //output.setText( "" );
        //Action for minus button
        else if( but.getText() == "-" )
          operation = "-";
          num1 = Double.parseDouble( output.getText() );
          clear_flag = true;
          //output.setText( "" );
        //Action for mult button
        else if( but.getText() == "*" )
          operation = "*";
          num1 = Double.parseDouble( output.getText() );
          clear_flag = true;
          //output.setText( "" );
        //Action for div button
        else if( but.getText() == "/" )
          operation = "/";
          num1 = Double.parseDouble( output.getText() );
          clear_flag = true;
          //output.setText( "" );
        //Action for eq button
        else if( but.getText() == "=" )
          num2 = Double.parseDouble( output.getText() );
          //handle addition
          if( operation == "+" )
            answer = num1 + num2;
          else if( operation == "-" )
            answer = num1 - num2;
          else if( operation == "*" )
            answer = num1 * num2;
          else if( operation == "/" )
            answer = num1 / num2;       
          //display answer in output field
          output.setText( String.valueOf( answer ) );
          clear_flag = true;
          operation = "";
        //Default action should only be used for numbers
        else
          if( clear_flag == true )
            output.setText( "" );
            clear_flag = false;
          output.setText( output.getText() + but.getText() );
      //execute application
      public static void main( String args[] )
        calcg application = new calcg();
        application.setDefaultCloseOperation(
    JFrame.EXIT_ON_CLOSE );
    }

    Ok I think I know what you problem is.
    First move the main method above the calcg method ok. Just to make it easy.
    Then you did something like
    public static void main( String args[] )
    calcg application = new calcg();
    >> application.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); }}
    the arrows indicate your error. You need to put the setDefaultCloseOperation inside the calcg method then you would put this:
    public static void main(String[] args)
    calcg application = new calcg();
    application.calcg();
    see you call the application to run the calcg method which will start your program.

  • Help me in writing client for this JAX ws Web service

    Hi ,
    I am unable to write client for my Webservice deployed under glass fish v3 .please help.
    package jws;  
    import javax.jws.WebService;  
    import javax.jws.WebMethod;  
    import javax.jws.WebParam;  
    @WebService(name="CalculatorPortType")  
    public interface Calculator {  
        @WebMethod 
        public int add(int value1, int value2);  
    } package jws;
    import javax.jws.WebService;
    @WebService(serviceName = "Calculator",
                portName="CalculatorPort",
                endpointInterface = "jws.Calculator")
    public class CalculatorService implements Calculator {
        public int add(int value1, int value2)
             System.out.println("Inside web service class ");
            return value1 + value2;
    My client which is incomplete :please help
    import java.net.URL;
    import jws.CalculatorService;
    import jws.Calculator;
    import javax.xml.ws.Service;
    import sun.print.resources.serviceui;
    public class Hi {
    @WebServiceRef(wsdlLocation=
    "http://localhost:8089/Ram/Calculator?wsdl")
    CalculatorService service ;
    public static void main(String argsp[]) throws Exception
    } This is deployed under glassfish v3.

    When you just use the JAX-WS standard you do not need any WebLogic related classes to create a client for your web service.
    When the web service is deployed the WSDL can be accessed. By using this WSDL you can create your client by using tools
    such as wsimport (which comes with a JDK distribution and is located in the JDK_HOME/bin directory)
    wsimport -keep -d C:\YOUR_PROJECT\src http://hostname:port/context/SomeWebService?wsdlthe 'keep' option make sure the generated .java files are not thrown away.

Maybe you are looking for

  • I  cant find my app store icon

    i can't find my app store icon

  • Problem in displaying splash screen..

    Hi.. First of all my apology to repost the question as i was asked to post it here for the answer.I've developed a desktop application which has a splash screen.I'm using netbeans 6.0.Now, i am able to view the splash screen if i 'build' and 'run' th

  • I am not able to update firefox on my mac 10.7.5. I am also not able to download the newest version.

    I get notices indicating the there are upgrades available but whenever I try to update, it fails. The box showing the update just runs and runs, but never completes. This has happened numerous times. I have Firefox 9.0.1 and it says I am currently on

  • Experimenting with looping through array

    I've got this piece of code to check if some input of monosyllabic or not. Hope I can explain my problem with it. What it now does, is keep track of every first and last position of a vowel in the input. For a word like "bed", it works fine. The firs

  • Batch determination by UD.

    Dear Guru's, I want to define my scenario like this. After goods receipt against purchase order,goods will move in quality stock. At the time of result recording I will check all characteristics. I have created this as a master insp. char and assign