axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 17544] New: - default attribute in wsdl does not translate to default value in stub/server code
Date Fri, 28 Feb 2003 19:31:40 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17544>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

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

default attribute in wsdl does not translate to default value in stub/server code

           Summary: default attribute in wsdl does not translate to default
                    value in stub/server code
           Product: Axis
           Version: 1.1RC1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WSDL processing
        AssignedTo: axis-dev@ws.apache.org
        ReportedBy: alex.huang@openwave.com


Using the default attribute in <xsd:element> does not result in the default 
value being generated on the server side if the element is not explicitly set 
on the client.

Currently, this causes a null-pointer exception on the server.

Here's the wsdl definition.
            <xsd:complexType name="PingRequestType">
                <xsd:complexContent>
                    <xsd:extension base="opm_common_xsd:OpmRequestType">
                        <xsd:sequence>
                            <xsd:element name="logServerStats" 
                                type="xsd:boolean" 
                                minOccurs="0" default="false"/>
                        </xsd:sequence>
                    </xsd:extension>
                </xsd:complexContent>
            </xsd:complexType>

The process is to generate from a wsdl that contains the above complexType as a 
parameter.  On the client, do not set the logServerStats element.  The 
generated code will generate logServerStats as Boolean object.  When my code 
tries to access the logServerStats.booleanValue(), the server will dumpcore 
because logServerStats is null.

Mime
View raw message