Are you sure you want to post to port 8080?

matt wrote:
Does anyone have an example they'd be willing to share demonstrating how to
properly post an xml document to a restlet service?  I've been unsuccessful so
far with the following, as well as several other alternatives.
StringRepresentation represent = new StringRepresentation(xmlString,
MediaType.APPLICATION_XML);
Client client = new Client(Protocol.HTTP);
Response response =
client.post("http://127.0.0.1:8080/Resources/api/department";, represent);


In general, I have yet to see anything show up on the service side. And the
client side throws the following error when trying the above:

Unable to complete the HTTP call due to a communication error with the remote
server. socket closed.

Thanks,
matt


Reply via email to