Package org.apache.axis.wsdl.wsdl2ws.info

Examples of org.apache.axis.wsdl.wsdl2ws.info.MethodInfo


      writer.write("int AXISCALL "+classname+"_Fini(void*p){\n\treturn AXIS_SUCCESS;\n}\n\n");
      writer.write("int AXISCALL "+classname+"_GetType(void*p){\n\treturn WEBSERVICE_HANDLER;\n}\n\n");
      writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p){\n\treturn DOC_LITERAL;\n}\n\n");
      writeInvoke();
      writer.write("\n/*Methods corresponding to the web service methods*/\n");
      MethodInfo minfo;
      for (int i = 0; i < methods.size(); i++) {
        minfo = (MethodInfo)methods.get(i);
        this.writeMethodInWrapper(minfo);
        writer.write("\n");
      }
View Full Code Here


    //if no methods in the service simply return
    if (methods.size() == 0) {
      writer.write("}\n");
      return;
    }
    MethodInfo minfo = (MethodInfo)methods.get(0);
    //if conditions (if parts)   
    writer.write("\tif (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
    writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
    //(else if parts)
    if (methods.size() > 1) {
      for (int i = 1; i < methods.size(); i++) {
        minfo = (MethodInfo)methods.get(i);
        writer.write("\telse if (0 == strcmp(method, \""+ minfo.getMethodname() +"\"))\n");
        writer.write("\t\treturn "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(DZ, SZ);\n");
      }
    }
    //(else part)
    writer.write("\telse return AXIS_FAIL;\n");
    //end of method
View Full Code Here

      writer.write("int AXISCALL "+classname+"_Init(void*p);\n");
      writer.write("int AXISCALL "+classname+"_Fini(void*p);\n");
      writer.write("int AXISCALL "+classname+"_GetType(void*p);\n");
      writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p);\n");
      writer.write("/*Methods corresponding to the web service methods*/\n");
      MethodInfo minfo;
      for (int i = 0; i < methods.size(); i++) {
           minfo = (MethodInfo)methods.get(i);
           writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ);");
           writer.write("\n");
      }
    }catch(IOException e){
      throw new WrapperFault(e);
    }
