Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Why my schema not defining a complex class definition, during WSGEN ?

 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have a class defined as below



and I'm generating the wsdl using the wsgen, used in a build file.



The schema that is generated is as below



My customer class consists of several fields lke fName, lName, phone and Address object which is also defined. But I do not see neither Customer, Address and also CustomerException properly defined in schema. Why is this happening? Do I need to annotate and specify to have these classes also be included in schema definition. Please advice.
 
Kumar Raja
Ranch Hand
Posts: 547
2
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could some one advise me this?
 
Bogumil Zebek
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you show us your Customer class?

I had the same problem when I defined the class without getters and setters for class fields.
After code update xsd was generated correctly.

To generate wsdl file with xsd I used maven2 plugin jaxws-maven-plugin



Result:
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I took what snippets you provided in your first post and added my own Customer and CustomerException etc and managed to create a WSDL file as well as a XML schema which has a customer complex type that looks like this:

My Customer class is a POJO without any annotations.

Some advice:
- Check the console output after having run your Ant script carefully - did the execution really succeed?
- Please post more complete files, not just excerpts, when asking.
- Where is the wsgen command that you use to generate the artifacts?
Best wishes!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic