Thanks for the response; that helps :)

Since I am using cxf.xml based config, I thought of trying to switch to
AegisBinding (instead of the default JAXB):

Approach 1:

<bean id="aegisBean"
                class="org.apache.cxf.aegis.databinding.AegisDatabinding"
                scope="prototype">
                <property name="configuration">
                        <bean
class="org.apache.cxf.aegis.type.TypeCreationOptions">
                        <property name="defaultMinOccurs" value="1"/>
                        <property name="defaultNillable" value="false"/>
                        </bean>
        </property> 
</bean>

Approach 2:

<bean id="aegisTypeConfiguration"
                class="org.apache.cxf.aegis.type.Configuration">
                <property name="defaultExtensibleElements" value="false" />
                <property name="defaultExtensibleAttributes" value="false" />
                <property name="defaultNillable" value="true" />
                <property name="defaultMinOccurs" value="1" />
</bean>

<bean id="aegisBean"
                class="org.apache.cxf.aegis.databinding.AegisDatabinding"
                scope="prototype">
                <property name="configuration" ref="aegisTypeConfiguration" />
</bean>


Both these approaches seem to take in to consideration the nillable
attribute, but NOT the minOccurs (which is always 0)

Am I doing something incorrectly here?


nair_anoop wrote:
> 
> Hello -
> 
>      I am using the "Java first" approach (JAX-WS annotations on the SEI
> and SIB) to "automatically" generate the WSDL at run-time using CXF 2.1.3.
> 
>      Everything seems to be working mostly OK; my question is very similar
> (may be even identical!) to the one here
> -http://www.nabble.com/set-Default-minOccurs-and-nillable-Parameters-td15291545.html#a15291545
> 
>      Using the default JAXB binding, is there a way to remove the
> minOccurs=0 attribute from the resultant CXF-generated WSDL. I need this
> to better handle .Net / Java interop.
> 
>     This page (http://cwiki.apache.org/CXF20DOC/aegis-databinding.html)
> seems to describe this using the Aegis data binding, but I am using the
> default JAXB binding.
> 
> Thanks in advance.
> 

-- 
View this message in context: 
http://www.nabble.com/CXF---JAXB-%22Java-first-approach%22---remove-minOccurs%3D%220%22-tp21692084p21738929.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to