title: send XML string to web service in Jersery
body: <p>I am new to web service in jersey. I have created a web service the code is below</p>
  
  <pre><code>@Path("/remotedb")
  public class RemoteDb {
  
  @GET
  @Path("/save/{xmlData}")
  @Produces(MediaType.TEXT_XML)
  public String saveData(@PathParam("xmlData") String xml) {
      return xml;
      }
  }
  </code></pre>
  
  <p>I have this code at client side</p>
  
  <pre><code>public class WebServiceClient {
  
  public static void callWebService() {
    String xml =  "&lt;data&gt;" +
          "&lt;table&gt;&lt;test_id&gt;t4&lt;/test_id&gt;&lt;dateprix&gt;2013-06-06 22:50:40.252&lt;/dateprix&gt;&lt;nomtest&gt;NOMTEST&lt;/nomtest&gt;&lt;prixtest&gt;12.70&lt;/prixtest&gt;&lt;webposted&gt;N&lt;/webposted&gt;&lt;posteddate&gt;2013-06-06 21:51:42.252&lt;/posteddate&gt;&lt;/table&gt;" +
              "&lt;/data&gt;";
       ClientConfig config = new DefaultClientConfig();
       Client client = Client.create(config);
       WebResource service = client.resource(getBaseURI());
    System.out.println(service.path("restful").path("remotedb").path("save").path(xml).accept(MediaType.TEXT_XML).get(String.class));
  
    }
  
      private static URI getBaseURI() {
          return UriBuilder.fromUri("http://localhost:8080/WebServiceModule").build();
      }
  } 
  </code></pre>
  
  <p>Now when i called the web service i got the following exception</p>
  
  <pre><code>Exception in thread "main" com.sun.jersey.api.client.UniformInterfaceException: GET    http://localhost:8080/WebServiceModule/restful/remotedb/save/%3Cdata%3E%3Ctable%3E%3Ctest_id%3Et4%3C/test_id%3E%3Cdateprix%3E2013-06-06%2022:50:40.252%3C/dateprix%3E%3Cnomtest%3ENOMTEST%3C/nomtest%3E%3Cprixtest%3E12.70%3C/prixtest%3E%3Cwebposted%3EN%3C/webposted%3E%3Cposteddate%3E2013-06-06%2021:51:42.252%3C/posteddate%3E%3C/table%3E%3C/data%3E returned a response status of 404 Not Found
  at com.sun.jersey.api.client.WebResource.handle(WebResource.java:686)
  at com.sun.jersey.api.client.WebResource.access$200(WebResource.java:74)
  at com.sun.jersey.api.client.WebResource$Builder.get(WebResource.java:507)
  at com.main.WebServiceClient.callWebService(WebServiceClient.java:25)
  at com.main.Test.main(Test.java:7)
  </code></pre>