Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 69963 invoked from network); 20 Aug 2004 13:03:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Aug 2004 13:03:48 -0000 Received: (qmail 84813 invoked by uid 500); 20 Aug 2004 13:03:44 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 84701 invoked by uid 500); 20 Aug 2004 13:03:43 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 84672 invoked by uid 99); 20 Aug 2004 13:03:42 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Fri, 20 Aug 2004 06:03:41 -0700 Received: (qmail 69847 invoked by uid 1682); 20 Aug 2004 13:03:40 -0000 Date: 20 Aug 2004 13:03:40 -0000 Message-ID: <20040820130340.69846.qmail@minotaur.apache.org> From: susantha@apache.org To: ws-axis-cvs@apache.org Subject: cvs commit: ws-axis/c/vc/soap SoapLibrary.dsp X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N susantha 2004/08/20 06:03:40 Modified: c/include/axis/server IWrapperSoapDeSerializer.h IWrapperSoapSerializer.h c/src/common AxisTime.cpp AxisTime.h BasicTypeSerializer.cpp BasicTypeSerializer.h c/src/soap SoapDeSerializer.cpp SoapDeSerializer.h SoapSerializer.cpp SoapSerializer.h c/src/wsdl/.externalToolBuilders Jar_Builder.launch c/src/wsdl/org/apache/axis/wsdl/symbolTable SchemaUtils.java c/src/wsdl/org/apache/axis/wsdl/wsdl2ws ParamWriter.java WSDL2Ws.java c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal BeanParamWriter.java ParmHeaderFileWriter.java c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/info Type.java c/tests/server/exceptionTest/gen_src MathOpsWrapper.cpp c/vc/common CommonLibrary.dsp c/vc/soap SoapLibrary.dsp Log: added the support for complexTypes with simpleContent 1. WSDL2Ws tool additions 2. Serializer and Deserializer code additions Revision Changes Path 1.26 +6 -0 ws-axis/c/include/axis/server/IWrapperSoapDeSerializer.h Index: IWrapperSoapDeSerializer.h =================================================================== RCS file: /home/cvs/ws-axis/c/include/axis/server/IWrapperSoapDeSerializer.h,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- IWrapperSoapDeSerializer.h 6 Aug 2004 14:44:20 -0000 1.25 +++ IWrapperSoapDeSerializer.h 20 Aug 2004 13:03:37 -0000 1.26 @@ -139,6 +139,7 @@ const AxisChar* pNamespace); int (AXISCALL* getStatus)(void* pObj); AnyType* (AXISCALL* getAnyObject)(void* pObj); + void (AXISCALL* getChardataAs)(void* pObj, void* pValue, XSDTYPE type); } IWrapperSoapDeSerializerFunctions; typedef struct { @@ -286,6 +287,7 @@ virtual int getVersion()=0; virtual int getHeader()=0; virtual AnyType* AXISCALL getAnyObject()=0; + virtual void getChardataAs(void* pValue, XSDTYPE type)=0; /* following stuff is needed to provide the interface for C web services */ public: @@ -494,6 +496,9 @@ { return ((IWrapperSoapDeSerializer*)pObj)->getStatus();}; static AnyType* AXISCALL s_GetAnyObject(void* pObj) { return ((IWrapperSoapDeSerializer*)pObj)->getAnyObject();}; + static void AXISCALL s_GetChardataAs(void* pObj, void* pValue, XSDTYPE type) + { ((IWrapperSoapDeSerializer*)pObj)->getChardataAs(pValue, type);}; + static void s_Initialize() { @@ -549,6 +554,7 @@ ms_VFtable.getAttributeAsDuration = s_GetAttributeAsDuration; ms_VFtable.getStatus = s_GetStatus; ms_VFtable.getAnyObject = s_GetAnyObject; + ms_VFtable.getChardataAs = s_GetChardataAs; } }; #endif 1.21 +13 -1 ws-axis/c/include/axis/server/IWrapperSoapSerializer.h Index: IWrapperSoapSerializer.h =================================================================== RCS file: /home/cvs/ws-axis/c/include/axis/server/IWrapperSoapSerializer.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- IWrapperSoapSerializer.h 6 Aug 2004 14:44:20 -0000 1.20 +++ IWrapperSoapSerializer.h 20 Aug 2004 13:03:37 -0000 1.21 @@ -86,7 +86,10 @@ int (AXISCALL* addOutputAnyObject)(void* pObj, AnyType* pAnyObject); - int (AXISCALL* serializeAnyObject)(void* pObj, AnyType* pAnyObject); + int (AXISCALL* serializeAnyObject)(void* pObj, AnyType* pAnyObject); + + int (AXISCALL* serializeAsChardata)(void* pObj, void* pValue, XSDTYPE type); + }IWrapperSoapSerializerFunctions; typedef struct @@ -197,6 +200,8 @@ virtual int serializeAnyObject(AnyType* pAnyObject)=0; + virtual int serializeAsChardata(void* pValue, XSDTYPE type)=0; + /* following stuff is needed to provide the interface for C web services */ public: static IWrapperSoapSerializerFunctions ms_VFtable; @@ -295,6 +300,12 @@ return ((IWrapperSoapSerializer*)pObj)->serializeAnyObject(pAnyObject); } + static int AXISCALL s_SerializeAsChardata(void* pObj, + void* pValue, XSDTYPE type) + { + return ((IWrapperSoapSerializer*)pObj)->serializeAsChardata(pValue, type); + } + static void s_Initialize() { ms_VFtable.createSoapMethod = s_CreateSoapMethod; @@ -315,6 +326,7 @@ ms_VFtable.serializeEndElementOfType = s_SerializeEndElementOfType; ms_VFtable.addOutputAnyObject = s_AddOutputAnyObject; ms_VFtable.serializeAnyObject = s_SerializeAnyObject; + ms_VFtable.serializeAsChardata = s_SerializeAsChardata; } }; 1.26 +2 -4 ws-axis/c/src/common/AxisTime.cpp Index: AxisTime.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/common/AxisTime.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- AxisTime.cpp 6 Aug 2004 14:44:28 -0000 1.25 +++ AxisTime.cpp 20 Aug 2004 13:03:37 -0000 1.26 @@ -82,8 +82,7 @@ * of the format PnYnMnDTnHnMnS */ -AxisString & AxisTime::serialize (const AxisChar* sName, long lDuration, - XSDTYPE nType) +AxisString & AxisTime::serialize(long lDuration, XSDTYPE nType) { AxisChar buff[4]; strXSDDuration = "P"; @@ -135,8 +134,7 @@ * Serialize the c type tm struct into a xml date string. * The serialized date will represent UTC time */ -AxisString & AxisTime::serialize (const AxisChar* sName, struct tm tValue, - XSDTYPE nType) +AxisString & AxisTime::serialize(struct tm tValue, XSDTYPE nType) { /*formats the output date in the format CCYY-MM-DDThh:mm:ssZ */ switch (nType) 1.9 +2 -3 ws-axis/c/src/common/AxisTime.h Index: AxisTime.h =================================================================== RCS file: /home/cvs/ws-axis/c/src/common/AxisTime.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- AxisTime.h 6 Aug 2004 14:44:28 -0000 1.8 +++ AxisTime.h 20 Aug 2004 13:03:37 -0000 1.9 @@ -61,10 +61,9 @@ void setValue(XSDTYPE type, uParamValue Value); void setType(XSDTYPE m_Type); AxisString getValue(); - AxisString& serialize(const AxisChar* sName, struct tm tValue, - XSDTYPE nType); - AxisString& serialize(const AxisChar* sName, long lDuration, + AxisString& serialize(struct tm tValue, XSDTYPE nType); + AxisString& serialize(long lDuration, XSDTYPE nType); double getDuration(); struct tm getDateTime(); struct tm getDate(); 1.30 +4 -4 ws-axis/c/src/common/BasicTypeSerializer.cpp Index: BasicTypeSerializer.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/common/BasicTypeSerializer.cpp,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- BasicTypeSerializer.cpp 6 Aug 2004 14:44:28 -0000 1.29 +++ BasicTypeSerializer.cpp 20 Aug 2004 13:03:37 -0000 1.30 @@ -90,7 +90,7 @@ m_sSZ += m_Buf; break; case XSD_DURATION: - AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize (pName, + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize( *((long*)(pValue)), type).c_str ()); m_sSZ += m_Buf; break; @@ -134,7 +134,7 @@ case XSD_DATETIME: case XSD_DATE: case XSD_TIME: - AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize (pName, + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_AxisTime.serialize( *((struct tm*)(pValue)), type).c_str ()); m_sSZ += m_Buf; break; @@ -223,7 +223,7 @@ break; case XSD_DURATION: AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", - m_AxisTime.serialize (pName, *((long*)(pValue)), + m_AxisTime.serialize (*((long*)(pValue)), type).c_str ()); m_sSZ += m_Buf; break; @@ -258,7 +258,7 @@ case XSD_DATE: case XSD_TIME: AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", - m_AxisTime.serialize (pName, *((struct tm *) (pValue)), + m_AxisTime.serialize (*((struct tm *) (pValue)), type).c_str ()); m_sSZ += m_Buf; break; 1.18 +1 -0 ws-axis/c/src/common/BasicTypeSerializer.h Index: BasicTypeSerializer.h =================================================================== RCS file: /home/cvs/ws-axis/c/src/common/BasicTypeSerializer.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- BasicTypeSerializer.h 6 Aug 2004 14:44:28 -0000 1.17 +++ BasicTypeSerializer.h 20 Aug 2004 13:03:37 -0000 1.18 @@ -56,6 +56,7 @@ class BasicTypeSerializer { + friend class SoapSerializer; public: BasicTypeSerializer(); virtual ~BasicTypeSerializer(); 1.81 +68 -0 ws-axis/c/src/soap/SoapDeSerializer.cpp Index: SoapDeSerializer.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.cpp,v retrieving revision 1.80 retrieving revision 1.81 diff -u -r1.80 -r1.81 --- SoapDeSerializer.cpp 17 Aug 2004 14:13:50 -0000 1.80 +++ SoapDeSerializer.cpp 20 Aug 2004 13:03:37 -0000 1.81 @@ -3364,4 +3364,72 @@ } } +void SoapDeSerializer::getChardataAs(void* pValue, XSDTYPE type) +{ + if (!m_pNode) m_pNode = m_pParser->next(true); /* charactor node */ + if (m_pNode && (CHARACTER_ELEMENT == m_pNode->m_type)) + { + switch (type) + { + case XSD_INT: + *((int*)(pValue)) = strtod(m_pNode->m_pchNameOrValue, &m_pEndptr); + break; + case XSD_BOOLEAN: + *((int*)(pValue)) = (strcmp(m_pNode->m_pchNameOrValue, "true")==0) ? false_ : true_; + break; + case XSD_UNSIGNEDINT: + *((unsigned int*)(pValue)) = strtoul(m_pNode->m_pchNameOrValue, &m_pEndptr, 10); + break; + case XSD_SHORT: + *((short*)(pValue)) = strtod(m_pNode->m_pchNameOrValue, &m_pEndptr); + break; + case XSD_UNSIGNEDSHORT: + *((unsigned short*)(pValue)) = strtoul(m_pNode->m_pchNameOrValue, &m_pEndptr, 10); + break; + case XSD_BYTE: + *((char*)(pValue)) = strtod(m_pNode->m_pchNameOrValue, &m_pEndptr); + break; + case XSD_UNSIGNEDBYTE: + *((unsigned char*)(pValue)) = strtoul(m_pNode->m_pchNameOrValue, &m_pEndptr, 10); + break; + case XSD_LONG: + case XSD_INTEGER: + *((long*)(pValue)) = strtol(m_pNode->m_pchNameOrValue, &m_pEndptr, 10); + break; + case XSD_DURATION: + *((long*)(pValue)) = AxisTime::deserializeDuration(m_pNode->m_pchNameOrValue, + XSD_DURATION); + break; + case XSD_UNSIGNEDLONG: + *((unsigned long*)(pValue)) = strtoul(m_pNode->m_pchNameOrValue, &m_pEndptr, 10); + break; + case XSD_FLOAT: + *((float*)(pValue)) = strtod(m_pNode->m_pchNameOrValue, &m_pEndptr); + break; + case XSD_DOUBLE: + case XSD_DECIMAL: + *((double*)(pValue)) = strtod(m_pNode->m_pchNameOrValue, &m_pEndptr); + break; + case XSD_STRING: + case XSD_ANYURI: + case XSD_QNAME: + case XSD_NOTATION: + *((char**)(pValue)) = strdup(m_pNode->m_pchNameOrValue); + break; + case XSD_HEXBINARY: + *(xsd__hexBinary*)(pValue) = decodeFromHexBinary(m_pNode->m_pchNameOrValue); + break; + case XSD_BASE64BINARY: + *(xsd__base64Binary*)(pValue) = decodeFromBase64Binary(m_pNode->m_pchNameOrValue); + break; + case XSD_DATETIME: + case XSD_DATE: + case XSD_TIME: + *((struct tm*)(pValue)) = AxisTime::deserialize(m_pNode->m_pchNameOrValue, type); + break; + default:; + } + } +} + AXIS_CPP_NAMESPACE_END 1.19 +2 -0 ws-axis/c/src/soap/SoapDeSerializer.h Index: SoapDeSerializer.h =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapDeSerializer.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- SoapDeSerializer.h 6 Aug 2004 14:44:36 -0000 1.18 +++ SoapDeSerializer.h 20 Aug 2004 13:03:37 -0000 1.19 @@ -207,6 +207,8 @@ int AXISCALL getStatus(){return m_nStatus;}; AnyType* AXISCALL getAnyObject(); void serializeTag(AxisString& xmlStr, const AnyElement* node, AxisString& nsDecls); + void getChardataAs(void* pValue, XSDTYPE type); + private: int getElementForAttributes(const AxisChar* pName, 1.68 +72 -0 ws-axis/c/src/soap/SoapSerializer.cpp Index: SoapSerializer.cpp =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.cpp,v retrieving revision 1.67 retrieving revision 1.68 diff -u -r1.67 -r1.68 --- SoapSerializer.cpp 6 Aug 2004 14:44:37 -0000 1.67 +++ SoapSerializer.cpp 20 Aug 2004 13:03:37 -0000 1.68 @@ -819,4 +819,76 @@ return m_pSoapEnvelope->m_pSoapHeader->getNextHeaderBlock(); } +int SoapSerializer::serializeAsChardata(void* pValue, XSDTYPE type) +{ + const char* pStr = m_Buf; + switch (type) + { + case XSD_INT: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%d", *((int*)(pValue))); + break; + case XSD_BOOLEAN: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", + (*((int*)(pValue)) == false_) ? "false" : "true"); + break; + case XSD_UNSIGNEDINT: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", *((unsigned int*)(pValue))); + break; + case XSD_SHORT: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%d", *((short*)(pValue))); + break; + case XSD_UNSIGNEDSHORT: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", + *((unsigned short*)(pValue))); + break; + case XSD_BYTE: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%d", *((char*)(pValue))); + break; + case XSD_UNSIGNEDBYTE: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", + *((unsigned char*)(pValue))); + break; + case XSD_LONG: + case XSD_INTEGER: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%d", *((long*)(pValue))); + break; + case XSD_DURATION: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_BTSZ.m_AxisTime.serialize( + *((long*)(pValue)), type).c_str ()); + break; + case XSD_UNSIGNEDLONG: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%u", *((unsigned long*)(pValue))); + break; + case XSD_FLOAT: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((float*)(pValue))); + break; + case XSD_DOUBLE: + case XSD_DECIMAL: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((double*)(pValue))); + break; + case XSD_STRING: + case XSD_ANYURI: + case XSD_QNAME: + case XSD_NOTATION: + pStr = *((char**)(pValue)); + pStr = m_BTSZ.getEntityReferenced(std::string(pStr)).c_str(); + break; + case XSD_HEXBINARY: + pStr = m_BTSZ.encodeToHexBinary((xsd__hexBinary*)(pValue)); + break; + case XSD_BASE64BINARY: + pStr = m_BTSZ.encodeToBase64Binary((xsd__base64Binary*)(pValue)); + break; + case XSD_DATETIME: + case XSD_DATE: + case XSD_TIME: + AxisSprintf (m_Buf, BTS_BUFFSIZE, "%s", m_BTSZ.m_AxisTime.serialize( + *((struct tm*)(pValue)), type).c_str ()); + break; + default:; + } + *this << pStr; + return AXIS_SUCCESS; +} + AXIS_CPP_NAMESPACE_END 1.27 +3 -1 ws-axis/c/src/soap/SoapSerializer.h Index: SoapSerializer.h =================================================================== RCS file: /home/cvs/ws-axis/c/src/soap/SoapSerializer.h,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- SoapSerializer.h 6 Aug 2004 14:44:37 -0000 1.26 +++ SoapSerializer.h 20 Aug 2004 13:03:38 -0000 1.27 @@ -47,7 +47,7 @@ { private: int m_nCounter; - AxisChar m_Buf[8]; + AxisChar m_Buf[BTS_BUFFSIZE]; SoapEnvelope* m_pSoapEnvelope; int m_iSoapVersion; /* Current Serialization Style */ @@ -177,6 +177,8 @@ const AxisChar* AXISCALL getBodyAsString(); int addOutputAnyObject(AnyType* pAnyObject); int serializeAnyObject(AnyType* pAnyObject); + int serializeAsChardata(void* pValue, XSDTYPE type); + }; AXIS_CPP_NAMESPACE_END 1.5 +1 -1 ws-axis/c/src/wsdl/.externalToolBuilders/Jar_Builder.launch Index: Jar_Builder.launch =================================================================== RCS file: /home/cvs/ws-axis/c/src/wsdl/.externalToolBuilders/Jar_Builder.launch,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- Jar_Builder.launch 26 Apr 2004 10:30:03 -0000 1.4 +++ Jar_Builder.launch 20 Aug 2004 13:03:38 -0000 1.5 @@ -7,7 +7,7 @@ + key="org.eclipse.ui.externaltools.ATTR_WORKING_DIRECTORY" value="E:\Axis\ws-axis\c_head\bin"/> 1.6 +1 -0 ws-axis/c/src/wsdl/org/apache/axis/wsdl/symbolTable/SchemaUtils.java Index: SchemaUtils.java =================================================================== RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/symbolTable/SchemaUtils.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- SchemaUtils.java 23 Jul 2004 12:21:07 -0000 1.5 +++ SchemaUtils.java 20 Aug 2004 13:03:38 -0000 1.6 @@ -1574,6 +1574,7 @@ // add type and name to vector, skip it if we couldn't parse it // XXX - this may need to be revisited. + //attributeName.getLocalPart().equals("name>lang") if ((type != null) && (attributeName != null)) { v.add(type); v.add(attributeName); 1.11 +10 -1 ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java Index: ParamWriter.java =================================================================== RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/ParamWriter.java,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- ParamWriter.java 6 Aug 2004 14:44:43 -0000 1.10 +++ ParamWriter.java 20 Aug 2004 13:03:39 -0000 1.11 @@ -39,6 +39,7 @@ protected static final int RETURN_PARM = 1; protected static final int COMMAN_PARM = 2; + protected AttributeInfo extensionBaseAttrib=null; /* no of parameters treated as attributes: ie first attributeParamCount of * attribs will be treated as attributes */ @@ -64,7 +65,7 @@ writer.write(" * This file was auto-generated by the Axis C++ Web Service Generator (WSDL2Ws)\n"); writer.write(" * This file contains functions to manipulate complex type "+ classname+"\n"); writer.write(" */\n\n"); - } catch (IOException e) { + } catch (IOException e) { e.printStackTrace(); throw new WrapperFault(e); } @@ -74,6 +75,14 @@ } /* genarate the arrtibs array */ private void populateAttribList(String Qualifiedname) throws WrapperFault { + ElementInfo elemi = type.getExtensionBaseType(); + if ( elemi != null){ + extensionBaseAttrib = new AttributeInfo(); + extensionBaseAttrib.setParamName(elemi.getName().getLocalPart()); + extensionBaseAttrib.setTypeName(CUtils.getclass4qname(elemi.getType().getName())); + extensionBaseAttrib.setType(elemi.getType()); + extensionBaseAttrib.setElementName(elemi.getName()); + } ArrayList attribfeilds = new ArrayList(); ArrayList elementfeilds = new ArrayList(); 1.36 +15 -4 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.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- WSDL2Ws.java 19 Aug 2004 12:54:54 -0000 1.35 +++ WSDL2Ws.java 20 Aug 2004 13:03:39 -0000 1.36 @@ -564,10 +564,21 @@ Vector restrictdata = null; if(type.isSimpleType()){ - //extended types and types declared as simpleType - restrictdata = CUtils.getRestrictionBaseAndValues(node,symbolTable); - if(restrictdata != null) - typedata.setRestrictiondata(restrictdata); + //check for extended types + TypeEntry base = SchemaUtils.getComplexElementExtensionBase(type.getNode(),symbolTable); + if (base != null){ + String localpart = type.getQName().getLocalPart()+ "_value"; + QName typeName = new QName(type.getQName().getNamespaceURI(),localpart); + ElementInfo eleinfo = new ElementInfo(typeName,createTypeInfo(base.getQName(),targetLanguage)); + typedata.setExtensionBaseType(eleinfo); + System.out.print("=====complexType with simpleContent is found : "+ type.getQName().getLocalPart()+"=====\n"); + } + else{ + //types declared as simpleType + restrictdata = CUtils.getRestrictionBaseAndValues(node,symbolTable); + if(restrictdata != null) + typedata.setRestrictiondata(restrictdata); + } // There can be attributes in this extended basic type // Process the attributes Vector attributes = SchemaUtils.getContainedAttributeTypes( 1.22 +10 -1 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.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- BeanParamWriter.java 16 Aug 2004 09:22:52 -0000 1.21 +++ BeanParamWriter.java 20 Aug 2004 13:03:39 -0000 1.22 @@ -105,6 +105,9 @@ if (attribs.length == 0) { System.out.println("possible error class with no attributes...................."); writer.write("\tpSZ->serialize(\">\", NULL);\n"); + if (extensionBaseAttrib != null){ + writer.write("\tpSZ->serializeAsChardata((void*)&(param->"+extensionBaseAttrib.getParamName()+"), "+CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName())+");\n"); + } writer.write("\treturn AXIS_SUCCESS;\n"); writer.write("}\n\n"); return; @@ -136,6 +139,9 @@ } } writer.write("\tpSZ->serialize(\">\", 0);\n"); + if (extensionBaseAttrib != null){ + writer.write("\tpSZ->serializeAsChardata((void*)&(param->"+extensionBaseAttrib.getParamName()+"), "+CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName())+");\n"); + } writer.write("\t/* then serialize elements if any*/\n"); for(int i = attributeParamCount; i< attribs.length;i++){ if(attribs[i].isAnyType()){ @@ -179,7 +185,7 @@ writer.write("}\n\n"); return; } - String arrayType = null; + String arrayType = null; /* Needed for Aix xlc */ for(int i = 0; i< attribs.length;i++){ if(attribs[i].isArray()) { @@ -213,6 +219,9 @@ "\n\t\t, (void*)Axis_Create_"+attribs[i].getTypeName()+", (void*)Axis_Delete_"+attribs[i].getTypeName()+ "\n\t\t, \""+attribs[i].getParamName()+"\", Axis_URI_"+attribs[i].getTypeName()+");\n"); } + } + if (extensionBaseAttrib != null){ + writer.write("\tpIWSDZ->getChardataAs((void*)&(param->"+extensionBaseAttrib.getParamName()+"), "+CUtils.getXSDTypeForBasicType(extensionBaseAttrib.getTypeName())+");\n"); } writer.write("\treturn pIWSDZ->getStatus();\n"); writer.write("}\n"); 1.17 +2 -0 ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java Index: ParmHeaderFileWriter.java =================================================================== RCS file: /home/cvs/ws-axis/c/src/wsdl/org/apache/axis/wsdl/wsdl2ws/cpp/literal/ParmHeaderFileWriter.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- ParmHeaderFileWriter.java 19 Aug 2004 12:54:54 -0000 1.16 +++ ParmHeaderFileWriter.java 20 Aug 2004 13:03:39 -0000 1.17 @@ -142,6 +142,8 @@ for(int i=0;i