axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: QName is null for...
Date Wed, 16 Jul 2008 23:12:40 GMT
Do you have a fault message defined in the portType? If so, then you
must also define the fault in the binding.
It would help to see the entire WSDL.

Anne

On Mon, Jul 14, 2008 at 12:17 PM, Juan Gabriel Arias
<juangarias@gmail.com> wrote:
> Hi all,
> i'm facing this issue. I try to generate the java files from this wsdl
>
> <wsdl:operation name="RefundTransaction">
>     <soap:operation soapAction="RefundTransaction" />
>     <wsdl:input><soap:body use="literal" /></wsdl:input>
>     <wsdl:output><soap:body use="literal" /></wsdl:output>
> </wsdl:operation>
>
> And the generator throws this exception:
>
> Using AXIS2_HOME:   D:\java\axis2-1.4\
> Using JAVA_HOME:    C:\Program Files\Java\jre1.6.0_05
> Retrieving document at 'OIContentProviderv0.2.wsdl'.
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: Element QName is null for ErrorResponseMessage!
>         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 ErrorResponseMessage!
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:534)
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:260)
>         ... 2 more
> Caused by: java.lang.RuntimeException: Element QName is null for
> ErrorResponseMessage!
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultParamElements(AxisServiceBasedMultiLanguageEmitter.java:2829)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getFaultElement(AxisServiceBasedMultiLanguageEmitter.java:2748)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.generateMethodElement(AxisServiceBasedMultiLanguageEmitter.java:2269)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.loadOperations(AxisServiceBasedMultiLanguageEmitter.java:2151)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMDocumentForCallbackHandler(AxisServiceBasedMultiLanguageEmitter.java:1151)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeCallBackHandlers(AxisServiceBasedMultiLanguageEmitter.java:1117)
>         at
> org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitStub(AxisServiceBasedMultiLanguageEmitter.java:497)
>         ... 3 more
>
> I found that the problem is the missing "fault" definition.
> I i try this, it works:
>
> <wsdl:operation name="RefundTransaction">
>     <soap:operation soapAction="RefundTransaction" />
>     <wsdl:input><soap:body use="literal" /></wsdl:input>
>     <wsdl:output><soap:body use="literal" /></wsdl:output>
>     <wsdl:fault name="fault"><soap:fault use="literal"
> name="fault"/></wsdl:fault>
> </wsdl:operation>
>
> Why? AFAIK, this is not mandatory... am i wrong?
> And it would be nice to get a better error message.
>
> thanks in advance!
> Juan
>
>

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


Mime
View raw message