You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Ping Liu (JIRA)" <ji...@apache.org> on 2011/04/16 00:21:06 UTC

[jira] [Updated] (AXIS2-4170) WSDL2JAVA for WSDL2.0 has CodeGenerationException/NullPointerException

     [ https://issues.apache.org/jira/browse/AXIS2-4170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ping Liu updated AXIS2-4170:
----------------------------

    Attachment: generated_parlayx.zip

I was able to recreate the same exceptions.

After thorough investigation, I found the errors are all due to current Axis2 version's lack of handlering imported/nested WSDL and schemas.  That is the current version works well with single WSDL, however, fails with multiple WSDLs (with one main wSDL which imports other nested WSDL and XSD files).

To fix the errors, I have made three changes as follows:

  [1] modified type element processing
  [2] modified name space mapping
  [3] modified interface fault element

Specifically, [1] fixes the runtime exception and therefore allows Axis2 to generate code. [2] and [3] fix the compilation exception from running Ant on the generated code.

I am attaching the generated code in generated_parlayx.zip.  Vincent, could you please give it a try?  I'll wait through this weekend and commit the change next week after receiving your result (I want to do a client test but I couldn't find out the live WSDL URL).  Thanks!

> 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: generated_parlayx.zip, generated_parlayx.zip, 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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org