HI All,

I need to post an XML entity to a restful web-service, however my service
isn't picking up the request for some reason, I'm getting a null value for
my request.

Can someone please guide me in the right direction.  I'm using the JAXB
Provider.

Here's my service:

@POST
    @Produces({ MediaType.APPLICATION_XML })
    public Response execute(@QueryParam("") MmsBillingRequest request)
throws Exception {
        System.err.println("REQUEST RECEIVED");
        Response response = new Response();
        try {
             request.getOriginatorInterface();


My Test Client:

    String xmlRequest = "<MmsBillingRequest> "
                        + "  <originatorMsisdn>27823339811
</originatorMsisdn>"
                        + "  <originatorInterface />" + " <payloadSize/>"
                        + "  <messageClass/>" + "  <readRepRequested/>"
                        + "  <timeStamp/>" + "  <recipients/>"
                        + "</MmsBillingRequest>";

                // ****************

                WebClient wc = WebClient.create(

                        "
http://localhost:9090/deploy-mms-billing/rest//function/mmsBilling";,
                        "test", "test", null);

                wc.type("application/xml").accept("application/xml");



                    long l1 = System.currentTimeMillis();
                    // Response response = wc.get(Response.class);
                    Response response = wc.post(xmlRequest);
                    System.out.println(response.getEntity());


Regards
Kiren

Reply via email to