axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel G. Chacon" <>
Subject Axis2 Bug/Problem -- Reader cannot be null
Date Tue, 03 Oct 2006 21:51:50 GMT

I am also experiencing an issue that I have seen posted on the list 
before.  I am only getting this problem when I try to call a method 
on a web service that is returning some complex type such as a 
java.util.Set implementation or a custom POJO.  Any other method that 
returns a simple String is working fine.  I am attaching my 
services.xml, Axis2 generated wsdl and generated client code as well 
as the interface that my service class implements.

A smaller issue that I have also come across has required me to use 
the -pn option when generating client code for my service.  If I 
leave that out in the WSDL2Java call the generated client code does 
not compile & has several warnings in the code that say "code not generated".

I am relatively new to web services so I could be just be doing 
something stupid.  I used the "code first" approach since I do not 
know how to write WSDL files.  Since I essentially made up the POJO 
objects used as return types in my service class do I need to let 
Axis know about them somehow in the services.xml ?

Below is a copy of the commands that I am using at my DOS prompt and 
the stack trace that I am getting in my client code.  Any help is 
greatly appreciated.

C:\Program Files\Apache Software Foundation\Axis2-1.0\bin>WSDL2Java 
-uri ..\samples\wsdl\nvr-info-service.wsdl -s -p gov -o ..\samples\nvr-info-axiom-unpack -sn 
NVR_Info_Service -t -pn NVR_Info_ServiceSOAP12port0
Using AXIS2_HOME:   C:\Program Files\Apache Software Foundation\Axis2-1.0
Using JAVA_HOME:    C:\Program Files\Java\jdk1.5.0_07
log4j:WARN No appenders could be found for logger 
log4j:WARN Please initialize the log4j system properly.
C:\Program Files\Apache Software Foundation\Axis2-1.0\bin>

Caused by: java.lang.Exception: org.apache.axis2.AxisFault: Reader 
cannot be null; nested exception is:
         java.lang.UnsupportedOperationException: Reader cannot be null
         at org.apache.axis2.AxisFault.makeFault(
         at org.apache.axis2.engine.AxisEngine.receive(

Manuel G. Chacon
View raw message