Issue Details (XML | Word | Printable)

Key: MULE-3193
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Nic Waters
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Mule

CXF and typeMappingRegistry not working

Created: 07/Apr/08 03:40 AM   Updated: 28/Apr/08 05:48 PM
Component/s: Transport: CXF / XFire
Affects Version/s: 2.0.0
Fix Version/s: 2.0.1, 2.1.0

Time Tracking:
Not Specified

Environment: Windows Vista

Labels:
User impact: High
Configuration:
Snippet from the old config used with Xfire, to get around this behaviour

<custom-connector ....
<spring:property name="typeMappingRegistry" value="custom.FTypeMapRegistry"/>
</custom-connector>

where FTypeMapRegistry overrides DefaultTypeMappingRegistry.



 Description  « Hide
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.



 All   Comments   Work Log   Change History   Transitions   FishEye      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse added a comment - 28/Apr/08 05:48 PM
I'll one up you and make the whole databinding thing configurable now:

<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!