Hi Alex, for us to be able to look at this in detail, can we please ask you to create a Jira issue and attach a minimal (JUnit) test case that allows us to reproduce the problem. I am not 100% sure you are hitting a but, but without something to replay this issue, it will be hard to get an educated opinion.
Regards Werner Edwards, Alex wrote: > I think there is a bug with the auto-complete="true", with the > auto-completed fields not propagating the namespace set on the class. > > I have an xml mapping for a class which I have set auto-complete="true" > on as follows: > <class name="com.foo.ContractLookupDto" auto-complete="true"> > <map-to xml="getContractRequest" > ns-uri="http://example.com/services/"/> > </class> > The ContractLookupDto class contains a field 'contractId'. > > When clients send xml to my unmarshaller it fails to unmarshal with the > following error: > Castor unmarshalling exception: unable to find FieldDescriptor for > 'contractId' in ClassDescriptor of getContractRequest. > > When trying to debug, I created a ContractDto sample and marshalled it > to see what xml it produced. I then noticed that when it auto-completes > the fields for my class, they have xmlns="" on them, which explains why > xml sent from the client fails. > > This looks like a bug with the auto-complete implementation. > As a workaround, I found that after changing my mapping to > <class name="com.foo.ContractLookupDto" auto-complete="true"> > <map-to xml="getContractRequest" > ns-uri="http://example.com/services/"/> > <field name="contractId"/> > </class> > Now my ContractDto sample marshalls to xml correctly (i.e. without the > xmlns="") and clients can successfully send xml. > > It would be great if someone could look into this bug, as I think it > significantly reduces the value of the auto-complete option. > > Thanks. > --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

