Looks like someone already noticed this and there's some movement on it.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20109


-----Original Message-----
From: Cory Wilkerson 
Sent: Monday, September 08, 2003 9:41 AM
To: '[EMAIL PROTECTED]'
Subject: a consensus on xsd/soapenc int?


All,

Assume xsd = http://www.w3.org/2001/XMLSchema
Assume soapenc = http://schemas.xmlsoap.org/soap/encoding

I don't think we ever came to a conclusion on whether or not Axis is behaving 
improperly when it qualifies ints in the "soapenc" namespace when generating stubs 
from WSDL (rpc/encoded) that indicate the int belongs in the xsd namespace (but has a 
minOccurs of 0), e.g. (paraphrased):

<xsd:schema targetNamespace="http://www.foo.com"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
        <xsd:complexType name="foo">
                <xsd:sequence>
                        <xsd:element name="bar" type="xsd:int" minOccurs="0"/>
                </xsd:sequence> 
        </xsd:complexType>
</xsd:schema>

WSDL2Java generates the following, rather unhealthy code IMHO:

field = new org.apache.axis.description.ElementDesc();
field.setFieldName("bar");
field.setXmlName(new javax.xml.namespace.QName("", "bar"));
field.setXmlType(new 
javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/";, "int"));
field.setMinOccursIs0(true);

I managed to find where this assumption is made in the WSDL2Java code -- my question 
is -- is that assumption correct or incorrect?  I've got all my money on it being 
incorrect but would like a little validation.

Thanks,
Cory

Reply via email to