axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info ParameterInfo.java
Date Mon, 23 Aug 2004 00:45:32 GMT
samisa      2004/08/22 17:45:32

  Modified:    c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal
                        BeanParamWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal
                        BeanParamWriter.java ClientStubWriter.java
               c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info
                        ParameterInfo.java
  Log:
  Solved ANON_TOKEN ('>') problem using substring logic
  
  Revision  Changes    Path
  1.28      +3 -1      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/c/literal/BeanParamWriter.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- BeanParamWriter.java	16 Aug 2004 09:22:49 -0000	1.27
  +++ BeanParamWriter.java	23 Aug 2004 00:45:31 -0000	1.28
  @@ -149,7 +149,9 @@
   				}
   			}
   			else if (attribs[i].isSimpleType()){
  -				writer.write("\tpSZ->_functions->serializeAsElement(pSZ->_object, \""+attribs[i].getElementName().getLocalPart()+"\",
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +				//Samisa 22/08/2004
  +				writer.write("\tpSZ->_functions->serializeAsElement(pSZ->_object, \""+attribs[i].getElementNameAsString()+"\",
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +				//Samisa
   			}else{
   				//if complex type
   				String elm = attribs[i].getParamName();
  
  
  
  1.23      +8 -2      ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java
  
  Index: BeanParamWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/BeanParamWriter.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- BeanParamWriter.java	20 Aug 2004 13:03:39 -0000	1.22
  +++ BeanParamWriter.java	23 Aug 2004 00:45:31 -0000	1.23
  @@ -160,7 +160,10 @@
   				}
   			}
   			else if (attribs[i].isSimpleType()){
  -				writer.write("\tpSZ->serializeAsElement(\""+attribs[i].getElementName().getLocalPart()+"\",
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
			
  +				//writer.write("\tpSZ->serializeAsElement(\""+attribs[i].getElementName().getLocalPart()+"\",
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +				//Samisa 22/08/2004
  +				writer.write("\tpSZ->serializeAsElement(\""+attribs[i].getElementNameAsString()+"\",
(void*)&(param->"+attribs[i].getParamName()+"), "+ CUtils.getXSDTypeForBasicType(attribs[i].getTypeName())+");\n");
  +				//Samisa
   			}else{
   				//if complex type
   				String elm = attribs[i].getParamName();
  @@ -212,7 +215,10 @@
   				}
   			}else if(attribs[i].isSimpleType()){
   				//TODO handle optional attributes
  -				writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+(attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementName().getLocalPart())+"\",0);\n");
  +				//Samisa
  +				//writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+(attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementName().getLocalPart())+"\",0);\n");
  +				writer.write("\tparam->"+attribs[i].getParamName()+" = pIWSDZ->"+CUtils.getParameterGetValueMethodName(attribs[i].getTypeName(),
attribs[i].isAttribute())+"(\""+(attribs[i].isAttribute() ? attribs[i].getParamName():attribs[i].getElementNameAsString())+"\",0);\n");
  +				//Samisa
   			} else{
   				//if complex type
   				writer.write("\tparam->"+attribs[i].getParamName()+" = ("+attribs[i].getTypeName()+"*)pIWSDZ->getCmplxObject((void*)Axis_DeSerialize_"+attribs[i].getTypeName()+
  
  
  
  1.38      +12 -3     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java
  
  Index: ClientStubWriter.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ClientStubWriter.java,v
  retrieving revision 1.37
  retrieving revision 1.38
  diff -u -r1.37 -r1.38
  --- ClientStubWriter.java	16 Aug 2004 09:22:52 -0000	1.37
  +++ ClientStubWriter.java	23 Aug 2004 00:45:31 -0000	1.38
  @@ -355,7 +355,10 @@
   				 }
   				 else
   				 {
  -					String parameterName = ((ParameterInfo)paramsB.get(i)).getElementName().getLocalPart();
  +					//String parameterName = ((ParameterInfo)paramsB.get(i)).getElementName().getLocalPart();
  +					//Samisa 22/08/2004
  +					String parameterName = ((ParameterInfo)paramsB.get(i)).getElementNameAsString();
  +					//Samisa
   					String namespace = ((ParameterInfo)paramsB.get(i)).getElementName().getNamespaceURI();
   					int	stringLength = 8 + 1 + parameterName.length() + 1; 
   					 
  @@ -475,7 +478,10 @@
   					//for anyTtype 
   					writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getAnyObject();\n");
   				}else{
  -				   writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+currentParaType+", (void*) Axis_Create_"+currentParaType+", (void*) Axis_Delete_"+currentParaType+",\""+currentType.getElementName().getLocalPart()+"\",
0);\n"); 
  +				   //writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+currentParaType+", (void*) Axis_Create_"+currentParaType+", (void*) Axis_Delete_"+currentParaType+",\""+currentType.getElementName().getLocalPart()+"\",
0);\n"); 
  +				   //Samisa 22/08/2004
  +				   writer.write("\t\t\t" + currentParamName + " = ("+currentParaType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+currentParaType+", (void*) Axis_Create_"+currentParaType+", (void*) Axis_Delete_"+currentParaType+",\""+currentType.getElementNameAsString()+"\",
0);\n"); 
  +				   //Samisa
   				}				
   			}	
   			writer.write("\t\t}\n");
  @@ -511,7 +517,10 @@
   			writer.write("\t}\n\tm_pCall->unInitialize();\n");
   			writer.write("\treturn pReturn;\n");						
   		}else{
  -			writer.write("\t\t\tpReturn = ("+outparamType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+",\""+returntype.getElementName().getLocalPart()+"\",
0);\n\t\t}\n"); 
  +			//writer.write("\t\t\tpReturn = ("+outparamType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+",\""+returntype.getElementName().getLocalPart()+"\",
