Posted by muhfak
on June 23, 2008 at 4:01 AM PDT
I am bit of a bother here, hope some one might be able to help.
I have a struts application, in which I am being hit at a particular action url say (https://localhost/apolloweb/billing/sureScriptIncommingMessage.do ),
Now at this action I want to read the body content, it was supposed to be in xml form but i have no idea how to read the request content.
I also have to send some xml data to a particular url, which I have achieved through this code:
post = new PostMethod(directoryUrlToPost);
post.setRequestHeader("Authorization", "Basic HGTFSas);
HttpClient client = new HttpClient();
int result = client.executeMethod(post);
strXMLResponse = post.getResponseBodyAsString();
logger.debug("Response from Sure Script: " );
I have not tested this code but I think it will work, Now the receiver of this message will be sending the response of this data
Back to me in the same way as I am doing above.
Now could any body help me out how to read out the xml when a certain request hit your server like the above code is.
Many thanks in advance.