axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "shpelda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-3891) Unwrapping failure at XmlSchemaChoice element
Date Fri, 16 Oct 2009 11:36:31 GMT

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

shpelda commented on AXIS2-3891:
--------------------------------

Have the same issue, following type definition gives mentioned error:

  <xsd:element name="scr-response">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="header" type="xsd:string"/>
        <xsd:choice>
          <xsd:element name="data" type="xsd:string"/>
          <xsd:element name="error" type="xsd:string"/>
        </xsd:choice>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

workaround would be to change it in following manner:

<xsd:element name="scr-response">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="header" type="xsd:string"/>
        <xsd:element name="body" type="response-body-type" />
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
  
  <xsd:complexType name="response-body-type">
        <xsd:choice>
          <xsd:element name="data" type="xsd:string"/>
          <xsd:element name="error" type="xsd:string"/>
        </xsd:choice>
  </xsd:complexType>

This is happening only if generating serverside bindigs.
  

> Unwrapping failure at XmlSchemaChoice element
> ---------------------------------------------
>
>                 Key: AXIS2-3891
>                 URL: https://issues.apache.org/jira/browse/AXIS2-3891
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4
>         Environment: WinXP, rampart-1.4, WSDL with multiple complex XSDs
>            Reporter: Thomas Poetter
>            Assignee: Amila Chinthaka Suriarachchi
>         Attachments: CodeGenerationEngine.java, SchemaUnwrapperExtension.java
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> This stack trace was generated AFTER applying the (later) attached extensions for more
verbose error reporting ("org.apache.ws.commons.schema.XmlSchemaChoice@1292d26" as causing
element was output because of these extensions) :
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException
> : org.apache.axis2.wsdl.codegen.CodeGenerationException: Unsupported Schema form
> at for unwrapping! found unknown type: org.apache.ws.commons.schema.XmlSchemaChoice@1292d26
but expected Element
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGener
> ationEngine.java:281)
>         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.wsdl.codegen.CodeGenerationException: Unsupported Schema
format for unwrapping! found unknown type: org.apache.ws.commons.schema.XmlSchemaChoice@1292d26
but expected Element
>         at org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.processXMLSchemaSequence(SchemaUnwrapperExtension.java:389)
>         at org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.handleAllCasesOfComplexTypes(SchemaUnwrapperExtension.java:217)
>         at org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.walkSchema(SchemaUnwrapperExtension.java:162)
>         at org.apache.axis2.wsdl.codegen.extension.SchemaUnwrapperExtension.engage(SchemaUnwrapperExtension.java:113)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>         ... 2 more
> C:\Develop\Tools\axis2-1.4\bin>
> The WSDL is confidential as also the specific schemata. Security annotations were made
to an existing WSDL along the lines of the example given by the Rampart tutorial at: 
> http://wso2.org/library/3190 and this WSDL: http://wso2.org/files/UToverHTTPS.xml 
> Public XSDs can be retrieved from here: 
> http://www.iso20022.org/catalogue_of_unifi_messages.page
> Does anybody have a hint why unwrapping fails? Are XSD choice elements not supported
in combination with multiple XSDs?

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


Mime
View raw message