Java PHP problem
I've started putting together a site that uses PHP to access some custom Java classes. While I'm not clear on what exactly the java classes are doing, their programmer has given me an overview of the variables that I should pass to them. However, I keep getting this error:
java.lang.IllegalArgumentException: argument type mismatch
The java programmer has no knowledge of PHP and so is unable to help locate the source of the problem. The code I'm writing is in the following format:
$newobject = new Java('com.company.Class', $names, (String) $ssn, (int) $time);
In the above example, $names is an object, $ssn a string and $time an integer. The object $names is created in a similar way above this example.
I've tested a very basic class to be sure it works, and had success, however when I try to pass objects into classes, and multiple variables, it doesnt work. I hope someone can shed some light on where I might be going wrong.
Without seeing the Java code it's going to be a little tricky. However, it's looking like some form of clash is going on... where one piece of code using (eg) an integer is asking another piece of code which is wanting to use (eg) a string to manipulate the integer... if that's vague I'm sorry.
Try asking your Java programmer to put extra debugging code into the Java to identify where the Java is having a tantrum, and if it's possible to do similar in the PHP... that way the Java programmer and PHP scripter can work together without necessarily understanding each other's languages.
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL