SimpleContent extension -base is not generetad in the resulting wsdl
Posted: Jun 3, 2010 10:07 PM
Advertisement
I am new to webservices and want to generate a stub out of wsdl Problematic part of the source wsdl is: - <s:complexType name="VertexEnvelopeQuotationResponseLineItemProduct"> - <s:simpleContent> - <s:extension base="s:string"> <s:attribute name="EnergyStarIndicator" type="s:string" /> <s:attribute name="AverageCost" type="s:string" /> <s:attribute name="PrePaidIndicator" type="s:string" /> <s:attribute name="productClass" type="s:string" /> s:extension> s:simpleContent> s:complexType> ************************************** used wsdl2java to generate the coresponding java class which did not throw any error Here is the java class generated public VertexEnvelopeQuotationRequestLineItemProduct() { } // Simple Types must have a String constructor public VertexEnvelopeQuotationRequestLineItemProduct(java.lang.String _value) { this._value = _value; } // Simple Types must have a toString for serializing the value public java.lang.String toString() { return _value; } /** * Gets the _value value for this VertexEnvelopeQuotationRequestLineItemProduct. * * @return _value */ public java.lang.String get_value() { return _value; } /** * Sets the _value value for this VertexEnvelopeQuotationRequestLineItemProduct. * * @param _value */ public void set_value(java.lang.String _value) { this._value = _value; } . . . . // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(VertexEnvelopeQuotationRequestLineItemProd uct.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vertexinc:o-series:tps:4:0", "VertexEnvelopeQuotationRequestLineItemProduct")); org.apache.axis.description.AttributeDesc attrField = new org.apache.axis.description.AttributeDesc(); attrField.setFieldName("energyStarIndicator"); attrField.setXmlName(new javax.xml.namespace.QName("", "EnergyStarIndicator")); attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(attrField); attrField = new org.apache.axis.description.AttributeDesc(); attrField.setFieldName("averageCost"); attrField.setXmlName(new javax.xml.namespace.QName("", "AverageCost")); attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(attrField); attrField = new org.apache.axis.description.AttributeDesc(); attrField.setFieldName("prePaidIndicator"); attrField.setXmlName(new javax.xml.namespace.QName("", "PrePaidIndicator")); attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(attrField); attrField = new org.apache.axis.description.AttributeDesc(); attrField.setFieldName("productClass"); attrField.setXmlName(new javax.xml.namespace.QName("", "productClass")); attrField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); typeDesc.addFieldDesc(attrField); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("_value"); elemField.setXmlName(new javax.xml.namespace.QName("", "_value")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } ********************************************************************* The resulting wsdl which got created after deploying the webservice is : - <complexType name="VertexEnvelopeQuotationResponseLineItemProduct"> - <simpleContent> - <extension> <attribute name="_value" type="xsd:string" /> <attribute name="averageCost" type="xsd:string" /> <attribute name="energyStarIndicator" type="xsd:string" /> <attribute name="prePaidIndicator" type="xsd:string" /> <attribute name="productClass" type="xsd:string" /> extension> simpleContent> complexType> This wsdl as an be seen does not contain base for extension, thus gets errored out while calling from SOAP UI. ************************************ Can anybody please tell me wat is the isse and how can it be resolved???????