cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <>
Subject [jira] Commented: (CXF-1530) Nillable parameters not rendered.
Date Mon, 21 Apr 2008 16:33:21 GMT


Daniel Kulp commented on CXF-1530:

The patch is definitely not correct.   

                final XmlSchemaAnnotated schema = part.getXmlSchema();
                if (schema instanceof XmlSchemaElement
                        && ((XmlSchemaElement) schema).getSchemaType() instanceof
XmlSchemaComplexType) {
                    XmlSchemaElement se = (XmlSchemaElement) schema;
                    if (se.getSchemaType() instanceof XmlSchemaComplexType) {
                        final XmlSchemaComplexType sct = (XmlSchemaComplexType) se.getSchemaType();
                        final XmlSchemaParticle particle = sct.getParticle();
                        minOccurs = particle.getMinOccurs();
                    } else  {
                        minOccurs = ((XmlSchemaElement) part.getXmlSchema()).getMinOccurs();

This ends up getting the minOccurs on the XmlSchemaParticle, which in your case is the <sequence>
element.  That defaults to 1.  Also, the "else" clause above is never hit at all.

Is there anyway to get a reproduceable test case?


> Nillable parameters not rendered.
> ---------------------------------
>                 Key: CXF-1530
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0.2, 2.0.4, 2.0.5
>         Environment: Windows, Java 5, Service running on XFire, Client running CXF
>            Reporter: Alexander Vaagan
>         Attachments: xmlstreamdatawriter-trunk.patch, xmlstreamdatawriter.patch
> I have a service that accepts multiple arguments like this: MyResult getResults(ComplexInput
arg0, AnOtherArgumentInput arg1).
> If I one or more of these arguments are null I get a fault from the service saying Not
enough message parts. I have inspected the actual soap message sent over the wire and have
confirmed that the parameters are not rendered.
> The service is running on XFire. (I am not able to migrate the service to CXF yet!)
> The problem exists on version 2.0.2, 2.0.4 and 2.0.5, but it seems to work on version
> Both the service and the client uses AegisBinding. (Code first approach)
> /alex

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message