Tuesday, 1 May 2012

Axis Webserivce how to solve: java.lang.reflect.InvocationTargetException

Axis Webserivce how to solve:  java.lang.reflect.InvocationTargetException

Config: Tomcat 5.5 + Axis 1.4 , called by PHP SoapClient, 

Status: While visiting localhost:xxx?wsdl the dom tree can be seen. But called from PHP, it raises the  java.lang.reflect.InvocationTargetException.

    1. copy all .jar files from tomcat/common/lib to Tomcat\webapps\ROOT\axis\WEB-INF\lib.
    2. Make sure there is no enum in your web service class!!!! Very important!!!

        public class Search {

       // remove this !!!!!! it will raise java.lang.reflect.InvocationTargetException
         public enum Color { 
            RED , BLUE,GREEN,BLACK ;
public XXX search(){


No comments:

Post a Comment