Package org.apache.axis.wsdl.wsdl2ws

Examples of org.apache.axis.wsdl.wsdl2ws.WrapperFault


      // if this headerfile not defined define it
      this.writer.write("#if !defined(__"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_)\n");
      this.writer.write("#define __"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_\n\n");
      if (attribs.length != 1){
        System.out.println("Array "+classname+" contains unexpected no of variables");
        throw new WrapperFault("Array type "+classname+" contain unexpected no of types");
      }
      //include header file for the contained type
      QName qname = WrapperUtils.getArrayType(type).getName();
     
      if (!CUtils.isSimpleType(qname)){
        /* This is a must for complex schemas (includes cycle)*/
        writer.write("class "+attribs[0].getTypeName()+";\n\n");
      }
      else{
        writer.write("#include <axis/server/AxisUserAPI.h>\n\n");
      }
      writeArrayStruct();
      this.writer.write("#endif /* !defined(__"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_)*/\n");
      writer.flush();
      writer.close();
      System.out.println(getFilePath().getAbsolutePath() + " created.....");
    } catch (IOException e) {
      e.printStackTrace();
      throw new WrapperFault(e);
    }
  }
View Full Code Here


  protected void writeArrayStruct()throws WrapperFault{
    try{     
      writer.write("typedef struct "+classname+"Tag\n{\n");
      writer.write("\t"+attribs[0].getTypeName()+"* m_Array;\n\tint m_Size;\n} "+classname+";\n\n");
    } catch (IOException e) {
       throw new WrapperFault(e);
    }
  }
View Full Code Here

      writer.flush();
      writer.close();
      System.out.println(getFilePath().getAbsolutePath() + " created.....");
    } catch (IOException e) {
      e.printStackTrace();
      throw new WrapperFault(e);
    }
  }
View Full Code Here

      writer.write("public:\n");
        for(int i=0;i<attribs.length;i++){
          writer.write("\t"+getCorrectParmNameConsideringArraysAndComplexTypes(attribs[i])+" "+attribs[i].getParamName()+";\n");
        }   
      } catch (IOException e) {
         throw new WrapperFault(e);
      }
    }
View Full Code Here

   
  protected void writeConstructors()throws WrapperFault{
    try{
      writer.write("\t"+classname+"();\n");
    } catch (IOException e) {
       throw new WrapperFault(e);
    }
  }
View Full Code Here

    
  protected void writeDistructors() throws WrapperFault {
    try{
      writer.write("\tvirtual ~"+classname+"();\n");//damitha added virtual
    } catch (IOException e) {
       throw new WrapperFault(e);
    }
  }
View Full Code Here

    while(itr.hasNext())
    {
      writer.write("class "+itr.next().toString()+";\n");
   
    }catch(IOException e){
      throw new WrapperFault(e);
    }
  }
View Full Code Here

      // if this headerfile not defined define it
      this.writer.write("#if !defined(__"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_)\n");
      this.writer.write("#define __"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_\n\n");
      if (attribs.length != 1){
        System.out.println("Array "+classname+" contains unexpected no of variables");
        throw new WrapperFault("Array type "+classname+" contain unexpected no of types");
      }
      //include header file for the contained type
      QName qname = WrapperUtils.getArrayType(type).getName();
     
      if (!CUtils.isSimpleType(qname)){
        // writer.write("#include \""+attribs[0].getTypeName()+".h\"\n\n");
        /*
         * Needed for self referenced  array else compilation failed (include cycles).
        * <xsd:complexType name="Type1">
        *  <xsd:sequence>
        *    <xsd:element name="followings" maxOccurs="unbounded" minOccurs="0" type="tns:Type1" />
        *    <xsd:element name="kind" type="xsd:string" />
        *    <xsd:element name="index" type="xsd:int" />
        *  </xsd:sequence>
        *  <xsd:attribute name="att_kind" type="tns:Kind" />
        * </xsd:complexType>
        */       
        writer.write("class "+attribs[0].getTypeName()+";\n\n");
      }
      else{
        writer.write("#include <axis/server/AxisUserAPI.h>\n\n");
      }
      writeArrayStruct();
      this.writer.write("#endif /* !defined(__"+classname.toUpperCase()+"_"+getFileType().toUpperCase()+"_H__INCLUDED_)*/\n");
      writer.flush();
      writer.close();
      System.out.println(getFilePath().getAbsolutePath() + " created.....");
    } catch (IOException e) {
      e.printStackTrace();
      throw new WrapperFault(e);
    }
  }
View Full Code Here

  protected void writeArrayStruct()throws WrapperFault{
    try{     
      writer.write("typedef struct "+classname+"Tag\n{\n");
      writer.write("\t"+attribs[0].getTypeName()+"* m_Array;\n\tint m_Size;\n} "+classname+";\n\n");
    } catch (IOException e) {
       throw new WrapperFault(e);
    }
  }
View Full Code Here

        writer.write(" * This file was auto-generated by the Axis C++ Web Service " +
          "Generator (WSDL2Ws)\n");
        writer.write(" * This file contains Client Stub implementation for remote web service.\n");                   
        writer.write(" */\n\n");
      }catch(IOException e){
        throw new WrapperFault(e);
      }
  }
View Full Code Here

TOP

Related Classes of org.apache.axis.wsdl.wsdl2ws.WrapperFault

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.