Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Service Rest between Java and C# applications

 
erwan clement
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yeah, I figured it out sooner today...
Thanks anyway, your response would be useful !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic