http://www.nabble.com/mule-2.0-final%3A-CXF-and-typeMappingRegistry-td16467786.html
CXF creates wsdls with minOccurs=0, nillable=true by default. With mandatory e.g. string parameters this obviously isn't desirable. CXF code allows this behaviour to be changed by accessing the 'typeMappingRegistry' and previously with Mule/XFire this was done by using the "typeMappingRegistry" property in Mule and overriding 'DefaultTypeMappingRegistry'. Two problems now:
- 'typeMappingRegistry' in Mule doesn't seem to be available anymore
- 'DefaultTypeMappingRegistry' in CXF is now final
CXF docs' suggested solution is to access the 'typeMappingRegistry' from the bindings and change it. However this would require access to the CXFReceiver method that currently creates the bindings- which is protected. My solution would be a public method in CXF Receiver, something like 'setupBindings', that could be overriden.
<cxf:inbound-endpoint
address="http://localhost:63081/services/Echo" frontend="simple">
<cxf:databinding>
<spring:bean class="org.apache.cxf.aegis.databinding.AegisDatabinding">
<spring:property name="typeMappingRegistry">
<spring:bean class="org.apache.cxf.aegis.type.DefaultTypeMappingRegistry">
<spring:constructor-arg value="true"/>
</spring:bean>
</spring:property>
</spring:bean>
</cxf:databinding>
</cxf:inbound-endpoint>
Applied in: http://fisheye.codehaus.org/changelog/mule/?cs=11654
2.0.1 should be out very soon!