axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Ewins <Brian.Ew...@btinternet.com>
Subject Re: WSDL2Java: FOO_Bar name is converted to FOOBar
Date Mon, 01 Jul 2002 13:02:59 GMT
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

David.Ostrovsky@dvg.de 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
> 
> 




Mime
View raw message