// archives

Java

This category contains 7 posts

WSWS3740E: Error: No SSL configuration is available for endpoint

You may get this error when you try and run a Java client to a SSL based web service. If you do experience this problem, you need to point to the WAS ssl.client.props file and add the cert to the chain.  You will probably be prompted, and when you do, you’ll need to answer Y [...]

WSWS3227E – java.lang.IllegalArgumentException

So you get your web service client working nicely and deploy your code to Websphere only to find this ugly Websphere Exception: [6/3/10 21:28:28:081 EDT] 00000035 Connection    E com.ibm.ws.webservices.engine.client.Connection invoke WSWS3227E:  Error: Exception: java.lang.IllegalArgumentException: argument type mismatch From what I have read online, this can happen based on the webservices.jar file not being the most [...]

Java Calendar – Calculate Number of Days between two dates

Calendar date1 = Calendar.getInstance(); // You can set date1 to any date date1.set(Calendar.MONTH,1); date1.set(Calendar.YEAR,1980); Calendar now = Calendar.getInstance(); long numberOfDays = (date1.getTime().getTime() – now.getTime().getTime()) / (1000 * 60 * 60 * 24);

Java Core Dumps

Here’s a good article if you wanted to take a stab at understanding Java Core dumps.  Pretty geeky stuff man but certainly useful when you are working with enterprise applications. http://java.sys-con.com/node/921279?page=0,0 Don’t forget you will need to get the Java Core Analyzer from the alphaworks site.

Round to the Nearest Dollar in Java

This method will simply round a number to the nearest whole number.  Can it get any simpler? public static int round(double value) { return (int)(value+.5); }

Logging in Java

If you ever need to track down very detailed errors from within vendor code, or web services (ie SOAP messages), you will probably want to use the JDK logging.  I found using a properties file to control how things are displayed.  There is a complete API for logging, but this article will not get into [...]

Webservices for Websphere using Eclipse

When I started using Websphere’s WSDL2Java, I was working with WAS 6.x.  As I am an avid Eclipse user, I wanted to make use of Eclipse for building my test WAR.  I didn’t have the money to fork out for buying a copy of WSAD (Websphere Application Developer) and I also did not want to [...]

Categories

  • No categories

Categories