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

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


      writer.write("\tvoid AXISCALL onFault(void* pMsg);\n");
      writer.write("\tint AXISCALL init();\n");
      writer.write("\tint AXISCALL fini();\n");
      writer.write("\tAXIS_BINDING_STYLE AXISCALL getBindingStyle(){return RPC_ENCODED;};\n");
      writer.write("private:/*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("\tint "+minfo.getMethodname()+ "(void* pMsg);");
           writer.write("\n");
         }
    
    }catch(IOException e){
      throw new WrapperFault(e);
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("\n/* This function is called by the AxisEngine when something went wrong" +
        "\n with the current web service request processing. Appropriate actions should" +
        "\n be taken here.*/");
      writer.write("\nvoid "+classname+"::onFault()\n{\n}");
      writer.write("\n/* This function is called by the AxisEngine when this web service" +
        "\n library is first loaded. So here we can initialize any global/static" +
        "\n data structures of this web service or open database connections */");
      writer.write("\nvoid "+classname+"::init()\n{\n}");
      writer.write("\n/* This function is called by the AxisEngine when this web service" +
        "\n library is unloaded. So we can deallocate any global/static data structures" +
        "\n and close database connections etc here. */");
      writer.write("\nvoid "+classname+"::fini()\n{\n}");
        writer.write("\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("void ");
        }
        else if (1==noOfOutParams){
          returntype = (ParameterInfo)minfo.getOutputParameterTypes().iterator().next();
          String outparam = returntype.getLangName();
          writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(returntype,wscontext)+" ");
        }
        else{
            isAllTreatedAsOutParams = true;
            writer.write("void ");
        }
        writer.write(classname+"::"+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

      writer.write("\tvoid AXISCALL onFault(void* pMsg);\n");
      writer.write("\tint AXISCALL init();\n");
      writer.write("\tint AXISCALL fini();\n");
      writer.write("\tAXIS_BINDING_STYLE AXISCALL getBindingStyle(){return DOC_LITERAL;};\n");
      writer.write("private:/*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("\tint "+minfo.getMethodname()+ "(void* pMsg);");
           writer.write("\n");
         }
    
    }catch(IOException e){
      throw new WrapperFault(e);
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("\n/* This function is called by the AxisEngine when something went wrong" +
        "\n with the current web service request processing. Appropriate actions should" +
        "\n be taken here.*/");
      writer.write("\nvoid "+classname+"::onFault()\n{\n}");
      writer.write("\n/* This function is called by the AxisEngine when this web service" +
        "\n library is first loaded. So here we can initialize any global/static" +
        "\n data structures of this web service or open database connections */");
      writer.write("\nvoid "+classname+"::init()\n{\n}");
      writer.write("\n/* This function is called by the AxisEngine when this web service" +
        "\n library is unloaded. So we can deallocate any global/static data structures" +
        "\n and close database connections etc here. */");
      writer.write("\nvoid "+classname+"::fini()\n{\n}");
        writer.write("\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("void ");
        }
        else if (1==noOfOutParams){
          returntype = (ParameterInfo)minfo.getOutputParameterTypes().iterator().next();
          String outparam = returntype.getLangName();
          writer.write(WrapperUtils.getClassNameFromParamInfoConsideringArrays(returntype,wscontext)+" ");
        }
        else{
            isAllTreatedAsOutParams = true;
            writer.write("void ");
        }
        writer.write(classname+"::"+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

  /* (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

      writer.write("void "+classname+"::OnFault(void *pMsg)\n{\n}\n\n");
      writer.write("int "+classname+"::Init()\n{\n\treturn AXIS_SUCCESS;\n}\n\n");
      writer.write("int "+classname+"::Fini()\n{\n\treturn AXIS_SUCCESS;\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()+"(mc);\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()+"(mc);\n");
      }
    }
    //(else part)
    writer.write("\telse return AXIS_FAIL;\n");
    //end of method
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.