@Test
public void testPost() throws Exception
{
{
HttpClient client = new HttpClient();
PostMethod method = createPostMethod("");
try
{
method.setRequestEntity(new StringRequestEntity(
"<?xml version=\"1.0\"?><person><name>bill</name></person>",
"application/xml", null));
int status = client.executeMethod(method);
Assert.assertEquals(status, 204);
}
catch (IOException e)
{
throw new RuntimeException(e);
}
}
{
HttpClient client = new HttpClient();
PostMethod method = createPostMethod("/kunde");
try
{
method.setRequestEntity(new StringRequestEntity(kundeXml, "application/xml", null));
int status = client.executeMethod(method);
Assert.assertEquals(status, 204);
}
catch (IOException e)
{