[nbj2ee] New instance ignored error but don't know how to fix please help

  • From: "salems24" < >
  • To:
  • Subject: [nbj2ee] New instance ignored error but don't know how to fix please help
  • Date: Thu, 29 Nov 2012 19:52:37 -0500

ok I am doing a computing degree however I'm probably the worst programmer in 
the world... I am currently behind with the project we are making in class to 
learn the language and the skills we learn in making this project will 
probably play a part in our assignment... anyway I will explain how the code 
is supposed to work and the error that I can't seem to fix now

when the class is run it is supposed to call the constructor which executes 
the client method thereby generating a client however underneath 'new 
XMLRPC_CLient();' there is a yellow line which says 'new instance ignored' I 
think this is stopping the program from calling the constructor but I don't 
know why I am getting this error

this is the full code for the class:


Code:
package client;

/**
 *
 * @author Chris Bennett
 */

import java.util.Vector;
import org.apache.xmlrpc.XmlRpcClient;
public class XMLRPC_CLient 
{

    private String forecast;

    public static void main(String[] args)
    {
                new XMLRPC_CLient();
    }    

    public XMLRPC_CLient()
   {
    createCLient();
   }   
    
   public void createCLient()
  {
     try
     {
         String serverURL = "http://localhost:8085/RPC2";;
         XmlRpcClient client = new XmlRpcClient(serverURL);
         
         Vector<String> arglist = new Vector<String>();
         arglist.add("Martin");
         arglist.add("Tuesday");
         
         forecast = (String)client.execute("ourExample.weatherForecast", 
arglist);
         System.out.println("Weather Forecast: " + forecast);
     }
     catch (Exception e)
     {
         e.printStackTrace();
     }
}// end createclient

public String getForecast()
{
    return forecast;

}//end class








[nbj2ee] New instance ignored error but don't know how to fix please help

salems24 11/30/2012

[nbj2ee] New instance ignored error but don't know how to fix please help

salems24 11/30/2012

[nbj2ee] Re: New instance ignored error but don't know how to fix please help

John Yeary 11/30/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close