Messages

The next part of a WSDL document is the message. Messages have no real direct parallel within Java. However, you can think of a message this way: Consider a system wherein each method can have only one input parameter, one output parameter, and perhaps one parameter for throwing an exception. As you will see later, this is exactly how WSDL is constructed.

Now that you have this type of a system, you want a way to collect those items you'd normally place as an enumeration on a method. Go back to the address example, but this time assume that the method order() actually takes two addresses:

public void order(Address shipTo, Address billTo){
  //do something
}

At this point you could declare yet another type for each of the two addresses ...

Get Java™ Web Services Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.