It's like when you're trying to break into a house - you assume the door is locked
and can't figure out why you can't open it!
Well turns out that all that mapping stuff for the enum is surplus to requirements as far
as jboss is concerned. You just remove it and it works fine!
| <java-xml-type-mapping>
| <java-type>za.co.sanlam.employeebenefits.IncomeTypeEnum</java-type>
| <root-type-qname
xmlns:rtq="http://sanlam.co.za/employeebenefits/dto/1">rtq:IncomeTypeEnum</root-type-qname>
| <qname-scope>simpleType</qname-scope>
| <variable-mapping>
| <java-variable-name>pension</java-variable-name>
| <xml-element-name>pension</xml-element-name>
| </variable-mapping>
| <variable-mapping>
| <java-variable-name>salary</java-variable-name>
| <xml-element-name>salary</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
|
I took a simple remote interface which took as a parameter an object following the enum
pattern and generated the wsdl and mapping file with jboss and no mappings for the values
in the enumeration were generated.
The lines in red above are not necessary in jboss, and it uses the fromValue method to
resolve the enum data type. Very impressive.
What I didn't mention is that the jaxrpc mapping file was generated by wsdl2java from
WAS which generates mapping files which have this stuff included. I'm not so sure why
it even bothers as that information is available from the wsdl. I removed the mapping and
tested my simple web service and it behaved just fine.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008677#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...