rest - Creating a WADL and WSDL in Java? -


i have been tasked @ work create wadl , wsdl in java. have few questions though.

first wsdl xml document describes how client requests information soap system. wadl xml document describes how client request info rest system. both of correct?

if do? understand how soap , rest work http, i'm having trouble wrapping head around point of wadl , wsdl , for, , how should go creating 1 in java.

when have method in code , need call it, how call it? @ method signature , javadoc. see parameter names are, mean, type have, javadoc tells if there restrictions on values, exception if don't respect that, etc.

now consider web service. let's start soap first. it's operations exposed on network. how call beast? can @ endpoint must send formatted soap payload. tell operation names? parameter names , types? restrictions on values? no! tells absolutely nothing. need way tell clients how call service.

you can have documentation, javadoc. use learn how make call. xml. program in xml or in java? program in java need marshall objects xml , unmarshall response xml java objects. , have write code that. if misunderstand documentation build wrong , won't work first time. have read documentation again, tweak xmls, debug it, try again, repeat until working, etc. unproductive!

wouldn't nice if have tool generate code concentrate on actual business needs accomplished instead of wasting time xml? enter wsdl.

a wsdl way describe soap web service. it's signature, parameter names , types, restrictions , documentation, in one. what's useful can feed tool , have tool generate code handles xml marshalling/unmarshalling , exposes methods , object java code instead.

now rest different beast. call restful web service need "speak it's language", there isn't "a protocol" follow. clients need understand mime types in order use service. documentation have read , understand , build code. because boilerplate code, people used features provided soap wsdls decided create similar rest. wadl.

wadl serves same purpose rest, wsdl soap (note though rest more different way soap when try do same thing rest, did soap, reduce restful web service - which hypermedia driven - webapi).

as way create wsdls , wadls, can hand if have knowledge (that's called "contract-first") or use jax-rs , jax-ws frameworks, write services first , have frameworks generate wsdl automatically (this called "contract-last").


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -