You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by da...@apache.org on 2004/06/07 12:50:18 UTC

cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info FaultInfo.java MethodInfo.java

damitha     2004/06/07 03:50:18

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws WSDL2Ws.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp
                        ClientStubHeaderWriter.java ClientStubWriter.java
                        HeaderFileWriter.java ParmHeaderFileWriter.java
                        ServiceHeaderWriter.java ServiceWriter.java
                        WrapWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info FaultInfo.java
                        MethodInfo.java
  Log:
  stubs and skeltons need to generate fault related stuff in order to use
  the axis engines fault mapping and exception handling related work.
  Nithyaka Thangarajah has done just that and sent the patches. I applied
  those patches.
  Thanks Nithya
  
  Revision  Changes    Path
  1.28      +19 -7     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java
  
  Index: WSDL2Ws.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/WSDL2Ws.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- WSDL2Ws.java	27 Apr 2004 03:23:08 -0000	1.27
  +++ WSDL2Ws.java	7 Jun 2004 10:50:18 -0000	1.28
  @@ -194,15 +194,16 @@
           while (oplist.hasNext()) {
               minfo = new MethodInfo();
               methods.add(minfo);
  -
               //add operation to operation List
               Operation op = (Operation) oplist.next();
               minfo.setMethodname(op.getName());
  -            
  +            System.out.println(op.getName()+"operation name .......................&&&&&&&&&&&");
               //setting the faults
               Map faults = op.getFaults();
   			addFaultInfo(faults,minfo);
               
  +            
  +            
               Iterator paramlist = null;
               //add each parameter to parameter list
               if ("document".equals(bindingEntry.getBindingStyle().getName())){
  @@ -221,6 +222,7 @@
   				}
   				if (qname != null){
   					minfo.setInputMessage(minfoqname);
  +					System.out.println(minfoqname.getLocalPart()+"setInputMessage.............?????????????");
   					type = this.typeMap.getType(qname);
   					boolean wrapped = true; //TODO take this from a commandline argument
   					if (wrapped){
  @@ -251,7 +253,8 @@
   					}
   				}
   	    	}
  -    	   	else{
  +    	  	else{
  +				minfo.setInputMessage(op.getInput().getMessage().getQName());
       	   		if (op.getParameterOrdering() != null){
   	    	   		for (int ix=0; ix < op.getParameterOrdering().size(); ix++){
   						Part p = (Part)(op.getInput().getMessage().getParts().get((String)op.getParameterOrdering().get(ix)));
  @@ -268,7 +271,7 @@
   						if (null != pinfo) minfo.addInputParameter(pinfo);
   					}    	   			
       	   		}
  -            }
  +           }
               //get the return type
   			if(op.getOutput()!=null){
   	            Iterator returnlist = op.getOutput().getMessage().getParts().values().iterator();
  @@ -319,7 +322,12 @@
   					}
   				}
   				else{
  +			//added on 1-jun-2004
  +				    minfo.setInputMessage(op.getInput().getMessage().getQName()); 
  +				    minfo.setOutputMessage(op.getOutput().getMessage().getQName());
  +				   // minfo.setFaultMessage();
   					if (op.getParameterOrdering() != null){
  +						 
   						for (int ix=0; ix < op.getParameterOrdering().size(); ix++){
   							Part p = (Part)(op.getOutput().getMessage().getParts().get((String)op.getParameterOrdering().get(ix)));
   							if (p == null) continue;
  @@ -598,12 +606,16 @@
   		while(faultIt.hasNext()){
   			Fault fault = (Fault)faultIt.next();
   			FaultInfo faultinfo = new FaultInfo(fault.getName());
  +			System.out.println(fault.getName()+"Fault NAME   @@@@@@@@@@@@@@@@@");
   			Map parts = fault.getMessage().getParts();
   			Iterator partIt = parts.values().iterator();
   			while(partIt.hasNext()){
  +				System.out.println(" fault part name *********"+partIt.toString()  );
   				faultinfo.addParam(createParameterInfo((Part)partIt.next()));
  -			}			  
  -		}	 
  +			}	
  +			//add by nithya
  +			methodinfo.addFaultType(faultinfo) ;
  +	     	}	 
   	}
   	
   	private ParameterInfo createParameterInfo(Part part)throws WrapperFault{
  @@ -618,7 +630,7 @@
   			throw new WrapperFault("unregisterd type "+qname+" refered");
   		ParameterInfo parainfo = 
   			new ParameterInfo(type,part.getName());
  -		parainfo.setElementName(part.getElementName());
  +		parainfo.setElementName(part.getElementName());		
   		return parainfo;
   	}
   
  
  
  
  1.16      +7 -15     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java
  
  Index: ClientStubHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubHeaderWriter.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- ClientStubHeaderWriter.java	27 May 2004 09:34:34 -0000	1.15
  +++ ClientStubHeaderWriter.java	7 Jun 2004 10:50:18 -0000	1.16
  @@ -18,15 +18,8 @@
   /**
    * @author Srinath Perera(hemapani@openource.lk)
    * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
  - * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
    */
   
  -/*
  - * Revision 1.1  2004/05/26 samisa
  - * Added Stub base class into code generation
  - */
  -
  -
   package org.apache.axis.wsdl.wsdl2ws.cpp;
   
   import java.io.File;
  @@ -64,11 +57,11 @@
   	 * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writeAttributes()
   	 */
   	protected void writeAttributes() throws WrapperFault {
  -		/*try {
  +		try {
   			writer.write("private:\n\tCall* m_pCall;\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
  -		}*/
  +		}
   	}
   
   	/* (non-Javadoc)
  @@ -91,7 +84,7 @@
   	 */
   	protected void writeConstructors() throws WrapperFault {
   		try{
  -		writer.write("public:\n\t"+classname+"(const char* pcEndpointUri);\n");
  +		writer.write("public:\n\t"+classname+"();\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  @@ -155,7 +148,8 @@
   			  writer.write(");\n");
   		  }
   		  writer.write("\tint getStatus();\n");		  
  -		}catch (Exception e) {
  +		  writer.write("\tint getFaultDetail(char** ppcDetail);\n");//damitha
  +                  }catch (Exception e) {
   			  e.printStackTrace();
   			  throw new WrapperFault(e);
   		}	}
  @@ -165,8 +159,8 @@
   	 */
   	protected void writePreprocssorStatements() throws WrapperFault {
   		try{
  -			//writer.write("#include <axis/client/Call.h>\n");
  -			writer.write("#include <axis/client/Stub.h>\n");
  +			writer.write("#include <axis/client/Call.h>\n");
  +			writer.write("/*include Exception header files here*/\n");//damitha
   			Type atype;
   			Iterator types = this.wscontext.getTypemap().getTypes().iterator();
   			HashSet typeSet = new HashSet();
  @@ -192,7 +186,5 @@
   	{
   		return "ClientStub";	
   	}
  -	
  -	protected String getExtendsPart(){return " :public Stub";}
   }
   
  
  
  
  1.36      +144 -47   ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ClientStubWriter.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- ClientStubWriter.java	27 May 2004 02:15:15 -0000	1.35
  +++ ClientStubWriter.java	7 Jun 2004 10:50:18 -0000	1.36
  @@ -17,15 +17,8 @@
    
   /**
    * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
  - * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
    */
   
  -/*
  - * Revision 1.1  2004/05/26 samisa
  - * Added Stub base class into code generation
  - */
  -
  -
   package org.apache.axis.wsdl.wsdl2ws.cpp;
   
   import java.io.File;
  @@ -44,6 +37,7 @@
   import org.apache.axis.wsdl.wsdl2ws.info.MethodInfo;
   import org.apache.axis.wsdl.wsdl2ws.info.ParameterInfo;
   import org.apache.axis.wsdl.wsdl2ws.info.Type;
  +import org.apache.axis.wsdl.wsdl2ws.info.FaultInfo; 
   import org.apache.axis.wsdl.wsdl2ws.info.WebServiceContext;
   	
   public class ClientStubWriter extends CPPClassWriter{
  @@ -67,7 +61,9 @@
   				writer.write("/*\n");	
   				writer.write(" * This is the Client Stub implementation file genarated by WSDL2Ws tool.\n");
   				writer.write(" * "+classname+".cpp: implemtation for the "+classname+".\n");
  -				writer.write(" *\n");
  +				writer.write("* Default when no parameter passed. When thrown with no parameter \n");
  +				writer.write("more general "+classname+"  is assumed.\n");
  +				writer.write(" *\n");										
   				writer.write(" */\n\n");
   			}catch(IOException e){
   				throw new WrapperFault(e);
  @@ -79,12 +75,11 @@
   	 */
   	protected void writeConstructors() throws WrapperFault {
   		try{
  -		writer.write(classname+"::"+classname+"(const char* pcEndpointUri):Stub(pcEndpointUri)\n{\n");
  -		/*writer.write("\tm_pCall = new Call();\n");
  +		writer.write(classname+"::"+classname+"()\n{\n");
  +		writer.write("\tm_pCall = new Call();\n");
   		//TODO get TransportURI from WrapInfo and check what the transport is and do the following line accordingly
   		writer.write("\tm_pCall->setProtocol(APTHTTP);\n");
   		writer.write("\tm_pCall->setEndpointURI(\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\");\n");
  -		*/
   		writer.write("}\n\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
  @@ -96,7 +91,7 @@
   	 */
   	protected void writeDistructors() throws WrapperFault {
   		try{
  -		writer.write(classname+"::~"+classname+"()\n{}\n\n" );//\n\tdelete m_pCall;\n}\n\n");
  +		writer.write(classname+"::~"+classname+"()\n{\n\tdelete m_pCall;\n}\n\n");
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  @@ -114,7 +109,8 @@
   				this.writeMethodInWrapper(minfo);
   				writer.write("\n");
   			}
  -			writer.write("\tint "+classname+"::getStatus(){if ( m_pCall==NULL ) return AXIS_SUCCESS; else return m_pCall->getStatus();}\n");     
  +			writer.write("int "+classname+"::getStatus()\n{\n\tif ( m_pCall==NULL ) \n\t\treturn AXIS_SUCCESS; \n\telse \n\t\treturn m_pCall->getStatus();\n}\n\n");//damitha
  +			writer.write("int "+classname+"::getFaultDetail(char** ppcDetail)\n{\n\treturn m_pCall->getFaultDetail(ppcDetail);\n}\n\n");//damitha
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  @@ -127,6 +123,8 @@
   		try{
   			writer.write("#include \""+classname+".h\"\n\n");
   			writer.write("#include <axis/server/AxisWrapperAPI.h>\n\n");
  +            writer.write("using namespace std;\n\n ");
  +		
   		}catch(IOException e){
   			throw new WrapperFault(e);
   		}
  @@ -143,6 +141,7 @@
   	public void writeMethodInWrapper(MethodInfo minfo) throws WrapperFault,IOException {
   		boolean isAllTreatedAsOutParams = false;
   		ParameterInfo returntype = null;
  +		ParameterInfo returntype1 = null;
   		int noOfOutParams = minfo.getOutputParameterTypes().size();
   		if (0==noOfOutParams){
   			returntype = null;
  @@ -154,6 +153,7 @@
   			isAllTreatedAsOutParams = true;
   		}
   		Collection params = minfo.getInputParameterTypes();
  +	
   		String methodName = minfo.getMethodname();
   		Type retType = null;
   		boolean returntypeissimple = false;
  @@ -162,15 +162,16 @@
   		if (returntype != null){
   			outparamTypeName = WrapperUtils.getClassNameFromParamInfoConsideringArrays(returntype, wscontext);
   			retType = wscontext.getTypemap().getType(returntype.getSchemaName());
  -			if (retType != null){
  +				if (retType != null){
   				returntypeisarray = retType.isArray();
  +				System.out.println(retType.getLanguageSpecificName()+"LanguageName  .................... ");
   				if (CUtils.isSimpleType(retType.getLanguageSpecificName())){
   					returntypeissimple = true;
   				}
   			}
   		}
   		writer.write("\n/*\n");
  -		writer.write(" * This method wrap the service method"+ methodName +"\n");
  +		writer.write(" * This method wrap the service method "+ methodName +"\n");
   		writer.write(" */\n");
   		//method signature
   		String paramTypeName;
  @@ -181,6 +182,7 @@
   			writer.write("void");
   		}else{
   			writer.write(outparamTypeName);
  +			System.out.println("Output Parameter type Name :"+outparamTypeName);
   		}
   		writer.write(" "+classname+"::" + methodName + "(");
   		ArrayList paramsB = (ArrayList)params;
  @@ -198,7 +200,6 @@
   				writer.write(", AXIS_OUT_PARAM  "+WrapperUtils.getClassNameFromParamInfoConsideringArrays((ParameterInfo)paramsC.get(i),wscontext)+" *OutValue"+i);
   			}
   		}
  -
   		writer.write(")\n{\n");
   		if (returntype != null){
   			writer.write("\t");
  @@ -216,19 +217,27 @@
   		}
   		String channelSecurityType = (WrapperConstants.CHANNEL_SECURITY_SSL.equals(wscontext.getWrapInfo().getChannelSecurity()))?
   										"SSL_CHANNEL" : "NORMAL_CHANNEL";
  -		writer.write("\tif (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER, "+channelSecurityType +")) return ");
  +//		begin added NIthya
  +		//	  writer.write("int Ret;\n");
  +			  writer.write("\tchar* cFaultcode;\n");//damitha added \t
  +			  writer.write("\tchar* cFaultstring;\n");//damitha \t
  +			  writer.write("\tchar* cFaultactor;\n");//damitha \t
  +			  writer.write("\tchar* cFaultdetail;\n");//damitha \t
  + //     end of Nithya								
  +		//	begin added by nithya
  +		  writer.write("\ttry\n\t{");//damitha \n
  +		//ended by nithya								
  +		writer.write("\n\t\tif (AXIS_SUCCESS != m_pCall->initialize(CPP_RPC_PROVIDER, "+channelSecurityType +")) \n\t\t\treturn ");//damitha
   		if (returntype != null){
   			writer.write((returntypeisarray?"RetArray":returntypeissimple?"Ret":"pReturn")+";\n");
   		}
   		else{
   			writer.write(";\n");
   		}
  -		writer.write("\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""+minfo.getSoapAction()+"\");\n");
  -		writer.write("\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n"); //TODO check which version is it really.
  -		writer.write("\tm_pCall->setOperation(\""+minfo.getMethodname()+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
  -		//new calls from stub base
  -		writer.write("\tapplyUserPreferences();\n");
  -		
  +	
  +		writer.write("\t\tm_pCall->setTransportProperty(SOAPACTION_HEADER , \""+minfo.getSoapAction()+"\");\n");
  +		writer.write("\t\tm_pCall->setSOAPVersion(SOAP_VER_1_1);\n"); //TODO check which version is it really.
  +		writer.write("\t\tm_pCall->setOperation(\""+minfo.getMethodname()+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
   		for (int i = 0; i < paramsB.size(); i++) {
   			type = wscontext.getTypemap().getType(((ParameterInfo)paramsB.get(i)).getSchemaName());
   			if (type != null){
  @@ -256,7 +265,7 @@
   				}
   			}else if(typeissimple){
   				//for simple types	
  -				writer.write("\tm_pCall->addParameter(");			
  +				writer.write("\t\tm_pCall->addParameter(");			
   				writer.write("(void*)&Value"+i+", \"" + ((ParameterInfo)paramsB.get(i)).getParamName()+"\", "+CUtils.getXSDTypeForBasicType(paramTypeName));
   			}else{
   				//for complex types 
  @@ -265,8 +274,11 @@
   			}
   			writer.write(");\n");
   		}
  -		writer.write("\tif (AXIS_SUCCESS == m_pCall->invoke())\n\t{\n");
  -		writer.write("\t\tif(AXIS_SUCCESS == m_pCall->checkMessage(\""+minfo.getMethodname()+"Response\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t{\n");
  +		writer.write("\t\tif (AXIS_SUCCESS == m_pCall->invoke())\n\t\t{\n");//damitha
  +		writer.write("\t\t\tif(AXIS_SUCCESS == m_pCall->checkMessage(\""+minfo.getOutputMessage().getLocalPart()+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\"))\n\t\t\t{\n");//damitha
  +		System.out.println("getInputMessage .................. "+minfo.getInputMessage().getLocalPart());
  +		System.out.println("getOutputMessage .................. "+minfo.getOutputMessage().getLocalPart());
  +		
   		if ( isAllTreatedAsOutParams) {
   			String currentParamName;
   			String currentParaType;
  @@ -290,57 +302,142 @@
   					String containedType = null;
   					if (CUtils.isSimpleType(qname)){
   						containedType = CUtils.getclass4qname(qname);
  -						writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"&)m_pCall->getBasicArray("+CUtils.getXSDTypeForBasicType(containedType)+", \""+currentType.getParamName()+"\", 0);\n");
  +						writer.write("\t\t\t\t" + currentParamName + " = ("+currentParaType+"&)m_pCall->getBasicArray("+CUtils.getXSDTypeForBasicType(containedType)+", \""+currentType.getParamName()+"\", 0);\n");//damitha
   					}
   					else{
   						containedType = qname.getLocalPart();
  -						writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_"+containedType);
  -						writer.write(", (void*) Axis_Create_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+currentType.getParamName()+"\", Axis_URI_"+containedType+");\n");
  +						writer.write("\t\t\t\t" + currentParamName + " = ("+currentParaType+"&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_"+containedType);//damitha
  +						writer.write("\t\t\t\t, (void*) Axis_Create_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+currentType.getParamName()+"\", Axis_URI_"+containedType+");\n");//damitha
   					}
   				}
   				else if(typeissimple){
  -				   writer.write("\t\t\t" + currentParamName + " = m_pCall->"+ CUtils.getParameterGetValueMethodName(currentParaType, false)+"(\""+currentType.getParamName()+"\", 0);\n");
  +				   writer.write("\t\t\t\t" + currentParamName + " = m_pCall->"+ CUtils.getParameterGetValueMethodName(currentParaType, false)+"(\""+currentType.getParamName()+"\", 0);\n");//damitha
   				}
   				else{
  -				   writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_"+currentParaType+", (void*) Axis_Create_"+currentParaType+", (void*) Axis_Delete_"+currentParaType+",\""+currentType.getParamName()+"\", 0);\n"); 
  +				   writer.write("\t\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_"+currentParaType+", (void*) Axis_Create_"+currentParaType+", (void*) Axis_Delete_"+currentParaType+",\""+currentType.getParamName()+"\", 0);\n"); //damitha
   				}				
   			}	
  -			writer.write("\t\t}\n");
  -			writer.write("\t}\n\tm_pCall->unInitialize();\n");	
  +			writer.write("\t\t\t}\n");//damitha
  +			writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");//damitha
   		}
   		else if (returntype == null){
  -			writer.write("\t\t\t/*not successful*/\n\t\t}\n");
  -			writer.write("\t}\n\tm_pCall->unInitialize();\n");
  +			writer.write("\t\t\t/*not successful*/\n\t\t}\n");//damitha
  +			writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");//damitha
   		}
   		else if (returntypeisarray){
   			QName qname = WrapperUtils.getArrayType(retType).getName();
   			String containedType = null;
   			if (CUtils.isSimpleType(qname)){
   				containedType = CUtils.getclass4qname(qname);
  -				writer.write("\t\t\tRetArray = ("+outparamTypeName+"&)m_pCall->getBasicArray("+CUtils.getXSDTypeForBasicType(containedType)+", \""+returntype.getParamName()+"\", 0);\n\t\t}\n");
  +				writer.write("\t\t\t\tRetArray = ("+outparamTypeName+"&)m_pCall->getBasicArray("+CUtils.getXSDTypeForBasicType(containedType)+", \""+returntype.getParamName()+"\", 0);\n\t\t\t}\n");//damitha
   			}
   			else{
   				containedType = qname.getLocalPart();
  -				writer.write("\t\t\tRetArray = ("+outparamTypeName+"&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_"+containedType);
  -				writer.write(", (void*) Axis_Create_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+returntype.getParamName()+"\", Axis_URI_"+containedType+");\n\t\t}\n");
  +				writer.write("\t\t\t\tRetArray = ("+outparamTypeName+"&)m_pCall->getCmplxArray((void*) Axis_DeSerialize_"+containedType);//damitha
  +				writer.write(", (void*) Axis_Create_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+returntype.getParamName()+"\", Axis_URI_"+containedType+");\n\t\t\t}\n");//damitha
   			}
  -			writer.write("\t}\n\tm_pCall->unInitialize();\n");
  -			writer.write("\treturn RetArray;\n");
  +			writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");//damitha
  +			writer.write("\t\treturn RetArray;\n");//damitha
   		}
   		else if(returntypeissimple){
  -			writer.write("\t\t\tRet = m_pCall->"+ CUtils.getParameterGetValueMethodName(outparamTypeName, false)+"(\""+returntype.getParamName()+"\", 0);\n\t\t}\n");
  -			writer.write("\t}\n\tm_pCall->unInitialize();\n");
  -			writer.write("\treturn Ret;\n");
  +			writer.write("\t\t\t\tRet = m_pCall->"+ CUtils.getParameterGetValueMethodName(outparamTypeName, false)+"(\""+returntype.getParamName()+"\", 0);\n\t\t\t}\n");//damitha
  +			writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");//damitha
  +			writer.write("\t\treturn Ret;\n");//damitha
   		}
   		else{
   			outparamTypeName = returntype.getLangName();//need to have complex type name without *
  -			writer.write("\t\t\tpReturn = ("+outparamTypeName+"*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_"+outparamTypeName+", (void*) Axis_Create_"+outparamTypeName+", (void*) Axis_Delete_"+outparamTypeName+",\""+returntype.getParamName()+"\", 0);\n\t\t}\n"); 
  -			writer.write("\t}\n\tm_pCall->unInitialize();\n");
  -			writer.write("\treturn pReturn;\n");						
  -		}
  +			writer.write("\t\t\t\tpReturn = ("+outparamTypeName+"*)m_pCall->getCmplxObject((void*) Axis_DeSerialize_"+outparamTypeName+", (void*) Axis_Create_"+outparamTypeName+", (void*) Axis_Delete_"+outparamTypeName+",\""+returntype.getParamName()+"\", 0);\n\t\t}\n");//damitha
  +			writer.write("\t\t}\n\t\tm_pCall->unInitialize();\n");//damitha
  +			writer.write("\t\treturn pReturn;\n");//damitha
  +
  +		}
  +		//added by nithya
  +		System.out.println("Fault message ............................"+minfo.getFaultMessage());
  +		writer.write("\t}\n");//damitha
  +		writer.write("\tcatch(AxisException& e)\n\t{\n");//damitha
  +		writer.write("\t\tif (AXIS_SUCCESS == m_pCall->checkFault(\"Fault\",\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\" ))");//damitha
  +		writer.write("//Exception handling code goes here\n");
  +		writer.write("\t\t{\n");//damitha
  +		writer.write("\t\t\tcFaultcode = m_pCall->getElementAsString(\"faultcode\", 0);\n");//damitha
  +                writer.write("\t\t\tcFaultstring = m_pCall->getElementAsString(\"faultstring\", 0);\n");//damitha
  +		writer.write("\t\t\tcFaultactor = m_pCall->getElementAsString(\"faultactor\", 0);\n");//damitha
  +              
  +		//writer.write("\t\t\tif(0 != strcmp(\"service_exception\", cFaultstring))\n");//damitha
  +                //writer.write("\t\t\t{\n");//damitha
  +		//writer.write("\t\t\t\t  cFaultdetail = m_pCall->getElementAsString(\"faultdetail\", 0);\n");//damitha
  +		//writer.write("\t\t\t\t  throw AxisException(cFaultdetail);\n");//damitha
  +		//writer.write("\t\t\t}\n");//damitha
  +		//writer.write("\t\t\telse\n");//damitha
  +		//writer.write("\t\t\t{\n");//damitha
  +		//writer.write("\t\t\t\tif (AXIS_SUCCESS == m_pCall->checkFault(\"faultdetail\",\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\"))\n");//damitha
  +
  +//		to get fault info  		
  +		Iterator paramsFault = minfo.getFaultType().iterator();
  +		String faultInfoName =null;
  +		String faultType =null;	 
  +		String langName =null;
  +		String paramName =null;
  +		if (paramsFault.hasNext()){
  +			FaultInfo info = (FaultInfo)paramsFault.next();
  +			faultInfoName =info.getFaultInfo();
  +	      	System.out.println(info.getFaultInfo()+"FAult info %%%%%%%%%%%"); 
  +			ArrayList paramInfo =info.getParams();
  +			for (int i= 0; i < paramInfo.size(); i++) {
  +				System.out.println("Info ~~~~~~~");
  +				ParameterInfo par =(ParameterInfo)paramInfo.get(i);                                                                                                                                                           
  +				paramName  = par.getParamName();
  +				langName =par.getLangName();
  +				System.out.println(par.getLangName()+"get Language name +++++++++++ ");
  +				System.out.println(par.getParamName()+"to get the parameter name ^^^^^^^^^^^");
  +				faultType = WrapperUtils.getClassNameFromParamInfoConsideringArrays(par,wscontext);
  +				System.out.println(faultType+" Fault type  ..............   ");
  +				writeExceptions(faultType,faultInfoName,paramName,langName);
  +				}
  +			}
  +		writer.write("\t\t\telse\n\t\t\t{\n");//damitha
  +
  +		writer.write("\t\t\t\t  cFaultdetail = m_pCall->getElementAsString(\"faultdetail\", 0);\n");//damitha
  +		writer.write("\t\t\t\t  throw AxisException(cFaultdetail);\n");//damitha
  +		writer.write("\t\t\t}\n");//damitha
  +
  +		writer.write("\t\t}\n");//damitha
  +		writer.write("\t\telse throw;\n");//damitha
  +		writer.write("\t}\n");//damitha
  +		//writer.write("m_pCall->unInitialize();\n");//damitha
  +		//writer.write("return Ret;\n");//damitha
  +	
  +		//end of nithya add
  +		
   		//write end of method
   		writer.write("}\n");
   	}
  +	
  +	/* written by NIthya to get the expections */
  +	private void writeExceptions(String faulttype,String faultInfoName,String paramName,String langName) throws WrapperFault{
  +		try{
  +			    
  +		        //writer.write("else\n");//damitha
  +		        writer.write("\t\t\tif(0 == strcmp(\""+langName+"\", cFaultstring))\n");//damitha
  +		        writer.write("\t\t\t{\n");//damitha
  +		        writer.write("\t\t\t\tif (AXIS_SUCCESS == m_pCall->checkFault(\"faultdetail\",\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\"))\n");//damitha
  +                        writer.write("\t\t\t\t{\n");//damitha added
  +			writer.write("\t\t\t\t\t"+faulttype+" pFaultDetail = NULL;\n");//damitha
  +			writer.write("\t\t\t\t\tpFaultDetail = ("+faulttype+")m_pCall->\n");//damitha
  +                        writer.write("\t\t\t\t\t\tgetCmplxObject((void*) Axis_DeSerialize_"+langName+",\n");//damitha
  +                        writer.write("\t\t\t\t\t\t(void*) Axis_Create_"+langName+",\n");//damitha
  +                        writer.write("\t\t\t\t\t\t(void*) Axis_Delete_"+langName+",\""+paramName+"\", 0);\n");//damitha
  +			//writer.write("char* temp = pFaultDetail->varString;");//damitha
  +                        writer.write("\t\t\t\t\t/*User code to handle the struct can be inserted here*/\n");//damitha
  +			writer.write("\t\t\t\t\tm_pCall->unInitialize();\n");//damitha
  +			writer.write("\t\t\t\t\tthrow Axis"+faultInfoName+"Exception(pFaultDetail);\n");//damitha
  +			writer.write("\t\t\t\t}\n");//damitha
  +			writer.write("\t\t\t}\n");//damitha
  +		}		
  +		catch (IOException e) {
  +					throw new WrapperFault(e);
  +				}
  +	}
  +	
   	/* (non-Javadoc)
   	 * @see org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter#writeGlobalCodes()
   	 */
  
  
  
  1.8       +1 -8      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java
  
  Index: HeaderFileWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/HeaderFileWriter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HeaderFileWriter.java	27 May 2004 09:34:34 -0000	1.7
  +++ HeaderFileWriter.java	7 Jun 2004 10:50:18 -0000	1.8
  @@ -18,15 +18,8 @@
   /**
    * @author Srinath Perera(hemapani@openource.lk)
    * @author Susantha Kumara(susantha@opensource.lk, skumara@virtusa.com)
  - * @author Samisa Abeysinghe (sabeysinghe@virtusa.com)
    */
   
  -/*
  - * Revision 1.1  2004/05/26 samisa
  - * Added Stub base class into code generation
  - */
  -
  -
   package org.apache.axis.wsdl.wsdl2ws.cpp;
   
   import java.io.BufferedWriter;
  @@ -69,7 +62,7 @@
   		}
   
   	}
  -	abstract protected String getExtendsPart();//{return " ";}
  +	protected String getExtendsPart(){return " ";}
   	protected abstract File getFilePath()throws WrapperFault;
   	protected abstract String getFileType(); //will return "Param", "Server" or "Client"
   
  
  
  
  1.15      +1 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java
  
  Index: ParmHeaderFileWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ParmHeaderFileWriter.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- ParmHeaderFileWriter.java	9 Apr 2004 08:49:33 -0000	1.14
  +++ ParmHeaderFileWriter.java	7 Jun 2004 10:50:18 -0000	1.15
  @@ -83,7 +83,7 @@
   	   
   	protected void writeDistructors() throws WrapperFault {
   		try{
  -			writer.write("\t~"+classname+"();\n");
  +			writer.write("\tvirtual ~"+classname+"();\n");//damitha added virtual
   		} catch (IOException e) {
   			 throw new WrapperFault(e);
   		}
  
  
  
  1.17      +0 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java
  
  Index: ServiceHeaderWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceHeaderWriter.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ServiceHeaderWriter.java	27 May 2004 09:34:34 -0000	1.16
  +++ ServiceHeaderWriter.java	7 Jun 2004 10:50:18 -0000	1.17
  @@ -183,7 +183,5 @@
   	{
   		return "ServerSkeleton";	
   	}
  -	
  -	protected String getExtendsPart(){return " ";}
   }
   
  
  
  
  1.11      +3 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java
  
  Index: ServiceWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/ServiceWriter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ServiceWriter.java	9 Apr 2004 08:49:33 -0000	1.10
  +++ ServiceWriter.java	7 Jun 2004 10:50:18 -0000	1.11
  @@ -131,7 +131,8 @@
   						writer.write(", AXIS_OUT_PARAM "+WrapperUtils.getClassNameFromParamInfoConsideringArrays(nparam,wscontext)+" *OutValue"+j);
   					}
   				}
  -				writer.write(")\n{\n}\n");
  +				writer.write(")  \n{\n}\n");
  +				
   			}
   		}catch (Exception e) {
   			e.printStackTrace();
  @@ -139,6 +140,7 @@
   		}	
   	}
   
  +   
   	/* (non-Javadoc)
   	 * @see org.apache.axis.wsdl.wsdl2ws.cpp.HeaderFileWriter#writePreprocssorStatements()
   	 */
  
  
  
  1.24      +24 -21    ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java
  
  Index: WrapWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/WrapWriter.java,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- WrapWriter.java	7 Jun 2004 07:13:04 -0000	1.23
  +++ WrapWriter.java	7 Jun 2004 10:50:18 -0000	1.24
  @@ -259,9 +259,10 @@
   				writer.write("\t"+WrapperUtils.getClassNameFromParamInfoConsideringArrays((ParameterInfo)paramsC.get(i),wscontext)+" out"+i+";\n");
   			}
   		}
  +                writer.write("\ttry\n\t{\n");
   		if(returntype != null){				
   			/* Invoke the service when return type not void */
  -			writer.write("\t"+outparamTypeName+" ret = "+"pWs->"+methodName+"(");
  +			writer.write("\t\t"+outparamTypeName+" ret = "+"pWs->"+methodName+"(");
   			if (0<paramsB.size()){
   				for (int i = 0; i <  paramsB.size() - 1; i++) {
   					writer.write("v" + i + ",");
  @@ -271,27 +272,27 @@
   			writer.write(");\n");
   			/* set the result */
   			if (returntypeissimple){
  -				writer.write("\treturn pIWSSZ->addOutputParam(\""+methodName+"Return\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamTypeName)+");\n");
  +				writer.write("\t\treturn pIWSSZ->addOutputParam(\""+methodName+"Return\", (void*)&ret, "+CUtils.getXSDTypeForBasicType(outparamTypeName)+");\n");
   			}else if(returntypeisarray){
   				QName qname = WrapperUtils.getArrayType(retType).getName();
   				String containedType = null;
   				if (CUtils.isSimpleType(qname)){
   					containedType = CUtils.getclass4qname(qname);
  -					writer.write("\treturn pIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+methodName+"Return\");\n");
  +					writer.write("\t\treturn pIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&ret),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+methodName+"Return\");\n");
   				}
   				else{
   					containedType = qname.getLocalPart();
  -					writer.write("\treturn pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&ret),"+ 
  +					writer.write("\t\treturn pIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&ret),"+ 
   					"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+methodName+"Return\", Axis_URI_"+containedType+");\n");
   				}
   			}
   			else{
   				//complex type
   				outparamTypeName = returntype.getLangName();//need to have complex type name without *
  -				writer.write("\treturn pIWSSZ->addOutputCmplxParam(ret, (void*)Axis_Serialize_"+outparamTypeName+", (void*)Axis_Delete_"+outparamTypeName+", \""+methodName+"Return\", Axis_URI_"+outparamTypeName+");\n");
  +				writer.write("\t\treturn pIWSSZ->addOutputCmplxParam(ret, (void*)Axis_Serialize_"+outparamTypeName+", (void*)Axis_Delete_"+outparamTypeName+", \""+methodName+"Return\", Axis_URI_"+outparamTypeName+");\n");
   			}
   		}else if (isAllTreatedAsOutParams){
  -			writer.write("\tpWs->" + methodName + "(");
  +			writer.write("\t\tpWs->" + methodName + "(");
   			if (0<paramsB.size()){
   				for (int i = 0; i <  paramsB.size(); i++) {
   					writer.write("v" + i + ",");
  @@ -317,29 +318,29 @@
   				returntypeissimple = CUtils.isSimpleType(outparamType);
   				returnParamName = ((ParameterInfo)paramsC.get(i)).getParamName();
   				if (returntypeissimple){
  -					writer.write("\tpIWSSZ->addOutputParam(\""+returnParamName+"\", (void*)&out"+i+", "+CUtils.getXSDTypeForBasicType(outparamType)+");\n");
  +					writer.write("\t\tpIWSSZ->addOutputParam(\""+returnParamName+"\", (void*)&out"+i+", "+CUtils.getXSDTypeForBasicType(outparamType)+");\n");
   				}else if(returntypeisarray){
   					QName qname = WrapperUtils.getArrayType(retType).getName();
   					String containedType = null;
   					if (CUtils.isSimpleType(qname)){
   						containedType = CUtils.getclass4qname(qname);
  -						writer.write("\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"+i+"),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+returnParamName+"\");\n");
  +						writer.write("\t\tpIWSSZ->addOutputBasicArrayParam((Axis_Array*)(&out"+i+"),"+CUtils.getXSDTypeForBasicType(containedType)+", \""+returnParamName+"\");\n");
   					}
   					else{
   						containedType = qname.getLocalPart();
  -						writer.write("\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"+i+"),"+ 
  +						writer.write("\t\tpIWSSZ->addOutputCmplxArrayParam((Axis_Array*)(&out"+i+"),"+ 
   						"(void*) Axis_Serialize_"+containedType+", (void*) Axis_Delete_"+containedType+", (void*) Axis_GetSize_"+containedType+", \""+returnParamName+"\", Axis_URI_"+containedType+");\n");
   					}
   				}
   				else{
   					//complex type
  -					writer.write("\tpIWSSZ->addOutputCmplxParam(out"+i+", (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+", \""+returnParamName+"\", Axis_URI_"+outparamType+");\n");
  +					writer.write("\t\tpIWSSZ->addOutputCmplxParam(out"+i+", (void*)Axis_Serialize_"+outparamType+", (void*)Axis_Delete_"+outparamType+", \""+returnParamName+"\", Axis_URI_"+outparamType+");\n");
   				}
   			}			
   			writer.write("\treturn AXIS_SUCCESS;\n");
   		}else{//method does not return anything
   			/* Invoke the service when return type is void */
  -	 		writer.write("\tpWs->" + methodName + "(");
  +	 		writer.write("\t\tpWs->" + methodName + "(");
   			if (0<paramsB.size()){
   				for (int i = 0; i <  paramsB.size() - 1; i++) {
   					writer.write("v" + i + ",");
  @@ -349,7 +350,7 @@
   			writer.write(");\n");
   			writer.write("\treturn AXIS_SUCCESS;\n");
   		}
  -                //--------
  +//--------
                   Iterator paramsFault = minfo.getFaultType().iterator();
                   String faultInfoName =null;
                   String faultType =null;
  @@ -373,29 +374,32 @@
                                   writeExceptions(faultType,faultInfoName,paramName,langName);
                           }
                    }
  -                                                                                                                             
  -                                                                                                                             
  -                                                                                                                             
  +
  +
  +
   //--------
   		//write end of method
   		writer.write("}\n");
   	}
  +	/* (non-Javadoc)
  +	 * @see org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter#writeGlobalCodes()
  +	 */
   
           private void writeExceptions(String faulttype,String faultInfoName,String paramName,String langName) throws WrapperFault{
                   try{
  -                                                                                                                             
  +
                           writer.write("\tcatch(Axis"+langName+"Exception& e)\n");
                           writer.write("\t{\n");
                           //writer.write("\t\tif(0 == strcmp(\""+langName+"\", cFaultstring))\n");//damitha
                           writer.write("\t\tpIWSSZ->createSoapFault(\""+langName+"\", \""+wscontext.getWrapInfo().getTargetNameSpaceOfWSDL()+"\");\n");
  -                                                                                                                             
  +                      
                           //writer.write("\t\t{\n");//damitha
                           //writer.write("\t\t\tif (AXIS_SUCCESS == m_pCall->checkFault(\"faultdetail\",\""+wscontext.getWrapInfo().getTargetEndpointURI()+"\"))\n");//damitha
                           //writer.write("\t\t\t{\n");//damitha added
                           writer.write("\t\t"+faulttype+" pObjFault = new "+langName+"();\n");//damitha
                           writer.write("\t\t/*User may write code here to fill the struct*/\n");
                           writer.write("\t\tif (pObjFault)\n");
  -                                                                                                                             
  +                        
                           writer.write("\t\t\tpIWSSZ->addFaultDetail(pObjFault, (void*) Axis_Serialize_"+langName+",\n");//damitha
                           writer.write("\t\t\t(void*) Axis_Delete_"+langName+",\""+langName+"\", 0);\n");//damitha
                           writer.write("\t\tthrow;\n");//damitha
  @@ -407,9 +411,8 @@
                                   }
           }
   
  -	/* (non-Javadoc)
  -	 * @see org.apache.axis.wsdl.wsdl2ws.cpp.CPPClassWriter#writeGlobalCodes()
  -	 */
  +
  +        
   	protected void writeGlobalCodes() throws WrapperFault {
   		Iterator types = wscontext.getTypemap().getTypes().iterator();
   		HashSet typeSet = new HashSet();
  
  
  
  1.4       +5 -0      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/FaultInfo.java
  
  Index: FaultInfo.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/FaultInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FaultInfo.java	9 Apr 2004 08:49:34 -0000	1.3
  +++ FaultInfo.java	7 Jun 2004 10:50:18 -0000	1.4
  @@ -29,11 +29,16 @@
   		this.name = name; 	
   	}
   	
  +	public String getFaultInfo(){
  +		return this.name;
  +	}
  +	
   	public void addParam(ParameterInfo paraminfo){
   		params.add(paraminfo);
   	}
   	
   	public ArrayList getParams(){
  +		System.out.println(params+" Parameter values ..............in fault info");
   		return params;
   	}
   
  
  
  
  1.6       +29 -4     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java
  
  Index: MethodInfo.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/MethodInfo.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MethodInfo.java	9 Apr 2004 08:49:34 -0000	1.5
  +++ MethodInfo.java	7 Jun 2004 10:50:18 -0000	1.6
  @@ -38,17 +38,21 @@
       private String outputUse;
       private QName inputMessage;
       private QName outputMessage;
  +	private QName faultMessage;
  +	private ArrayList faultType;
   
       public MethodInfo() {
           this.methodname = null;
           inputParameters = new ArrayList(101);
   		outputParameters = new ArrayList(101);
  +		faultType=new ArrayList(102);
       }
   
       public MethodInfo(String methodname) {
           this.methodname = methodname;
           inputParameters = new ArrayList(101);
   		outputParameters = new ArrayList(101);
  +		faultType=new ArrayList(102);
       }
   
       public String getMethodname() {
  @@ -66,15 +70,20 @@
       public Collection getInputParameterTypes() {
           return this.inputParameters;
       }
  -
  +     //	added by nithya
  +	 public Collection getFaultType() {
  +			 return this.faultType;
  +	 }
  +     // added by nithya
  +	 public void addFaultType(FaultInfo faultType) {
  +	 		 this.faultType.add(faultType);
  +	}
       public void addInputParameter(ParameterInfo type) {
           this.inputParameters.add(type);
       }
  -
   	public Collection getOutputParameterTypes() {
   		return this.outputParameters;
   	}
  -
   	public void addOutputParameter(ParameterInfo type) {
   		this.outputParameters.add(type);
   	}
  @@ -181,8 +190,24 @@
   	 * Sets the ouputMessage.
   	 * @param ouputMessage The ouputMessage to set
   	 */
  -	public void setOutputMessage(QName ouputMessage) {
  +	public void setOutputMessage(QName ouputMessage) {		
   		this.outputMessage = ouputMessage;
   	}
   
  +	//added by nithya
  +	/**
  +	 * @return QName
  +	 */
  +	public QName getFaultMessage() {		
  +		return faultMessage;
  +	}	
  +	/**
  +	 * Sets the faultMessage.
  +	 * @param faultMessage The faultMessage to set
  +	 */
  +	public void setFaultMessage(QName faultMessage) {
  +		System.out.print(faultMessage);
  +		this.faultMessage = faultMessage;
  +	}
  +	//end of nithya
   }