0);\n\t\t}\n"); 
  +			//Samisa 22/08/2004
  +			writer.write("\t\t\tpReturn = ("+outparamType+"*)m_pCall->getCmplxObject((void*)
Axis_DeSerialize_"+outparamType+", (void*) Axis_Create_"+outparamType+", (void*) Axis_Delete_"+outparamType+",\""+returntype.getElementNameAsString()+"\",
0);\n\t\t}\n"); 
  +			//Samisa
   			writer.write("\t}\n\tm_pCall->unInitialize();\n");
   			writer.write("\treturn pReturn;\n");						
   		}
  
  
  
  1.9       +21 -0     ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java
  
  Index: ParameterInfo.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info/ParameterInfo.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ParameterInfo.java	10 Aug 2004 14:22:29 -0000	1.8
  +++ ParameterInfo.java	23 Aug 2004 00:45:31 -0000	1.9
  @@ -17,6 +17,8 @@
   package org.apache.axis.wsdl.wsdl2ws.info;
   
   import javax.xml.namespace.QName;
  +import org.apache.axis.wsdl.symbolTable.SymbolTable;
  +import org.apache.axis.wsdl.wsdl2ws.WrapperConstants;
   
   /**
    * this class represents Parameter(message in the wsdl) 
  @@ -58,6 +60,13 @@
   	}
   
       public void setParamName(String paramName) {
  +        //Samisa: 21/08/2004
  +        if (paramName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1 )
  +        {
  +            paramName = paramName.substring(paramName.lastIndexOf(SymbolTable.ANON_TOKEN)+1,paramName.length());
  +        }
  +        paramName = TypeMap.resoleveWSDL2LanguageNameClashes(paramName, WrapperConstants.LANGUAGE_CPP);
  +        //Samisa
           this.attribName = paramName;
       }
   
  @@ -80,6 +89,18 @@
       public QName getElementName() {
           return elementName;
       }
  +    //Samisa 21/08/2004
  +    public String getElementNameAsString() {
  +        String paramName = elementName.getLocalPart();
  +        if (paramName.lastIndexOf(SymbolTable.ANON_TOKEN) > 1 )
  +        {
  +            paramName = paramName.substring(paramName.lastIndexOf(SymbolTable.ANON_TOKEN)+1,paramName.length());
  +        }
  +        paramName = TypeMap.resoleveWSDL2LanguageNameClashes(paramName, WrapperConstants.LANGUAGE_CPP);
  +	return paramName;
  +
  +    }
  +    //Samisa
   
       /**
        * @param name
  
  
  

Mime
View raw message