src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/WSDLInfo.java
/**
     * @param minfo MethodInfo object into which output message and it's elements are to be added
     * @param part
     * @throws WrapperFault
     */
@param minfo MethodInfo object into which output message and it's elements are to be added
@param part
@throws WrapperFault
@param minfo MethodInfo object into which output message and it ' s elements are to be added @param part @throws WrapperFault
private void addDocumentStyleOutputMessageToMethodInfo(BindingEntry bindingEntry, Operation op, MethodInfo minfo) throws WrapperFault
    {
        if (op.getOutput() == null)
            return;
        Part part = null;
        Iterator returnlist = op.getOutput().getMessage().getParts().values().iterator();
        while (returnlist.hasNext())
        {
            part = (Part) returnlist.next();
            if (bindingEntry.isOutHeaderPart(op.getName(), part.getName()))
                part = null;
            else 
                break;
        }        
        if (part == null)
            return;
        QName qname;
        QName minfoqname;
        TypeEntry elementTypeEntry;
        Element element = c_symbolTable.getElement(part.getElementName());
        if (element == null)
        {
            elementTypeEntry = c_symbolTable.getType(part.getTypeName());
            qname            = elementTypeEntry.getQName();
            minfoqname       = elementTypeEntry.getQName();
        }
        else
        {
            elementTypeEntry = element.getRefType();
            qname            = elementTypeEntry.getQName();
            minfoqname       = element.getQName();
        }
        minfo.setOutputMessage(minfoqname);
        if (qname == null)
            return;
        Type type = c_typeMap.getType(qname);
        if (type == null)
            throw new WrapperFault("Unregistered type " + qname + " referenced!");
        Iterator elementNames = type.getElementnames();
        Iterator attributes   = type.getAttributes();
        if (!minfo.isUnwrapped())
        {
            if (!elementNames.hasNext())
            {
                if (type.isSimpleType() || type.isPrimitiveType())
                {
                    String elementName = (String) element.getQName().getLocalPart();
                    ParameterInfo pinfo = new ParameterInfo();
                    pinfo.setType(type);
                    pinfo.setParamName(elementName, c_typeMap);
                    pinfo.setElementName(element.getQName());
                    pinfo.setAnyElement(type.isAnyElement());
                    minfo.addOutputParameter(pinfo);                    
                    minfo.setConsumeBodyOnMessageValidation(false);
                }
            }
            else
            {
                while (elementNames.hasNext())
                {
                    String elementname  = (String) elementNames.next();
                    CElementDecl eleinfo = type.getElementForElementName(elementname);
                    Type innerType      = eleinfo.getType();
                    ParameterInfo pinfo = new ParameterInfo();
                    pinfo.setType(innerType);
                    pinfo.setParamName(elementname, c_typeMap);
                    pinfo.setArray(eleinfo.getMaxOccurs() > 1);
                    pinfo.setNillable(eleinfo.isNillable());
                    pinfo.setOptional(eleinfo.getMinOccurs() == 0);
                    pinfo.setElementName(type.getElementForElementName(elementname).getName());
                    pinfo.setAnyElement(innerType.isAnyElement());
                    minfo.addOutputParameter(pinfo);
                }
            }
        }
        else
        { 
            if (type.isSimpleType() 
                    || type.isPrimitiveType()
                    || elementNames.hasNext() 
                    || (attributes != null && attributes.hasNext()))
            {
                String elementName = (String) element.getQName().getLocalPart();
                ParameterInfo pinfo = new ParameterInfo();
                pinfo.setType(type);
                type.setIsUnwrappedOutputType(true);
                pinfo.setParamName(elementName, c_typeMap);
                if (element != null)
                    pinfo.setElementName(element.getQName());
                else
                    pinfo.setElementName(type.getName());
                pinfo.setAnyElement(type.isAnyElement());
                type.setLanguageSpecificName(generateNewTypeName(type, minfo));
                minfo.addOutputParameter(pinfo);
            }
            else if (!elementNames.hasNext())
            {
                minfo.setConsumeBodyOnMessageValidation(true);
            }
        }
    }
