[ 
https://issues.apache.org/jira/browse/CXF-1530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12590959#action_12590959
 ] 

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?

Dan


> Nillable parameters not rendered.
> ---------------------------------
>
>                 Key: CXF-1530
>                 URL: https://issues.apache.org/jira/browse/CXF-1530
>             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 2.0.3.
> 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.

Reply via email to