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 "Afkham Azeez (JIRA)" <ji...@apache.org> on 2010/12/22 12:33:01 UTC

[jira] Resolved: (AXIS2-3379) wsdl2 codegen fails if the wsdl2 includes schema imports

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

Afkham Azeez resolved AXIS2-3379.
---------------------------------

    Resolution: Fixed

Resolving as per the following comment in https://issues.apache.org/jira/browse/WODEN-204

Lawrence Mandel added a comment - 08/Apr/08 04:44 PM

Keith, I started digging a little deeper for AXIS2-3717 and think I realized what your actual problem is. You cannot access the schema elements in the WSDL model produced by using Woden. The reason for this is your WSDL violates schema access rules. Woden doesn't produce an error because the relevant WSDL assertion hasn't been implemented yet.

The problem lies in the way in which you're importing the schema.

<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://charitha.org">
  <xsd:import namespace="http://charitha.org/" schemaLocation="calculatorImportSchema?xsd=xsd0.xsd"/>
</xsd:schema>

Although this is the WS-I recommended way to import a schema into WSDL 1.1 schemas imported within inline schemas are not visible to the WSDL document. To import a schema in a WSDL 2.0 document a schema import element must appear as a child of the WSDL types as element [1] as follows:

<wsdl2:types>
<xsd:import namespace="http://charitha.org/" schemaLocation="calculatorImportSchema?xsd=xsd0.xsd" />
</wsdl2:types>

[1] http://www.w3.org/TR/2007/REC-wsdl20-20070626/#xsd-types

> wsdl2 codegen fails if the wsdl2 includes schema imports
> --------------------------------------------------------
>
>                 Key: AXIS2-3379
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3379
>             Project: Axis2
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.3
>         Environment: winxp, jdk15
>            Reporter: Charitha Kankanamge
>            Assignee: Keith Godwin Chapman
>            Priority: Critical
>         Attachments: calculatorImportSchema.aar
>
>
> wsdl2 codegen fails with the following exception if the wsdl2 document includes schema imports.
> Service archive is attached here with.
> C:\Axis2\Axis2-1.3\axis2-1.3\bin>wsdl2java.bat -uri http://10.100.1.118:9762/services/calculatorImportSchema?wsdl2 -wv 2 -o C:\Axis2\Axis2-1.3\axis2-1.3\bin\out
> Using AXIS2_HOME:   C:\Axis2\Axis2-1.3\axis2-1.3
> Using JAVA_HOME:    C:\Program Files\Java\jdk1.5.0_12
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
>         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:417)
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(WSDL20ToAxisServiceBuilder.java:236)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:101)
>         ... 2 more
> Caused by: java.lang.NullPointerException
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.createAxisMessage(WSDL20ToAxisServiceBuilder.java:976)
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateOperations(WSDL20ToAxisServiceBuilder.java:926)
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processInterface(WSDL20ToAxisServiceBuilder.java:849)
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processService(WSDL20ToAxisServiceBuilder.java:306)
>         at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(WSDL20ToAxisServiceBuilder.java:233)
>         ... 3 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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