mule 2.0/final: CXF and typeMappingRegistry
Hello,
I'm moving my XFire services (formerly on Mule 2.0 RC3) to Mule 2.0 Final, and experiencing some problems with typeMappingRegistry.
CXF appears to create minOccurs=0, nillable=true for wsdl parameters by default, as XFire did.
Formerly it was possible to get around this as follows:
<custom-connector ....
<spring:property name="typeMappingRegistry" value="custom.FTypeMapRegistry"/>
</custom-connector>
public class FTypeMapRegistry extends DefaultTypeMappingRegistry{
public FTypeMapRegistry(){
super(null, true);
Configuration configuration = new Configuration();
/* here we disuade XFire from its rather annoying tendency to assume that, just because
// anything in Java can be null, that we want to advertise all that nullity all over.
* without this the wsdls have minOccurs=0 on e.g. strings, causes JaxWs to wrap JaxBEelement around
* them */
configuration.setDefaultMinOccurs(1);
configuration.setDefaultNillable(false);
super.setConfiguration(configuration);
}
However in CXF 'defaultTypeMappingRegistry' is now final, so that solution won't work. The CxfConnector methods are protected so I cannot see a way to get to the bindings and change the configuration defaults... can anyone suggest a solution?
thanks