axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Lindquist (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (AXIS2-4143) Type.Property (ex A.B) and Type (ex AB) Names Collide in Object Factory (jaxbri Code Generation) -- Two declarations cause a collision in the ObjectFactory class
Date Fri, 21 Nov 2008 18:01:46 GMT

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

dlindquist edited comment on AXIS2-4143 at 11/21/08 10:01 AM:
------------------------------------------------------------------

(Attached file 'ok.wsdl')

This is a slightly altered version of the "bad.wsdl" file, where the offending anonymous complexType
has been removed, and the element set simply to type "xsd:string".

I should note that this changes the meaning of that element, but an alternative that doesn't
cause the same problem would be to explicitly name the complexType (as a separate type entry)
rather than using an anonymous type (this would then avoid the error described in this issue,
since it would avoid the 'automatic' naming that is the problem.

      was (Author: dlindquist):
    This is a slightly altered version of the "bad.wsdl" file, where the offending anonymous
complexType has been removed, and the element set simply to type "xsd:string".

I should note that this changes the meaning of that element, but an alternative that doesn't
cause the same problem would be to explicitly name the complexType (as a separate type entry)
rather than using an anonymous type (this would then avoid the error described in this issue,
since it would avoid the 'automatic' naming that is the problem.
  
> Type.Property (ex A.B) and Type (ex AB) Names Collide in Object Factory (jaxbri Code
Generation) -- Two declarations cause a collision in the ObjectFactory class
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4143
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4143
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: codegen
>    Affects Versions: 1.4.1
>         Environment: Windows XP (x86), Apache Axis2 1.4.1, Sun JDK 1.5.0_12
>            Reporter: Dave Lindquist
>            Priority: Minor
>         Attachments: bad.wsdl, ok.wsdl
>
>
> When using JAXBRI bindings and generating from a WSDL via wsdl2java.bat, it is possible
for a Type.Property and Type name to collide in ObjectFactory.
> For example, if my XSD has:
> * A type named "Something"
> * A type named "Some" with a property named "thing" (and this property is also an "anonymous"
complex type)
> I will get an error on code generation that says:
> [ERROR] Two declarations cause a collision in the ObjectFactory class.
> [ERROR] (Related to above error) This is the other declaration.
> Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:271)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
>         at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:112)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>         ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>         at java.lang.reflect.Method.invoke(Unknown Source)
>         at org.apache.axis2.wsdl.codegen.extension.JAXBRIExtension.engage(JAXBRIExtension.java:101)
>         ... 3 more
> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: Unable to generate
code using jaxbri
>         at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:304)
>         ... 8 more
> Caused by: java.lang.RuntimeException: Unable to generate code using jaxbri
>         at org.apache.axis2.jaxbri.CodeGenerationUtility.processSchemas(CodeGenerationUtility.java:196)
>         ... 8 more
> The bug here is two-fold:
> * First, I get absolutely nothing in terms of information that helps me track down WHAT
declarations collided (the second message line looks like it was intending to provide that,
but it doesn't).
> * Secondly, that it collides at all (this is a perfectly valid case, and should be handled
in codegen).
> I will attach example WSDLs that create this case when generated.
> The command line used is:
> wsdl2java.bat -o (output directory) -b jaxbri -uri (wsdl file)

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


Mime
View raw message