private void addDocumentStyleOutputMessageToMethodInfo ( BindingEntry bindingEntry , Operation op , MethodInfo minfo ) throws WrapperFault { if ( op . getOutput ( ) == null ) return ; Part part = null ; Iterator returnlist = op . getOutput ( ) . getMessage ( ) . getParts ( ) . values ( ) . iterator ( ) ; while ( returnlist . hasNext ( ) ) { part = ( Part ) returnlist . next ( ) ; if ( bindingEntry . isOutHeaderPart ( op . getName ( ) , part . getName ( ) ) ) part = null ; else break ; } if ( part == null ) return ; QName qname ; QName minfoqname ; TypeEntry elementTypeEntry ; Element element = c_symbolTable . getElement ( part . getElementName ( ) ) ; if ( element == null ) { elementTypeEntry = c_symbolTable . getType ( part . getTypeName ( ) ) ; qname = elementTypeEntry . getQName ( ) ; minfoqname = elementTypeEntry . getQName ( ) ; } else { elementTypeEntry = element . getRefType ( ) ; qname = elementTypeEntry . getQName ( ) ; minfoqname = element . getQName ( ) ; } minfo . setOutputMessage ( minfoqname ) ; if ( qname == null ) return ; Type type = c_typeMap . getType ( qname ) ; if ( type == null ) throw new WrapperFault ( "Unregistered type " + qname + " referenced!" ) ; Iterator elementNames = type . getElementnames ( ) ; Iterator attributes = type . getAttributes ( ) ; if ( ! minfo . isUnwrapped ( ) ) { if ( ! elementNames . hasNext ( ) ) { if ( type . isSimpleType ( ) || type . isPrimitiveType ( ) ) { String elementName = ( String ) element . getQName ( ) . getLocalPart ( ) ; ParameterInfo pinfo = new ParameterInfo ( ) ; pinfo . setType ( type ) ; pinfo . setParamName ( elementName , c_typeMap ) ; pinfo . setElementName ( element . getQName ( ) ) ; pinfo . setAnyElement ( type . isAnyElement ( ) ) ; minfo . addOutputParameter ( pinfo ) ; minfo . setConsumeBodyOnMessageValidation ( false ) ; } } else { while ( elementNames . hasNext ( ) ) { String elementname = ( String ) elementNames . next ( ) ; CElementDecl eleinfo = type . getElementForElementName ( elementname ) ; Type innerType = eleinfo . getType ( ) ; ParameterInfo pinfo = new ParameterInfo ( ) ; pinfo . setType ( innerType ) ; pinfo . setParamName ( elementname , c_typeMap ) ; pinfo . setArray ( eleinfo . getMaxOccurs ( ) > 1 ) ; pinfo . setNillable ( eleinfo . isNillable ( ) ) ; pinfo . setOptional ( eleinfo . getMinOccurs ( ) == 0 ) ; pinfo . setElementName ( type . getElementForElementName ( elementname ) . getName ( ) ) ; pinfo . setAnyElement ( innerType . isAnyElement ( ) ) ; minfo . addOutputParameter ( pinfo ) ; } } } else { if ( type . isSimpleType ( ) || type . isPrimitiveType ( ) || elementNames . hasNext ( ) || ( attributes != null && attributes . hasNext ( ) ) ) { String elementName = ( String ) element . getQName ( ) . getLocalPart ( ) ; ParameterInfo pinfo = new ParameterInfo ( ) ; pinfo . setType ( type ) ; type . setIsUnwrappedOutputType ( true ) ; pinfo . setParamName ( elementName , c_typeMap ) ; if ( element != null ) pinfo . setElementName ( element . getQName ( ) ) ; else pinfo . setElementName ( type . getName ( ) ) ; pinfo . setAnyElement ( type . isAnyElement ( ) ) ; type . setLanguageSpecificName ( generateNewTypeName ( type , minfo ) ) ; minfo . addOutputParameter ( pinfo ) ; } else if ( ! elementNames . hasNext ( ) ) { minfo . setConsumeBodyOnMessageValidation ( true ) ; } } }
@param minfo MethodInfo object into which output message and it's elements are to be added
 @param part
 @throws WrapperFault
@param minfo MethodInfo object into which output message and it ' s elements are to be added @param part @throws WrapperFault
// For now, skip over soap header parts
 // If no output parameter, simply return.
 // TODO - need to look into this more.
 // For wrapped style, inner attributes and elements are added as parameters.
 // For unwrapped style, objects are used for the parameters (i.e. classes or structures).
 // Type must be simple or primitive...we do a check just to make sure.
 // Ensure there is a response, if not, then operation is a one-way operation.
 // Let us be nice and uppercase the first character in type name, 
 // in addition to resolving method name/type conflicts.
 // empty element....check message response but no deserialization necessary
