SOAP-dust because SOAP is not yet deprecated

What is soap-dust ?

SOAP client API for Java developers that need one, until SOAP is deprecated.

SOAP-dust does not require neither perform any code generation.

SOAP-dust fits within a single jar file.

SOAP-dust works on Android.

See an example of using SOAP-dust to query jira at Codehaus here.

How to query a remote soap server with soap-dust ?
Just create a new soap-dust client. Then initialize it with the appropriate wsdl and endpoint urls. Finally, call its call method with the name of the remote operation you want to call and the corresponding parameters:
Client client = new Client();
client.setWsdlUrl("http://jira.codehaus.org/rpc/soap/jirasoapservice-v2?wsdl");
client.setEndPoint("http://jira.codehaus.org/rpc/soap/jirasoapservice-v2");
ComposedValue authentication = new ComposedValue();
authentication.put("login", myLogin);
authentication.put("password", myPasswd);
client.call("login", authentication);
    
See a full fonctional example here.
How do I know what the remote web-service understands ?

If you do not read wsdl fluently, you can find hope in the explain method.

Just create a new soap-dust client. Then initialize it with the appropriate wsdl url. Finally, call its explain method to display all the operations supported by the remote server and the expected parameters:

Client client = new Client();
client.setWsdlUrl("http://jira.codehaus.org/rpc/soap/jirasoapservice-v2?wsdl");
client.explain(System.out);
    
How can I set a connect or read timeout in soap-dust ?

soap-dust relies on standard Java HttpURLConnection.

If you need to customize the HttpURLConnection in any way and especially to set a connect and read timeout, you can do this by overriding the protected method of class Client customizeHttpConnectionBeforeCall:

Client client = new Client() {
  @Override
  protected void customizeHttpConnectionBeforeCall(HttpURLConnection connection) {
    connection.setReadTimeout(1000);
    connection.setConnectTimeout(1000);
  }
};
    
How can I test my code that uses soap-dust (or just code that performs HTTP requests).

soap-dust comes with a URL handler for the special protocol test:. A test: url will simulate an http url. When you create this url, you set the file that contain the data you want to be returned when querying this url. You may also set the HTTP status code you want to be obtained when querying this url.

For instance querying the following url will result in a 500 HTTP request. The data received will be extracted from the file test/response.xml:

test:status:500;file:test/response.xml
  

You can also get the data sent to such an url at the end of your test. See soapdust.urlhandler.test.Handler for more information.

How can I send an array as a ComposedValue ?
As surprising as it might seem, soap-dust does not handle that very nicely for now :( To do that, you will have to either encapsulate each of your array elements inside a separate ComposedValue with fake names or put each element of your array in the ComposedValue. For instance if the method m takes a parameter p of type array (of strings), then one can make a call like this :
client.call("m", new ComposedValue().put("p", new ComposedValue()
   .put("p1", "1")
   .put("p2", "2")
   .put("p3", "3")...));
                
Here is another example when the element is not of xsd type array but has a maxoccur > 1 :
client.call("m", new ComposedValue()
   .put("p", "1")
   .put("p", "2")
   .put("p", "3")...));