O'Reilly logo

Java™ Web Services Unleashed by Mark Wutka, Joseph Weber, Arthur Ryman, K. Scott Morrison, Benoît Marchal, Matthias Kloppmann, Steven Haines, Darren Govoni, Francisco Curbera, Frank Cohen, Robert Brunner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required