keshari 0 Newbie Poster

Hey All

Me getting a frustating problem while making the webservice using Eclipse, jdk1.6.0_03,and Tomcat-5.0.
The overall scenario is like this.There is a class “WsEpp” of which I have to make webservice.”WsEpp” class is using the object of another class “EppService”, and if certain conditions will be fullfill then “EppService” class will use the object of another class “PrintClass”,which is allready using the object of class “PrintLib”.

“PrintLib” class is a long file and its using many classes which are in supported jar files.
Here is the some part of “PrintLib” where I am facing the problem,

Scenario-1

public epp_Command command_data = new epp_Command();
	
	  public PrintLib() 
	  {
		System.out.println("CONSTRUCTOR 1");
	      this.command_data = new epp_Command();
	      System.out.println("CONSTRUCTOR 2");
	      	          
	   }

Here I am using the constructor of the “PrintLib” and “epp_Command” is included into jar files.When “WsEpp” is running as web service then

<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.reflect.InvocationTargetException</faultstring>

occurs as the response of webservice.

Scenario-2

//public epp_Command command_data = new epp_Command();
	
	  public PrintLib() 
	  {
		  
		 System.out.println("CONSTRUCTOR 1");
	//     this.command_data = new epp_Command();
	       System.out.println("CONSTRUCTOR 2");
	                
	          
	   }

When I am commenting the lines as shown in scenarion-2,then the service is running well and printing CONSTRUCTOR 1 and CONSTRUCTOR 2 as given in println command.
And response of webservice gives the desired result.


Scenario-3

public epp_Command command_data = null;
	
	  public PrintLib() 
	  {
		System.out.println("CONSTRUCTOR 1");
	      this.command_data = new epp_Command();
	      System.out.println("CONSTRUCTOR 2");
	                
	   }

By using scenarion-3 the service is running and printing only CONSTRUCTOR 1 as given in println command.And also

<faultcode>soapenv:Server.userException</faultcode>
<faultstring>java.lang.reflect.InvocationTargetException</faultstring>

occurs as the response of webservice.

I am suffering with this problem from last 2 weeks.Kindally help me and provide me the some suggestions and tips.In case of any more requirement I can provid ethe whole codes.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.