3 Replies Latest reply on Oct 16, 2006 6:12 PM by Jason Greene

    JBWS-1079 - Incorrect WSDL to Java mapping for anonymous str

    Darran Lofthouse Master

      I need some clarification on what is going to be the correct solution for this task.

      It looks like the current naming convention was chosen because that is the way it is generated by wscompile, we even have a test in the testsuite to make sure that the generated class does have the same name as the class generated by wscompile.

      As I mentioned in the Jira task the jax-rpc specification says that the name should be the name of the nearest enclosing element, complexType or simpleType, I haven't seen anything that says it should be created by concatenating a series of names together.

      There would however be a problem with just taking the name of the enclosing element. If two different elements with the same name (because they are in their own complex types contain an anonymous simple type then there will be a name collision.

      The jax-rpc specification does contain a section that describes the expected collisions and this doesn't appear to be one of them.

      To try and get an idea of how this has evolved in the later specs I have tried generating the code using the JaxB 2.0 RI from Sun, the RI generates the type as a static inner class within the class representing the enclosing type. This does mean that the anonymous type is named after the element that contains it and it also gets round the naming collisions but it feels as if this is ahead of what is intended by the JAX-RPC spec.