This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WSDL Design Trade-off Question

 
Ben Ethridge
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, everyone.

We have our Axis/SOAP app prototype running fine, but before we ramp up in functionality, I have a high-level WSDL design question:

Imagine we have some biz functionality:

( ) Employee
( ) Payroll
( ) Customer
( ) Order

Assume that the functionality is loosely related, as is the above.

We are using an .xsd schema file for each of our functional units (i.e Employee.xsd, Payroll.xsd, etc.) with, say, a Common.xsd for elements which cross functional boundaries. This effectively avoids redundant element code maintenance in the various .xsd's.

We then create a .wsdl for each functional unit (i.e. an Employee.wsdl, Payroll.wsdl, etc.), and use the <xsd:include> statement to pull in the associated .xsd file. Example:

<wsdl:types>
<xsd:schema targetNamespace="http://www.mydomain.com">
<xsd:include schemaLocation="../schemas/Employee.xsd"/>
</xsd:schema>
</wsdl:types>

This is working ok for us, but I'm worried about the possible coding redundancies (and other potential downsides) of having one .wsdl for each functional unit.

Would it be better to have a single .wsdl and a single .xsd for ALL our functionality? How far do you carry this out? What if we ramp up to several dozen functional units? Is that still a better approach? What are the potential downsides of having a single .wsdl?

Should we even create .wsdl's based on functional units? Is there some better accepted organizational approach?

Bottom line question is: What are some of the best practices for industrial-strength wsdl design? I can't yet find much on this in the books and samples.

Ben
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Usually all the endpoints provided by single Web service are described in the same WSDL. Richard Monson-Haefel has a short discussion in his book J2EE Web Services on the pros and cons of various WSDL and Schema management approaches � in the end versioning is the thorniest issue. Whatever strategy is employed it usually involves some use of WSDL imports and/or XML Schema imports rather than strictly separating everything.
WSDL file imports.
 
Ben Ethridge
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Peer. I'll read it over.

Ben
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic