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 "Tom Fennelly (JIRA)" <ax...@ws.apache.org> on 2005/08/02 16:15:53 UTC

[jira] Created: (AXIS-2161) DOM Element returned from org.apache.axis.encoding.Serializer.writeSchema being modified after call

DOM Element returned from org.apache.axis.encoding.Serializer.writeSchema being modified after call
---------------------------------------------------------------------------------------------------

         Key: AXIS-2161
         URL: http://issues.apache.org/jira/browse/AXIS-2161
     Project: Apache Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2.1    
 Environment: Windows XP
Apache Tomcat 5.0.28
j2sdk1.4.2_03
    Reporter: Tom Fennelly


writeSchema impleemnted as follows:

	public Element writeSchema(Class javaType, Types types) throws Exception {
		Element complexType = types.createElement("complexType");
		Element sequence;
		Element element;
		
		/*	Target WSDL entry:
			<complexType name="Customer">
				<sequence>
					<element name="number" type="xsd:long"/>
					<element name="name" type="xsd:string"/>
					<element name="address" type="xsd:string"/>
				</sequence>
			</complexType>
		 */
		
		complexType.setAttribute("name", "Customer");
		sequence = types.createElement("sequence");
		complexType.appendChild(sequence);

		// Add the fields
		element = types.createElement(FIELD_NUMBER, "xsd:long", false, false, sequence.getOwnerDocument());
		sequence.appendChild(element);
		element = types.createElement(FIELD_NAME, "xsd:string", false, false, sequence.getOwnerDocument());
		sequence.appendChild(element);
		element = types.createElement(FIELD_ADDRESS, "xsd:string", false, false, sequence.getOwnerDocument());
		sequence.appendChild(element);
		
		return complexType;
	}

So, complexType definition expected in generated WSDL as follows:
		<complexType name="Customer">
				....
		</complexType>

Actually getting:
		<complexType name="local">
				....
		</complexType>

I.e. name attribute value getting modified to "local" after call to writeSchema.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira