Binding error using operation <wsdl:fault> in wsdl2java of Axis2 1.4
--------------------------------------------------------------------

                 Key: AXIS2-3824
                 URL: https://issues.apache.org/jira/browse/AXIS2-3824
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: Tools
    Affects Versions: 1.4
         Environment: windows xp / ant 1.6.5
ubuntu 8.04 / ant 1.7.0
            Reporter: Frank Breuer
            Priority: Critical


As example I use the sample project 'quickstartadb' from 
'axis2-1.4/samples/quickstartadb'.
INFO: Exactly the same code is running well on Axis2 1.3!!!

I've added the operation <wsdl:fault>  for the method 'getPrice' in the file 
'StockQuoteService.wsdl' like this:

<wsdl:portType name="StockQuoteServicePortType">
        <wsdl:operation name="getPrice">
                <wsdl:input message="axis2:getPriceMessage" />
                <wsdl:output message="axis2:getPriceResponseMessage" />
                <wsdl:fault message="axis2:getPriceResponseMessage" />
        </wsdl:operation>

        <wsdl:operation name="update">
                <wsdl:input message="axis2:updateMessage" />
        </wsdl:operation>
</wsdl:portType>


<wsdl:binding name="StockQuoteServiceSOAP11Binding" 
type="axis2:StockQuoteServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; 
style="document" />
        <wsdl:operation name="getPrice">
                <soap:operation soapAction="urn:getPrice" style="document" />
                <wsdl:input>
                        <soap:body use="literal" 
namespace="http://quickstart.samples/"; />
                </wsdl:input>
                <wsdl:output>
                        <soap:body use="literal" 
namespace="http://quickstart.samples/"; />
                </wsdl:output>
                <wsdl:fault>
                        <soap:body use="literal" 
namespace="http://quickstart.samples/"; />
                </wsdl:fault>
        </wsdl:operation>
        <wsdl:operation name="update">
                <soap:operation soapAction="urn:update" style="document" />
                <wsdl:input>
                        <soap:body use="literal" 
namespace="http://quickstart.samples/"; />
                </wsdl:input>
        </wsdl:operation>
</wsdl:binding>



By adding the operation <wsdl:fault> for the method 'getPrice' in the file 
'StockQuoteService.wsdl', the creation of project using command 'ant 
generate.service' fails with the exception:

     [java] org.apache.axis2.wsdl.codegen.CodeGenerationException: Error 
parsing WSDL
     [java]     at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:153)
     [java]     at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
     [java]     at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
     [java] Caused by: org.apache.axis2.AxisFault: Binding name is null for the 
binding fault in  binding operation ==>getPrice
     [java]     at 
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateBinding(WSDL11ToAxisServiceBuilder.java:748)
     [java]     at 
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoint(WSDL11ToAxisServiceBuilder.java:538)
     [java]     at 
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateEndpoints(WSDL11ToAxisServiceBuilder.java:489)
     [java]     at 
org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:363)
     [java]     at 
org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServices(WSDL11ToAllAxisServicesBuilder.java:107)
     [java]     at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
     [java]     ... 2 more
     [java] Exception in thread "main"


Exactly the same code is running fine using Axis2 1.3.



-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to