Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Complex Type versus Simple Type in a WSDL definition

 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good Day,

WSDL Document Example uses complexTypes in its schema, such as -



In this specific case, it seems to me that an XSD simple element would suffice, such as -



Therefore, is there any reason for the usage of complexTypes here?

Regards,
Dan
 
Yaron Naveh
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are right that in this particular case a single element could be enough.

However it is a known convention to have a common root to all inner elements. So even though with one element it is not really helpful, it is still used. It also makes the SOAP more readable as the wrapper element name is based on the method name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic