axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ping Liu (JIRA)" <>
Subject [jira] [Commented] (AXIS2-4170) WSDL2JAVA for WSDL2.0 has CodeGenerationException/NullPointerException
Date Fri, 10 Jun 2011 05:59:58 GMT


Ping Liu commented on AXIS2-4170:

This is a post comment to my previous comment on June 2, 2011.  This is the final comment
with a test plan included as well.  Can someone, who has committer privilege, please help
give it a test and check it in?  Thanks!

Fix steps

1. run wsdl2java to recreate the exception

2. update code with the fix (kernel).  The code change is in a single file
 The actual change is shown in kernel.patch in attachment.

3. recompile/redeploy kernel to local maven repository

4. do offline distribution (to avoid maven to download kernel from online central repository
which does not contain the fix)
    under distribute run maven package as follows:
      mvn -o package

5. deploy axis2-1.7.0-SNAPSHOT-bin and set it as AXIS2_HOME in environment variable

6. rerun wsdl2java - this time there should be no exception and an Ant project with generated
web service (with both services code and client code) will be created

Test plan (continue on from 6)

7. update skeleton (axis2-4170_generated_parlayx\src\org\csapi\www\wsdl\parlayx\sms\send\v2_2\service\
with test implementation and add client code (axis2-4170_generated_parlayx\src\org\csapi\www\wsdl\parlayx\sms\send\v2_2\client\
from attached file; also update build.xml to add client startup

8. run "ant" to create Web Services SendSmsService.aar

9. deploy SendSmsService.aar to local Axis2's services directory - something like this


10. start Axis2 and make sure the service is deployed successfully

11. run "ant run.client" to start client to request and consume the service

12. successful console message is as below

    C:\a\dev\workout\ws\axis2\axis2-4170_generated_parlayx>ant run.client
    Buildfile: C:\a\dev\workout\ws\axis2\axis2-4170_generated_parlayx\build.xml


         [echo] Stax Availability= true
         [echo] Axis2 Availability= true

        [javac] C:\a\dev\workout\ws\axis2\axis2-4170_generated_parlayx\build.xml:43:
     warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last
    ; set to false for repeatable builds

         [java] log4j:WARN No appenders could be found for logger (org.apache.axis2.
         [java] log4j:WARN Please initialize the log4j system properly.
         [java] Ring tone response from the service is -- [SendSmsServiceSkeleton:se
    ndSmsRingtone()] Response to: smsRingtoneStr = Jingle Bell, Jingle Bell...
         [java] Logo response from the service is -- [SendSmsServiceSkeleton:sendSms
    Logo()] Response to: senderName = Harry Potter
         [java] SMS response from the service is -- [SendSmsServiceSkeleton:sendSms(
    )] Response to: message = SMS message: let me go
         [java] GetSmsDeliveryStatus response from the service is -- DeliveredToNetw

    Total time: 10 seconds

> WSDL2JAVA for WSDL2.0  has CodeGenerationException/NullPointerException
> -----------------------------------------------------------------------
>                 Key: AXIS2-4170
>                 URL:
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4.1
>         Environment: Win XP
>            Reporter: Vincent Dou
>         Attachments:,,
checkin.txt,, kernel.patch,
> I converted the WSDL1.1 to WSDL2.0 by using WODEN.
> Then using Axis2 WSDL2Java , there are exceptions;
> wsdl2java  -wv 2.0  -or -g  -ss  -uri  parlayx_sms_send_service_2_2.wsdl2
> Woden[Warning],0:0,Description-1001,The targetNamespace '
> dl/parlayx/sms/send/v2_2/service' is not dereferencable.
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : Error parsing WSDL
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
>         at org.apache.axis2.wsdl.WSDL2Code.main(
>         at org.apache.axis2.wsdl.WSDL2Java.main(
> Caused by: org.apache.axis2.AxisFault
>         at org.apache.axis2.AxisFault.makeFault(
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi
> ce(
>         at org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder.populateA
> llServices(
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
>         ... 2 more
> Caused by: java.lang.NullPointerException
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateOpera
> tions(
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processInterf
> ace(
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processServic
> e(
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi
> ce(
>         ... 4 more

This message is automatically generated by JIRA.
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message