Brian,
I'm aware of the specification. The underscore character is mentioned there
explicit as the valid
character in class and interface names:
20.1
? Class and interface names always begin with an upper-case letter. The
remaining
characters are either digits, lower-case letters or upper-case letters.
Upper-case letters
within a multi-word name serve to identify the start of each non-initial
word or
sometimes to stand for acronyms. These names may contain an '_'
underscore).
You are right, the isPunctuation function is wrong:
/**
* Is this an XML punctuation character?
*/
private static boolean isPunctuation(char c)
{
return '-' == c
|| '.' == c
|| ':' == c
|| '_' == c
|| '\u00B7' == c
|| '\u0387' == c
|| '\u06DD' == c
|| '\u06DE' == c;
} // isPunctuation
Well, I never raised an issue in Bugzilla?
Could you please do it for me? Or just provide me with information
how to do it.
Thank you.
David Ostrovsky
Brian Ewins
<Brian.Ewins@btint An: [EMAIL PROTECTED]
ernet.com> Kopie:
Thema: Re: WSDL2Java: FOO_Bar name is
converted to FOOBar
01.07.02 15:02
Bitte antworten an
axis-user
That mapping is supposed to be part of the JAX-RPC standard. Read
'Appendix: Mapping of XML Names' on page 141-143 of the spec - you're
not supposed to get control of the mapping.
However it looks like the mapping you've seen is a bug! It appears to
be treating '_' as a punctuation char when its actually an identifier
char.
The bug is in 'JavaUtils.isPunctuation()' which has '_' identified as
punctuation - its not in the table at the bottom of page 141 of the spec
(in my copy anyway, which I believe is the final release?)
Want to raise this in Bugzilla?
-Baz
[EMAIL PROTECTED] wrote:
> Hello.
>
> I have the name FOO_Bar in typeMaping section.
> something like that:
>
> ....
> <complexType abstract="true" name="FOO_Bar">
> <sequence>
> <element name="name" nillable="true" type="soapenc:string"/>
> <element name="attribute" type="xsd:long"/>
> <element name="valid" type="xsd:boolean"/>
> </sequence>
> </complexType>
> ....
>
> During genereation process this name is converted to FOOBar. ( Both
> generated java file(s) and deploy.wsdd).
>
> I figured out, that javifyNames() function JavaGeneratorFactory (that
call
> JavaUtils.xmlNameToJava())
> convert the xml QName FOO_Bar to FOOBar. Here is the stack trace:
>
> xmlNameToJava():649, JavaUtils.java
> xmlNameToJava():325, Utils.java
> xmlNameToJavaClass():333, Utils.java
> getJavaName():369, Emitter.java
> javifyNames():386, JavaGeneratorFactory.java
> generatorPass():177, JavaGeneratorFactory.java
> generate():266, Parser.java
> access$000():80, Parser.java
> run():235, Parser.java
> run():484, Thread.java
>
> Why? I didn't find any command line paramter, to control this.
> Any comments?
> Thank you.
>
> David Ostrovsky
>
>