There are sample messages that you can copy/paste from your app's webservice documentation page:
Some sample java code:
/*
* Code requires the following libs:
* commons-codec-1.3.jar
* commons-httpclient-3.1.jar (or 3.0)
* commons-logging-1.1.jar
* These can all be found in mendix\runtime\lib\
*/
public static void main(String[] args) throws HttpException, IOException {
String location = "http://localhost:8080/ws/Sleepy/";
// you have to configure username and the password in mendix.
// When logged in as MxAdmin, there's a user screen. click on "new web service user"
String username = "ws_user";
String password = "1";
String soapAction = "SleepNow"; // this should correspond to whatever operation you want to call
// The following was copy/pasted from http://localhost:8080/ws-doc/Sleepy/SleepNow
// Sleepy is my Published Webservice, SleepNow is the soap operation I want to call
RequestEntity soapRequest = new StringRequestEntity("<?xml version=\"1.0\" encoding=\"utf-8\"?><soap:Envelope xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:tns=\"http://localhost:8081/ws/\"> <soap:Header> <tns:authentication> <username>"
+ username
+ "</username><password>"
+ password
+ "</password></tns:authentication></soap:Header><soap:Body><tns:SleepNow/></soap:Body></soap:Envelope>");
PostMethod post = new PostMethod(location);
post.setRequestHeader("Host", new URL(location).getHost());
post.setRequestHeader("SOAPAction", soapAction);
post.setRequestEntity(soapRequest);
HttpClient client = new HttpClient();
int status = client.executeMethod(post);
System.out.println(post.getResponseBodyAsString());
// or, alternatively: post.getResponseBodyAsStream(); if you want an inputstream instead of a string
}