My psychic debugging powers tell me that you ran it without providing two command-line arguments. You can see the error message "Usage: $java Client endpoint_address client_repo_path" is present in your program output, meaning that you didn't supply two command-line arguments, so args[1]
may not be valid. Your program doesn't exit after checking the number of command-line arguments, so it tries to access args[1]
after complaining that the program was run incorrectly.
if (args.length != 2) {
System.out.println(args.length);
System.out
.println("Usage: $java Client endpoint_address client_repo_path");
}
ConfigurationContext ctx = ConfigurationContextFactory
.createConfigurationContextFromFileSystem(args[1], args[1]
+ "/conf/axis2.xml");