• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CXF and JAXB binding for a class/property with special character in its name?

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm using the cxf-codegen-plugin for Maven to generate java classes for from a WSDL, for a web service. The problem is that the classes(types?) and properties have swedish names, and some names contains 'å', 'ä' or 'ö'. For example the name "fält", meaning "field". So with default configuration CXF and JAXB generates the file "FäLt.java" etc. Also, notice the capital L, it isn't part of the WSDL, maybe a bug in CXF/JAXB causes it. Any way, I would prefer not having java classes with these characters in them so I tried to use a JAXB binding file to bind all the swedish names to english names. Names that doesn't contain åäö works just fine. For example the class/type "rad" ("row") I now can map to Row.java. But I can't make JAXB map "fält" to "Field.java". It just says:

Thrown by JAXB: SCD "~tns:fΣlt" didnt match any schema component

Notice that I didn't type the 'Σ' in the xml binding file. I typed in the 'ä' character, but either CXF/JAXB interprets the character incorrectly (even though the file and xml encoding is UTF-8), or it is just my console window (in windows xp) that can't display it correctly. I also tried using the unicode entity å I also looked at both the WSDL file and the binding file using the program SuperEdi, and it displays the 'ä' character correctly, and identifies the file as UTF-8.
I have also tried entering the capital L instead of lowercase l, with no difference.
Does anyone know how I can make CXF/JAXB rename these classes/types/properties? Maybe there is some regex/wildcard syntax I can use so I can write something like "f*lt"?

Here is my binding file:



Regards
/Jimi
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic