/* (non-Javadoc)
* @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeMethods()
*/
protected void writeMethods() throws WrapperFault {
MethodInfo minfo;
boolean isSimpleType;
try{
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);
}
}