Java Reference
In-Depth Information
<element name="image" type="apachesoap:Image">
<sequence>
<complexType>
</element>
You don't want such implementation details in your WSDL, especially when it isn't necessary.
Another issue with starting from code is that you may end up with either much stronger or
much weaker typing in your WSDL than you want. While strong typing is considered a fea-
ture of languages like Java, you must consider your purpose in SOA. There are many popu-
lar dynamically typed languages (Ruby, Python, etc.), and you can't blindly assume that the
strongest possible typing is always best. Your service is not a “Java Program++”—it is a ser-
vice, and the Java platform just offers a way to create it. But on the other hand, you do not
want to forsake control for convenience. If your service really demands an array of length 12,
make sure that constraint is expressed in the WSDL. Generated WSDLs often gloss over such
details, and you wind up with a WSDL that accepts any kind of array.
Finally, you might decide that the whole point of web services is to interoperate with external
clients based on a strong, clear, implementation-independent contract. In web services, that
contract is a WSDL. Perhaps instead of generating it as an afterthought, it should be your fo-
cus as a developer/architect. In addition, there are a number of detractors from this approach.
It has been considered problematic from the early days of Java web services.
Search WWH ::




Custom Search