title: Simple example of consuming wsdl webservice with Java?
body: <p>I'm trying to consume a WSDL webservice in Java, in what will eventually be an Eclipse plugin.</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Here's some code:</p>
  
  <pre><code>String WsdlUrl = "http://localhost:port/path/to/wsdl";
  
  ArrayList&lt;String&gt; args = new ArrayList();
  args.add("arg1");
  args.add("arg2");
  // etc
  
  Webservice ws = setupWebserviceObject( WsdlUrl );
  Object result = ws.invoke("methodname",args);
  
  System.out.println(result);
  </code></pre>
  
  <p>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.</p>
  
  <p>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.</p>
  
  <p>Can anyone help?</p>