views:

8201

answers:

3

I'm looking to generate a simple standalone Java client which will make calls to a SOAP web service, given a wsdl. When I say simple and standalone I mean that once I'm done I want to be able to do something like

import my.generated.nonsense;

public static void main(String[] args) {
    Client client = new Client();
    client.getSomething();
}

I've had great time recently with Maven on some other projects and I want to keep that going, so would aim to use it here. I don't want the tool to generate anything expect the classes that allow me to do the above.

Anyone done this recently and can recommend a ws library and Maven plugin? Thanks.

+3  A: 

I would recommend SOAP UI for what you need to do. You do not need to write any code - you can call the web service from the soap UI client.

If you need to automate making soap calls you can use the maven plugin as part of your build/deploy process. More info about the maven plugin here: http://www.soapui.org/plugin/index.html

neesh
The second link is broken.
Mark Byers
+5  A: 

Have a look at CXF and its Maven plug in. CXF would generate code similar to yours (of course web services could fail and you should add exception handling). Have in mind though that SOAP web services is a complicated topic and simplicity in the generated code may not be always desirable. Generating a client with the default settings may not work for some clients. You would then need to tweak the configuration of the code generation and/or add code to handle it. CXF is good both for easy/default clients and more complicated ones.

kgiannakakis
Your link is broken.
Mark Byers
A: 

Excellent suggestions!! Great job!!

Now I have a series of wizards that HIDE the real core of things and I don't know how the true way of development is.

I'd like to see all of you supporting applications by means of wizards.

Please, THINK!! Do some work with your brains and help people who want to learn!!!