Friday, April 22, 2005

Man what a nightmare

Have spent most of a week tweaking a web service client. It should be easy, but I seem to find it all too easy to get in a right mess.
First it became clear that I couldn't keep running the client on Tomcat - Weblogic 8 was going to be the platform of choice. I thought that might be coming, but had wanted to stay on the nice'n'easy Tomcat platform and avoid having to deal with all the complexities of Weblogic. Part of the reason for this was I thought I would have to at some point migrate to using the Java Proxy classes which are auto-generated by the JWS interface at the other end of this thing that I'm working on.
Also we were due to get a new "definitive" version of the web service and I had recreated the Axis-generated classes for that, and for some reason they weren't working as they had last week: I had that bug again whereby it generates a BigDecimal type for an integer, rather than just a Java int primitive (I finally got to the bottom of that by just getting the WSDL changed to use type="int" rather than type="integer").
OK so I bit the bullet and tried to get things going on Weblogic. Initially I had some pleasant surprises. Just using Weblogic Workshop I managed to start the server, deploy a webapp with my initial test JSP page in it, get the right JAR files in place, and it appeared to be looking good.
Then I started running into Axis issues again: I kept trying using Axis 1.1, then 1.2, then back again. This is currently an annoying process of rerunning the WSDL2Java (on the correct Axis version!), taking the autogenerated source and importing that into a JBuilder project, building the project, importing the classes into Weblogic Workshop, and redeploying the webapp. I kept getting spurious errors and soon I was in a total mess, having totally lost track of which versions of Axis were active in a) JBuilder, b) Weblogic, c) the webapp and d) the Axis Java generator.
So then I had to go back thru, make sure I'd got all the right versions, rebuild, and finally, at the end of the day (literally), it was working again. But what a palaver. Let that be a lesson to me! Make sure your versions to get in a mess - especially where Axis is concerned... and perhaps you could get round to learning Ant properly so you don't have to have that laborious rebuild process...