Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Did you try setRequestEntityBuffering(true) like this: ClientResource cr = new ClientResource(// uri //); cr.setRequestEntityBuffering(true); It work for me. -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Restlet-ClientResource-Post-Chunked-Encoding-WCF-Unsuported-tp455p7313256.html Sent from the Restlet Discuss mailing list archive at Nabble.com. -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2926003
Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Hello Luiz, Restlet post my xml with Transfer-Encoding: chunked, and my WCF service, can't to interpret posted content That sounds quite strange, because this is a quite basic feature of HTTP. What do you mean by my WCF service can't interpret the posted content? Do you receive an error status? Does the WCF service receive an incomplete XML file? best regards, Thierry Boileau Hello All, I'm developing a product that will use extensively of Restlet for consume WCF Rest Services. I had created a method to post a XML of a class containing 2 attributes. Restlet post my xml with Transfer-Encoding: chunked, and my WCF service, can't to interpret posted content, unfortunately WCF continues can't to deserialize my class parameters. I had tryed use the solution described here: http://osdir.com/ml/java.restlet/2007-05/msg00097.html, but won't worked for me. My restlet client continues to post my request content using Transfer-Encoding: chunked. =( Anybody had a problem like this? Can anybody help-me??? Thanks all and sorry by bad bad english =) Luiz Alberto luiz...@gmail.com mailto:luiz...@gmail.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427754
RE: Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Hello Thierry, Restlet post my xml with Transfer-Encoding: chunked, and my WCF service, can't to interpret posted content That sounds quite strange, because this is a quite basic feature of HTTP. I had read about WCF not support chunked request, but not in officialy source. I tried to found something about this in MSDN, but I not found. What do you mean by my WCF service can't interpret the posted content? Do you receive an error status? Does the WCF service receive an incomplete XML file? I won't recieved any error messages, but, I'm receiving a null value for my Services attributes. Thanks, -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427866
RE: Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Hello Ben, Yes, I had tried to use StringRepresentation, and my request continues to be Chunked. Thanks, -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427857
Re: Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
In my case my response with JsonRepresentation was being chunked due to what I believe was a bug with JsonRepresentation (reported on this list, but I think it must be stuck in moderation as there has been no response). My approach to find out why I was getting the chunked header was to step through Restlet code in the debugger and see which code path was setting that header. In my case it turned out that JsonRepresentation does not know its content length when it is constructed via JsonRepresentation(String). You are probably having a different problem, but see if you can track down the reason for the chunked header being added. On Mon, Dec 7, 2009 at 8:10 AM, Luiz Alberto luiz...@gmail.com wrote: Hello Ben, Yes, I had tried to use StringRepresentation, and my request continues to be Chunked. Thanks, -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427857 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427910
Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Hi Luiz, There are two cases a StringRepresentation has an unknown size: - the underlying string is null - an UnsupportedEncodingException is thrown when the size of the StringRepresentation is computed. The second case happens in the updateSize method: if (getCharacterSet() != null) { setSize(getText().getBytes(getCharacterSet().getName()).length); } else { setSize(getText().getBytes().length); } Do you specify a CharacterSet? If not, what is your default one? Best regards, Thierry Boileau Hello Ben, Yes, I had tried to use StringRepresentation, and my request continues to be Chunked. Thanks, -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427857 -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2428086
Re: Restlet ClientResource Post Chunked Encoding - WCF Unsuported
Did you try sending a StringRepresentation instead of some other type? On Thu, Dec 3, 2009 at 2:01 PM, Luiz Alberto luiz...@gmail.com wrote: Hello All, I'm developing a product that will use extensively of Restlet for consume WCF Rest Services. I had created a method to post a XML of a class containing 2 attributes. Restlet post my xml with Transfer-Encoding: chunked, and my WCF service, can't to interpret posted content, unfortunately WCF continues can't to deserialize my class parameters. I had tryed use the solution described here: http://osdir.com/ml/java.restlet/2007-05/msg00097.html, but won't worked for me. My restlet client continues to post my request content using Transfer-Encoding: chunked. =( Anybody had a problem like this? Can anybody help-me??? Thanks all and sorry by bad bad english =) Luiz Alberto luiz...@gmail.com -- http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=2427722