src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
/**
     * write the invoke method
     * @throws IOException
     */
write the invoke method
@throws IOException
write the invoke method @throws IOException
private void writeInvoke() throws IOException
    {
        CUtils.printMethodComment(c_writer, "This method invokes the right service method.");
        c_writer.write("int " + c_classname + "::\ninvoke(void *pMsg)\n{\n");
        c_writer.write("\tIMessageData* mc = (IMessageData*)pMsg;\n");
        c_writer.write("\tconst AxisChar *method = mc->getOperationName();\n");
        if (methods.size() != 0)
        {
            MethodInfo minfo = (MethodInfo) methods.get(0);
            c_writer.write(
                "\tif( (0 == strcmp(method, \"" + minfo.getInputMessage().getLocalPart() + "\")) || (0 == strcmp(method, \"" + minfo.getMethodname() + "\")) )\n");
            c_writer.write("\t\treturn " + minfo.getSanitizedMethodName() + "(mc);\n");
            if (methods.size() > 1)
            {
                for (int i = 1; i < methods.size(); i++)
                {
                    minfo = (MethodInfo) methods.get(i);
                    c_writer.write(
                        "\telse if ( (0 == strcmp(method, \"" + minfo.getInputMessage().getLocalPart() + "\")) || (0 == strcmp(method, \"" + minfo.getMethodname() + "\")) )\n");
                    c_writer.write("\t\treturn " + minfo.getSanitizedMethodName() + "(mc);\n");
                }
            }
            c_writer.write("\telse return AXIS_FAIL;\n");
        }
        c_writer.write("}\n\n");
    }
private void writeInvoke ( ) throws IOException { CUtils . printMethodComment ( c_writer , "This method invokes the right service method." ) ; c_writer . write ( "int " + c_classname + "::\ninvoke(void *pMsg)\n{\n" ) ; c_writer . write ( "\tIMessageData* mc = (IMessageData*)pMsg;\n" ) ; c_writer . write ( "\tconst AxisChar *method = mc->getOperationName();\n" ) ; if ( methods . size ( ) != 0 ) { MethodInfo minfo = ( MethodInfo ) methods . get ( 0 ) ; c_writer . write ( "\tif( (0 == strcmp(method, \"" + minfo . getInputMessage ( ) . getLocalPart ( ) + "\")) || (0 == strcmp(method, \"" + minfo . getMethodname ( ) + "\")) )\n" ) ; c_writer . write ( "\t\treturn " + minfo . getSanitizedMethodName ( ) + "(mc);\n" ) ; if ( methods . size ( ) > 1 ) { for ( int i = 1 ; i < methods . size ( ) ; i ++ ) { minfo = ( MethodInfo ) methods . get ( i ) ; c_writer . write ( "\telse if ( (0 == strcmp(method, \"" + minfo . getInputMessage ( ) . getLocalPart ( ) + "\")) || (0 == strcmp(method, \"" + minfo . getMethodname ( ) + "\")) )\n" ) ; c_writer . write ( "\t\treturn " + minfo . getSanitizedMethodName ( ) + "(mc);\n" ) ; } } c_writer . write ( "\telse return AXIS_FAIL;\n" ) ; } c_writer . write ( "}\n\n" ) ; }
write the invoke method
 @throws IOException
write the invoke method @throws IOException
//if no methods in the service simply return //if conditions (if parts)		 //(else if parts) //(else part) //end of method