axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kathiravelu Pradeeban (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AXIS2-5060) java2wsdl generated wsdl misses the Fault definition for VersionHttpBinding
Date Wed, 01 Jun 2011 14:15:47 GMT
java2wsdl generated wsdl misses the Fault definition for VersionHttpBinding
---------------------------------------------------------------------------

                 Key: AXIS2-5060
                 URL: https://issues.apache.org/jira/browse/AXIS2-5060
             Project: Axis2
          Issue Type: Bug
    Affects Versions: 1.5.1
            Reporter: Kathiravelu Pradeeban


Used java class is the sample Version class that comes bundled with Axis2. Fault definition
for VersionHttpBinding is missing, where it is defined in VersionPortType, when wsdl is generated
from a simple java class with exception. Hence further java2wsdl from the generated wsdl fails
when HttpBinding is used.

Steps to reproduce:
* Generate the wsdl for the sample Version Service comes with Axis2.

/axis2-1.5.1/bin$ sh java2wsdl.sh -cn Version

* Generate the stubs from the generated wsdl.
/axis2-1.5.1/bin$ sh wsdl2java.sh -uri "Version.wsdl" -o . -uw -pn "VersionHttpEndpoint"
or
sh wsdl2java.sh -uri "http://localhost:8080/axis2/services/Version?wsdl" -o . -uw -ap -pn
"VersionHttpEndpoint"

This fails complaining, 
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: Element QName is null for Exception!
	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: org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException:
Element QName is null for Exception!
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:533)
	at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:260)
	... 2 more
Caused by: java.lang.RuntimeException: Element QName is null for Exception!
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2908)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2827)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2348)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2224)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmitter.java:1213)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:1179)
	at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:496)
	... 3 more


Nevertheless, it works for Soap11 and Soap12 Bindings.
sh wsdl2java.sh -uri "http://localhost:8080/axis2/services/Version?wsdl" -o . -uw -ap
sh wsdl2java.sh -uri "http://localhost:8080/axis2/services/Version?wsdl" -o . -uw -pn "VersionHttpEndpoint"
sh wsdl2java.sh -uri "http://localhost:8080/axis2/services/Version?wsdl" -o . -uw -pn "VersionHttpSoap11Endpoint"


Fixing Axis2 kernel to include Fault definition for VersionHttpBinding in the java2wsdl generated
wsdl will fix this issue. This should be fixed, as the generated wsdl fails for wsdl2java
due to the missing fault definition for VersionHttpBinding.

--
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


Mime
View raw message