Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Web Services and the fly likes Service Rest between Java and C# applications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Service Rest between Java and C# applications" Watch "Service Rest between Java and C# applications" New topic
Author

Service Rest between Java and C# applications

erwan clement
Greenhorn

Joined: Jul 25, 2012
Posts: 2
Hi,
after several days of struggling, i come here to ask some help.
I need to exchange a XML file between a C# application (server) and a java application (client).
The client give a parameter to a server and this one give an answer with the help of the parameter.
So, at first, I try to do a Get request from the client and the server do a put request. Is that correct ?

Here is the Get request :


And on the server side :


But I have always an error 500 and I really don't know why !
How can I correct my code ?

Thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12761
    
    5
I try to do a Get request from the client and the server do a put request.


The server should respond to a GET request in a method mapped to the GET method by writing a response body containing the XML.

The PUT method would be used if your client was sending a document to the server.


Bill
erwan clement
Greenhorn

Joined: Jul 25, 2012
Posts: 2
Yeah, I figured it out sooner today...
Thanks anyway, your response would be useful !
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Service Rest between Java and C# applications
 
Similar Threads
Method BufferedReader.close() affect on InputStream?
HttpURLConnection got stack when trying to invoke
Error 405 with HttpUrlConnection when request web service
unable to run restful webserive
Performance Issue: HttpURLConnection