I'm trying to consume a WSDL webservice in Java, in what will eventually be an Eclipse plugin.
I can use File>New>Other to select "Web Service Client" which works, but it generates a bunch of files that would have to changed/regenerated when the webservice changes, which is rather rubbish.
Everywhere I look I'm seeing assorted ways of doing things, but I can't get any of them to actually do what I want.
Here's some code:
String WsdlUrl = "http://localhost:port/path/to/wsdl";
ArrayList<String> args = new ArrayList();
args.add("arg1");
args.add("arg2");
// etc
Webservice ws = setupWebserviceObject( WsdlUrl );
Object result = ws.invoke("methodname",args);
System.out.println(result);
Basically what I need is to change "Webservice", "setupWebserviceObject", and "invoke" into whatever works, without needing pre-generated classes and with a minimum of any other annoying fluff.
It doesn't seem like it should be difficult to do, but so far I've not found a clear example of how to do it.
Can anyone help?