File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL2JAVA Apache axis

 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have an enumeration field in a XML complex type element. The Apache Axis tool generates a java class whose name contains "_" character. How do I avoid it?
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you explain a bit more with code fragments ??
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The java bean generated corresponding to enumeration is WSState_currentState.java. I want the name of be WSStateCurrentState with no "_".

Thanks.

 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is pure guessing, but have you tried using CurrentState instead of currentState?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just tried, it generated WSState_CurrentState.java instead of
WSState_currentState.java.

Anyways, thanks for your help.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let's try the easy way out...
Do you need to have the class name without the underscore?
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to have the class name without the underscore?


The class name looks more elegant when there is no underscore.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, in that case I'd suggest concentrating on something more important
 
Pradeep bhatt
Ranch Hand
Posts: 8927
Firefox Browser Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Lasse Koskela:
Oh, in that case I'd suggest concentrating on something more important


Exactly. I completed all my code and testing and then decided to remove the underscore but it doesn't seem to go.
Apache should provide more control to the developers.
 
Balaji Loganathan
author and deputy
Bartender
Posts: 3150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Pradeep Bhat:

Apache should provide more control to the developers.

Apache Axis is a open source tool, and if you are very keen on underscore then this CVS link on WSDL2Java.java may help you.
Cheers
Balaji
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic