src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
/**
     * Dushshantha: This method writes getters and setters of the attributes.
     */
This method writes getters and setters of the attributes.
This method writes getters and setters of the attributes .
protected void writeGetSetMethods() throws WrapperFault
    {
        int anyCounter = 0;
        if (type.isArray())
            return;
        try
        {
            for (int i = 0; i < attribs.length; i++)
            {     
                String paramType = getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i]);
                String methodName = attribs[i].getMethodName();
                if(attribs[i].getType().isAnyElement())
                {
                    anyCounter += 1;
                    methodName += Integer.toString(anyCounter);
                }
                if (attribs[i].isArray() && !paramType.endsWith("*"))
                        paramType += "* ";  
                c_writer.write("\n");
                c_writer.write("\t" + CUtils.sanitizeStringWithSplats(paramType) + " get" + methodName + "();\n");
                c_writer.write("\t" + "void set" + methodName + "(" + CUtils.sanitizeStringWithSplats(paramType) + " InValue");
                Type type = attribs[i].getType();
                boolean isPointerType;                
                if (type.isSimpleType())
                    isPointerType = CUtils.isPointerType(CUtils.getSimpleType(type.getBaseType())); 
                else
                    isPointerType = CUtils.isPointerType(paramType);
                if ((attribs[i].isSimpleType() || attribs[i].getType().isSimpleType()) 
                        && !attribs[i].isArray() 
                        && (isElementNillable(i) 
                                || isElementOptional(i) 
                                || isPointerType 
                                || attribs[i].getChoiceElement() 
                                || attribs[i].getAllElement()))                
                    c_writer.write(", bool deep=true, bool makeCopy=true");
                c_writer.write(");\n");
            }
        } 
        catch (IOException e)
        {
            throw new WrapperFault(e);
        }
    }
protected void writeGetSetMethods ( ) throws WrapperFault { int anyCounter = 0 ; if ( type . isArray ( ) ) return ; try { for ( int i = 0 ; i < attribs . length ; i ++ ) { String paramType = getCorrectParmNameConsideringArraysAndComplexTypes ( attribs [ i ] ) ; String methodName = attribs [ i ] . getMethodName ( ) ; if ( attribs [ i ] . getType ( ) . isAnyElement ( ) ) { anyCounter += 1 ; methodName += Integer . toString ( anyCounter ) ; } if ( attribs [ i ] . isArray ( ) && ! paramType . endsWith ( "*" ) ) paramType += "* " ; c_writer . write ( "\n" ) ; c_writer . write ( "\t" + CUtils . sanitizeStringWithSplats ( paramType ) + " get" + methodName + "();\n" ) ; c_writer . write ( "\t" + "void set" + methodName + "(" + CUtils . sanitizeStringWithSplats ( paramType ) + " InValue" ) ; Type type = attribs [ i ] . getType ( ) ; boolean isPointerType ; if ( type . isSimpleType ( ) ) isPointerType = CUtils . isPointerType ( CUtils . getSimpleType ( type . getBaseType ( ) ) ) ; else isPointerType = CUtils . isPointerType ( paramType ) ; if ( ( attribs [ i ] . isSimpleType ( ) || attribs [ i ] . getType ( ) . isSimpleType ( ) ) && ! attribs [ i ] . isArray ( ) && ( isElementNillable ( i ) || isElementOptional ( i ) || isPointerType || attribs [ i ] . getChoiceElement ( ) || attribs [ i ] . getAllElement ( ) ) ) c_writer . write ( ", bool deep=true, bool makeCopy=true" ) ; c_writer . write ( ");\n" ) ; } } catch ( IOException e ) { throw new WrapperFault ( e ) ; } }
Dushshantha: This method writes getters and setters of the attributes.
Dushshantha : This method writes getters and setters of the attributes .
// Following will set the correct type  // Set method name to use //  If xsd:any element, we index method name // we pass arrays as pointers - ensure this // Generate getter prototype // Generate setter prototype - need to consider deep copies