0

I am given a WSDL file. I need to call a SOAP web service in the WSDL. I would like to know the different ways of creating a web service clients from a WSDL in java. It would be helpful if the options are given with examples, links, pros and cons. I am now confused with different options like wsimport, wsdl2java, java2wsdl, saaj, apache axis, cxf, spring etc. Your help is much appreciated.

2
  • 1
    Run wsdl2java (even via a GUI like SoapUI). It generates a class with a main() method that you can immediately play with Commented Mar 1, 2016 at 21:06
  • wsimport is part of JAX-WS, which is part of every Java SE installation; no third-party libraries required. Like all of Java SE, JAX-WS is heavily regression tested and extremely stable (meaning, its contracts will never change). Commented Mar 1, 2016 at 21:15

3 Answers 3

1

SoapUI doesn't support WSDL 2.0

You may try an experimental wsdl-generic library from Apache Taverna

The library works with both WSDL 1.1 / 2.0 versions. The experimental branch creates XML tree based on Apache XML Schema 2.0 library, so you can easily create your XML message.

Then it dynamically calls the service via JAX-WS.

It also has a command-line WS executor!!!

Cheers,

D.

Sign up to request clarification or add additional context in comments.

Comments

0

I was working on a project using Salesforce SOAP API, and here is a link of the guide for using WSDL to generate java lib:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_quickstart_import_WSDLs.htm

Hope it will help you.

Comments

0

SoapUI is a quick solution with user interface to make initial tests for provided web service methods. Later you can use wsdl2java with specific options to generate Java classes from WSDL and make jar which you will include in your project.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.