[ 
https://issues.apache.org/jira/browse/AXIS2-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13047017#comment-13047017
 ] 

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 
WSDL20ToAxisServiceBuilder.java.  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\SendSmsServiceSkeleton.java)
 with test implementation and add client code 
(axis2-4170_generated_parlayx\src\org\csapi\www\wsdl\parlayx\sms\send\v2_2\client\TestClient.java)
 from attached axis2-4170_generated_parlayx.zip file; also update build.xml to 
add client startup target

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

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

    apache-tomcat-7.0.4-x86\webapps\axis2\WEB-INF\services\SendSmsService.aar

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

    init:

    pre.compile.test:
         [echo] Stax Availability= true
         [echo] Axis2 Availability= true

    compile.src:
        [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

    run.client:
         [java] log4j:WARN No appenders could be found for logger 
(org.apache.axis2.
    description.AxisOperation).
         [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]
         [java] Logo response from the service is -- 
[SendSmsServiceSkeleton:sendSms
    Logo()] Response to: senderName = Harry Potter
         [java]
         [java] SMS response from the service is -- 
[SendSmsServiceSkeleton:sendSms(
    )] Response to: message = SMS message: let me go
         [java]
         [java] GetSmsDeliveryStatus response from the service is -- 
DeliveredToNetw
    ork

    BUILD SUCCESSFUL
    Total time: 10 seconds
    C:\a\dev\workout\ws\axis2\axis2-4170_generated_parlayx>

> WSDL2JAVA for WSDL2.0  has CodeGenerationException/NullPointerException
> -----------------------------------------------------------------------
>
>                 Key: AXIS2-4170
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4170
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4.1
>         Environment: Win XP
>            Reporter: Vincent Dou
>         Attachments: WSDL20ToAxisServiceBuilder.java, 
> axis2-4170_generated_parlayx.zip, checkin.txt, generated_parlayx.zip, 
> kernel.patch, wsdl20.zip
>
>
> 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 
> 'http://www.csapi.org/ws
> 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
> ionEngine.java:153)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.AxisFault
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
>         at 
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi
> ce(WSDL20ToAxisServiceBuilder.java:276)
>         at 
> org.apache.axis2.description.WSDL20ToAllAxisServicesBuilder.populateA
> llServices(WSDL20ToAllAxisServicesBuilder.java:90)
>         at 
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerat
> ionEngine.java:105)
>         ... 2 more
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateOpera
> tions(WSDL20ToAxisServiceBuilder.java:1088)
>         at 
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processInterf
> ace(WSDL20ToAxisServiceBuilder.java:957)
>         at 
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processServic
> e(WSDL20ToAxisServiceBuilder.java:385)
>         at 
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateServi
> ce(WSDL20ToAxisServiceBuilder.java:273)
>         ... 4 more

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org
For additional commands, e-mail: java-dev-h...@axis.apache.org

Reply via email to