Re: Migrating from Axis 1.x to Axis2: Java2WSDLTask: boolean getters

vlad romascanu <[email protected]>
Newsgroups gmane.text.xml.axis.user
Organization Oracle Corporation
Message-ID <[email protected]>
To answer my own question:

Code generation in Axis 1.x was in this case handled by 
org.apache.axis.wsdl.toJava.JavaBeanWriter:

    public class JavaBeanWriter extends JavaClassWriter {
    ...
         /**
          * Writes the setter and getter methods
          */
         protected void writeAccessMethods() {
    ...
                 String get = "get";

                 if (typeName.equals("boolean")) {
                     get = "is";
                 }
    ...

...whereas in Axis2 the ADB generator is using XSLT with no special 
provision for booleans:

    /org/apache/axis2/schema/template/ADBBeanTemplate-bean.xsl:/
    ...
                               /**
                               * Auto generated getter method
                               * @return <xsl:value-of
    select="$propertyType"/>
                               */
                               public  <xsl:value-of
    select="$propertyType"/><xsl:text> </xsl:text>get<xsl:value-of
    select="$javaName"/>(){
                                   return <xsl:value-of select="$varName"/>;
                               }
    ...


On 4/18/2018 7:10 PM, vlad romascanu wrote:
>
> Notice how the old isXXX() has become getXXX().
>
> I couldn't find this addressed on this list or elsewhere.
>
> Is this change expected behaviour, and is it controllable in any way?
>
> Thanks,
> V.
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.