aspose file tools*
The moose likes Servlets and the fly likes HttpURLConnection - Posting XML to a servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpURLConnection - Posting XML to a servlet" Watch "HttpURLConnection - Posting XML to a servlet" New topic
Author

HttpURLConnection - Posting XML to a servlet

John Fairbairn
Ranch Hand

Joined: May 30, 2002
Posts: 55
Hi,
Ok... this is really frustrating me so I hope you can help.I'm trying to post XML to a servlet from a java client. The XML is never received by the servlet.I've posted the client and servlet code below. Any help is appreciated.
Thanks.
Java Client

Servlet
John Fairbairn
Ranch Hand

Joined: May 30, 2002
Posts: 55
Oh yeah, I'm not getting any exceptions thrown in the java client either - so I'm not sure what the problem is.
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi
just try to post a simple String to the same servlet from the same java client program and see if it is working. if it doesn't then look at here
this helped the other person to solve the problem. i'm not sure if this can solve yours....
thanks
maulin
John Fairbairn
Ranch Hand

Joined: May 30, 2002
Posts: 55
Thanks Maulin.
It worked. The thread you sent me helped.
I've posted my client and servlet code below.
Client

Servlet


Cheers!
John
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpURLConnection - Posting XML to a servlet