... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-01-27

Ant 1.6

I was using a copy task to copy a particular file using <fileset file="${bea-xbean-jar}"/>, but the file consistently failed to be copied.  The problem was that the variable bea-xbean-jar was defined in an external build.properties file, but the line contained a trailing space.

2006-01-25

Axis

Using Apache Axis, if you invoke a web service and pass the wrong number of arguments, you will see the error 'no such operation', which can be misleading.

2006-01-24

WebLogic 9.1 Web Services

On the topic of null pointer exceptions, I tried to create a JWS web service that accepted a POJO argument that had a SOAPElement property.  It compiled and deployed fine, but when I invoked the web service, I got the dreaded NPE:

java.lang.NullPointerException at test.TestServiceImpl.operation1(TestServiceImpl.java:17) at
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
        sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at
        sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at
        java.lang.reflect.Method.invoke(Method.java:585) at
        weblogic.wsee.component.pojo.JavaClassComponent.invoke(JavaClassComponent.java:91) at
        weblogic.wsee.ws.dispatch.server.ComponentHandler.handleRequest(ComponentHandler.java:68) at
        weblogic.wsee.handler.HandlerIterator.handleRequest(HandlerIterator.java:127) at
        weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:84) at
        weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:60) at
        weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66) at
        weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44) at
        weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:124) at
        weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:53) at
        javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

If I declare the service with a SOAPElement as a direct parameter, it works as advertised.

XFire

I struggled with the sample web service provided with the XFire distribution.  The problem was that I placed the XFire services configuration XML in the WAR's META-INF directory instead of within classes/META-INF.  Incidentally, I discovered that in a servlet context getClass().getClassLoader().getResource() does not search the root context directory for resources -- it only searches the classes and lib subdirectories.  To get a resource from the root, you must use getServletContext().getResource().  After this short detour, the XFire service worked.

I was unable to get the XFire test framework run the service.  It throws a null pointer exception:

java.lang.NullPointerException
	at org.codehaus.xfire.handler.LocateBindingHandler.invoke(LocateBindingHandler.java:41)
	at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:97)
	at org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.java:57)
	at org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.java:38)
	at org.codehaus.xfire.test.AbstractXFireTest.invokeService(AbstractXFireTest.java:116)
	at org.codehaus.xfire.test.AbstractXFireTest.invokeService(AbstractXFireTest.java:91)
	at mm_test.BookService_Test.testBookService(BookService_Test.java:18)

Blog Archive