user1061771
user1061771

Reputation: 47

Generation of JAXB based WebService Client(Stub) from WSDL

We have a requirement where we need to develop a webservice client based upon JAXB. We have only the WSDL url with us. Is there any such tool exist which can do this for us ?

As of now we are thinking of xjc tool, but that takes a xsd file as input whereas we have the WSDL file with us to generate the Stubs.

Please advise.

Regards S

Upvotes: 2

Views: 12384

Answers (2)

snv
snv

Reputation: 181

I know it's old, but if anybody else stumbles about it:

A WSDL contains the schema for the domain objects in between the <types>-Tag.

The default tool xjc can parse wsdl with the -wsdl command line option.

Upvotes: 0

Grzegorz Grzybek
Grzegorz Grzybek

Reputation: 6237

You can always use CXF which uses JAXB by default.

Using CXF generated Client you can have what you need (a client) using only WSDL.

Just use:

wsdl2java -d <output-directory> -client <wsdlurl>

Upvotes: 2

Related Questions