View Full Code Here

      writer.write("int AXISCALL "+classname+"_Init(void*p);\n");
      writer.write("int AXISCALL "+classname+"_Fini(void*p);\n");
      writer.write("int AXISCALL "+classname+"_GetType(void*p);\n");
      writer.write("AXIS_BINDING_STYLE AXISCALL "+classname+"_GetBindingStyle(void*p);\n");
      writer.write("/*Methods corresponding to the web service methods*/\n");
      MethodInfo minfo;
      for (int i = 0; i < methods.size(); i++) {
           minfo = (MethodInfo)methods.get(i);
           writer.write("int "+minfo.getMethodname()+CUtils.WRAPPER_METHOD_APPENDER+"(IWrapperSoapDeSerializer DZ, IWrapperSoapSerializer SZ);");
           writer.write("\n");
      }
    }catch(IOException e){
      throw new WrapperFault(e);
    }
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
   */
  protected void writeMethods() throws WrapperFault {
    MethodInfo minfo;
    boolean isSimpleType;
    try{
        writer.write("public: \n")
        for(int i = 0; i < methods.size(); i++){
        minfo = (MethodInfo)this.methods.get(i);
        boolean isAllTreatedAsOutParams = false;
        int noOfOutParams = minfo.getOutputParameterTypes().size();
        //write return type
        if(0==noOfOutParams)
          writer.write("\tvoid ");
        else if(1==noOfOutParams){
          ParameterInfo returnParam = (ParameterInfo)minfo.getOutputParameterTypes().iterator().next();
          String outparam = returnParam.getLangName();
          writer.write("\t"+WrapperUtils.getClassNameFromParamInfoConsideringArrays(returnParam,wscontext)+" ");
        }
        else{
          isAllTreatedAsOutParams = true;
          writer.write("\tvoid ");
        }
        //write return type
        writer.write(minfo.getMethodname()+"(");
           
        //write parameter names
        Iterator params = minfo.getInputParameterTypes().iterator();
        if(params.hasNext()){
            ParameterInfo fparam = (ParameterInfo)params.next();
          writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+" Value"+0);
        }
        for(int j =1; params.hasNext();j++){
          ParameterInfo nparam = (ParameterInfo)params.next();
          writer.write(","+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" Value"+j);
        }
        if (isAllTreatedAsOutParams){
          params = minfo.getOutputParameterTypes().iterator();
          for(int j =0; params.hasNext();j++){
            ParameterInfo nparam = (ParameterInfo)params.next();
            writer.write(", AXIS_OUT_PARAM "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" *OutValue"+j);
          }
        }       
View Full Code Here

   * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
   */
  protected void writeFaultHeaders() throws WrapperFault {
    try{
     
      MethodInfo minfo;
      for (int i = 0; i < methods.size(); i++) {
        minfo = (MethodInfo)methods.get(i);
        Iterator fault = minfo.getFaultType().iterator();
        String faultInfoName =null;          
        while (fault.hasNext()){
            FaultInfo info = (FaultInfo)fault.next();
            faultInfoName =info.getFaultInfo();      
            writer.write("#include \"Axis"+faultInfoName.toString()+"Exception.h\"\n");
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
   */
  protected void writeMethods() throws WrapperFault {
    MethodInfo minfo;
    boolean isSimpleType;
    try{
        writer.write("public: \n")
        for(int i = 0; i < methods.size(); i++){
        minfo = (MethodInfo)this.methods.get(i);
        boolean isAllTreatedAsOutParams = false;
        int noOfOutParams = minfo.getOutputParameterTypes().size();
        //write return type
        if(0==noOfOutParams)
          writer.write("\tvoid ");
        else if(1==noOfOutParams){
          ParameterInfo returnParam = (ParameterInfo)minfo.getOutputParameterTypes().iterator().next();
          String outparam = returnParam.getLangName();
          writer.write("\t"+WrapperUtils.getClassNameFromParamInfoConsideringArrays(returnParam,wscontext)+" ");
        }
        else{
          isAllTreatedAsOutParams = true;
          writer.write("\tvoid ");
        }
        //write return type
        writer.write(minfo.getMethodname()+"(");
           
        //write parameter names
        Iterator params = minfo.getInputParameterTypes().iterator();
        if(params.hasNext()){
            ParameterInfo fparam = (ParameterInfo)params.next();
          writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+" Value"+0);
        }
        for(int j =1; params.hasNext();j++){
          ParameterInfo nparam = (ParameterInfo)params.next();
          writer.write(","+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" Value"+j);
        }
        if (isAllTreatedAsOutParams){
          params = minfo.getOutputParameterTypes().iterator();
          for(int j =0; params.hasNext();j++){
            ParameterInfo nparam = (ParameterInfo)params.next();
            writer.write(", AXIS_OUT_PARAM "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" *OutValue"+j);
          }
        }       
View Full Code Here

    * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
    */
     protected void writeFaultHeaders() throws WrapperFault {
       try{
       
         MethodInfo minfo;
         for (int i = 0; i < methods.size(); i++) {
           minfo = (MethodInfo)methods.get(i);
           Iterator fault = minfo.getFaultType().iterator();
           String faultInfoName =null;          
           while (fault.hasNext()){
               FaultInfo info = (FaultInfo)fault.next();
               faultInfoName =info.getFaultInfo();      
               writer.write("#include \"Axis"+faultInfoName.toString()+"Exception.h\"\n");
View Full Code Here

  /* (non-Javadoc)
   * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
   */
  protected void writeMethods() throws WrapperFault {
    MethodInfo minfo;
    boolean isSimpleType;
    try{
      writer.write("extern void* get_"+classname+"_stub();\n");
      writer.write("extern void destroy_"+classname+"_stub(void* p);\n");   
     
      writer.write("extern int get_" + classname + "_Status(void* pStub);\n");

        for(int i = 0; i < methods.size(); i++){
          minfo = (MethodInfo)this.methods.get(i);
        boolean isAllTreatedAsOutParams = false;
        ParameterInfo returntype = null;
        int noOfOutParams = minfo.getOutputParameterTypes().size();
        if (0==noOfOutParams){
          returntype = null;
          writer.write("extern void ");
        }
        else if (1==noOfOutParams){
          returntype = (ParameterInfo)minfo.getOutputParameterTypes().iterator().next();
          String outparam = returntype.getLangName();
          writer.write("extern "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(returntype,wscontext)+" ");
        }
        else{
          isAllTreatedAsOutParams = true;
          writer.write("extern void ");
        }
          writer.write(minfo.getMethodname()+"(void* pStub");
           
          //write parameter names
          Iterator params = minfo.getInputParameterTypes().iterator();
          if(params.hasNext()){
              ParameterInfo fparam = (ParameterInfo)params.next();
            writer.write(", "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(fparam,wscontext)+" Value"+0);
          }
          for(int j =1; params.hasNext();j++){
            ParameterInfo nparam = (ParameterInfo)params.next();
            writer.write(", "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" Value"+j);
          }
          if(isAllTreatedAsOutParams){
          params = minfo.getOutputParameterTypes().iterator();
          for(int j =0; params.hasNext();j++){
            ParameterInfo nparam = (ParameterInfo)params.next();
            writer.write(", AXIS_OUT_PARAM "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" *OutValue"+j);
          }
          }
View Full Code Here

      writer.write("\tCall* pCall = (Call*)pStub;\n");
      writer.write("\tif ( pStub == NULL ) return AXIS_FAIL; \n\telse return pCall->_functions->getStatus(pCall->_object);\n");
      writer.write("}\n");
           
      writer.write("\n/*Methods corresponding to the web service methods*/\n");
      MethodInfo minfo;
      for (int i = 0; i < methods.size(); i++) {
        minfo = (MethodInfo)methods.get(i);
        this.writeMethodInWrapper(minfo);
        writer.write("\n");
      }
View Full Code Here

TOP

Related Classes of org.apache.axis.wsdl.wsdl2ws.info.MethodInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.