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 "Shameera Rathnayaka (Created) (JIRA)" <ji...@apache.org> on 2011/10/21 17:16:32 UTC
[jira] [Created] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element has an anonymous complextype
WSDL2Java tool fail when wsdl has a ref element has an anonymous complextype
-----------------------------------------------------------------------------
Key: AXIS2-5169
URL: https://issues.apache.org/jira/browse/AXIS2-5169
Project: Axis2
Issue Type: Improvement
Components: adb, codegen, Tools
Affects Versions: 1.7.0
Reporter: Shameera Rathnayaka
Assignee: Shameera Rathnayaka
If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
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:293)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
if (xmlSchemaType != null) {
if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
// we know this is a named complex type
processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
// if this is an anonomous complex type we have to set this
this.processedElementRefMap.put(referencedElement.getQName(),
this.processedTypemap.get(schemaTypeName));
}
String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
javaClassName);
xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
javaClassName);
} else {
throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Updated] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element has an anonymous complextype
Posted by "Shameera Rathnayaka (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shameera Rathnayaka updated AXIS2-5169:
---------------------------------------
Attachment: test.wsdl
you can find sample wsdl to reproduce this error
> WSDL2Java tool fail when wsdl has a ref element has an anonymous complextype
> -----------------------------------------------------------------------------
>
> Key: AXIS2-5169
> URL: https://issues.apache.org/jira/browse/AXIS2-5169
> Project: Axis2
> Issue Type: Improvement
> Components: adb, codegen, Tools
> Affects Versions: 1.7.0
> Reporter: Shameera Rathnayaka
> Assignee: Shameera Rathnayaka
> Attachments: test.wsdl
>
>
> If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
> 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:293)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
> This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
> if (xmlSchemaType != null) {
> if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
> // we know this is a named complex type
> processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
> // if this is an anonomous complex type we have to set this
> this.processedElementRefMap.put(referencedElement.getQName(),
> this.processedTypemap.get(schemaTypeName));
> }
> String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
> referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> } else {
> throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Commented] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element with an anonymous complextype
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13408852#comment-13408852 ]
Sagara Gunathunga commented on AXIS2-5169:
-------------------------------------------
1.) Imported XSD resources not available on remote location hence attached WSDL can't use for code generation.
2.) It seems WSDL2JAVA tool work for WSDL which has a ref element with an anonymous complextype refer attached SimpleService.wsdl. I have generated code for this WSDL and tested as service too.
Please reopen if you have a valid WSDL to reproduce this issue.
> WSDL2Java tool fail when wsdl has a ref element with an anonymous complextype
> ------------------------------------------------------------------------------
>
> Key: AXIS2-5169
> URL: https://issues.apache.org/jira/browse/AXIS2-5169
> Project: Axis2
> Issue Type: Improvement
> Components: adb, codegen, Tools
> Affects Versions: 1.7.0
> Reporter: Shameera Rathnayaka
> Assignee: Shameera Rathnayaka
> Attachments: test.wsdl
>
>
> If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
> 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:293)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
> This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
> if (xmlSchemaType != null) {
> if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
> // we know this is a named complex type
> processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
> // if this is an anonomous complex type we have to set this
> this.processedElementRefMap.put(referencedElement.getQName(),
> this.processedTypemap.get(schemaTypeName));
> }
> String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
> referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> } else {
> throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Resolved] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element with an anonymous complextype
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sagara Gunathunga resolved AXIS2-5169.
---------------------------------------
Resolution: Cannot Reproduce
Assignee: (was: Shameera Rathnayaka)
> WSDL2Java tool fail when wsdl has a ref element with an anonymous complextype
> ------------------------------------------------------------------------------
>
> Key: AXIS2-5169
> URL: https://issues.apache.org/jira/browse/AXIS2-5169
> Project: Axis2
> Issue Type: Improvement
> Components: adb, codegen, Tools
> Affects Versions: 1.7.0
> Reporter: Shameera Rathnayaka
> Attachments: SimpleService.wsdl, test.wsdl
>
>
> If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
> 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:293)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
> This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
> if (xmlSchemaType != null) {
> if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
> // we know this is a named complex type
> processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
> // if this is an anonomous complex type we have to set this
> this.processedElementRefMap.put(referencedElement.getQName(),
> this.processedTypemap.get(schemaTypeName));
> }
> String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
> referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> } else {
> throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Updated] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element with an anonymous complextype
Posted by "Shameera Rathnayaka (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shameera Rathnayaka updated AXIS2-5169:
---------------------------------------
Summary: WSDL2Java tool fail when wsdl has a ref element with an anonymous complextype (was: WSDL2Java tool fail when wsdl has a ref element has an anonymous complextype )
> WSDL2Java tool fail when wsdl has a ref element with an anonymous complextype
> ------------------------------------------------------------------------------
>
> Key: AXIS2-5169
> URL: https://issues.apache.org/jira/browse/AXIS2-5169
> Project: Axis2
> Issue Type: Improvement
> Components: adb, codegen, Tools
> Affects Versions: 1.7.0
> Reporter: Shameera Rathnayaka
> Assignee: Shameera Rathnayaka
> Attachments: test.wsdl
>
>
> If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
> 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:293)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
> This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
> if (xmlSchemaType != null) {
> if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
> // we know this is a named complex type
> processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
> // if this is an anonomous complex type we have to set this
> this.processedElementRefMap.put(referencedElement.getQName(),
> this.processedTypemap.get(schemaTypeName));
> }
> String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
> referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> } else {
> throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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
[jira] [Updated] (AXIS2-5169) WSDL2Java tool fail when wsdl has a
ref element with an anonymous complextype
Posted by "Sagara Gunathunga (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/AXIS2-5169?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sagara Gunathunga updated AXIS2-5169:
--------------------------------------
Attachment: SimpleService.wsdl
> WSDL2Java tool fail when wsdl has a ref element with an anonymous complextype
> ------------------------------------------------------------------------------
>
> Key: AXIS2-5169
> URL: https://issues.apache.org/jira/browse/AXIS2-5169
> Project: Axis2
> Issue Type: Improvement
> Components: adb, codegen, Tools
> Affects Versions: 1.7.0
> Reporter: Shameera Rathnayaka
> Assignee: Shameera Rathnayaka
> Attachments: SimpleService.wsdl, test.wsdl
>
>
> If i run wsdl2java with a wsdl which has a ref element with an anonymous complextype then it gives following error
> 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:293)
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:44)
> This is because, following code segment in SchemaCompiler class add null value as the javaClassName when ref element has an anonymous complextype
> if (xmlSchemaType != null) {
> if (!this.processedElementRefMap.containsKey(referencedElement.getQName())) {
> // we know this is a named complex type
> processSchema(referencedElement, xmlSchemaType, newResolvedSchema, false);
> // if this is an anonomous complex type we have to set this
> this.processedElementRefMap.put(referencedElement.getQName(),
> this.processedTypemap.get(schemaTypeName));
> }
> String javaClassName = this.processedTypemap.get(referencedElement.getSchemaTypeName());
> referencedElement.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> xsElt.addMetaInfo(SchemaConstants.SchemaCompilerInfoHolder.CLASSNAME_KEY,
> javaClassName);
> } else {
> throw new SchemaCompilationException(" Can not find the schema type with name " + schemaTypeName);
> }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
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