axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "R J Scheuerle Jr" <sc...@us.ibm.com>
Subject Re: Bug in JavaWriter?
Date Wed, 06 Feb 2002 16:10:38 GMT
How recent is your copy of axis.
When I run Java2WSDL, a "void" part is not emitted in the response message.

Thanks,

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                         
                                        
                      gcasper@s-und-n.d                                                  
                                        
                      e                        To:       axis-dev@xml.apache.org         
                                        
                                               cc:                                       
                                        
                      02/06/2002 05:49         Subject:  Bug in JavaWriter?              
                                        
                      AM                                                                 
                                        
                      Please respond to                                                  
                                        
                      axis-dev                                                           
                                        
                                                                                         
                                        
                                                                                         
                                        



Hi,

I changed Calculator.jws to return void (just a test).
"/axis/Calculator.jws?WSDL" looks ok to me:

<definitions targetNamespace="http://localhost:81/axis/Calculator.jws"
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  xmlns:serviceNS="http://localhost:81/axis/Calculator.jws"
  xmlns:ns1="java"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
  xmlns="http://schemas.xmlsoap.org/wsdl/">
<message name="subtractResponse">
    <part name="subtractResult" type="ns1:void" />
</message>
<message name="addResponse">
    <part name="addResult" type="ns1:void" />
</message>
...

But WSDL2Java generates bad code in CalculatorSoapBindingStub.java:

...
        if (resp instanceof java.rmi.RemoteException) {
            throw (java.rmi.RemoteException)resp;
        }
        else {
             return (void) resp;
        }
    }

which does not compile and looks like JavaWriter.getResponseString()
does not handle void correctly and should rather test if:
type.getBaseType().equals("void")
??

Thanks
Guido

--
Open Source Group               sunShine - Lighting up e:Business
=================================================================
Guido Casper, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-87  gcasper@s-und-n.de - http://www.s-und-n.de
=================================================================






Mime
View raw message