I am creating a WCF POX proxy using the generic ClientBase base class against a fixed specification.
The specification has items created with a POST call to an endpoint. With no body response packet and header status of (201 Created) and the ID of the item in the header collection with the key of Location.
The item is being created but my WCF proxy is raising the following error:
Unexpected end of file
I have started down the route of creating a custom IClientMessageFormatter but the:
IClientMessageFormatter.DeserializeReply(Message message, object[] parameters)
is still being called to late. I am assuming, in order to intercept the responseStream before it is read I have to hook in deeper within the Behavior class.
Any help will be greatly appreciated.
Revision 1.
HTTP/1.1 201 Created
Server: nginx/1.0.5
Date: Thu, 13 Oct 2011 23:52:34 GMT
Content-Type: application/xml; charset=utf-8
Transfer-Encoding: chunked
Connection: keep-alive
Status: 201 Created
X-Throttle-Max: 500
X-Throttle-Count: 1
Location: https://sample.com/categories/1.xml
X-Throttle-Horizon: 2011-10-13T23:52:40Z
X-Runtime: 232
Set-Cookie: transition_token=BAhbB2kD8bSUSXU6CVRpbWUNwOUbwAkZIdIGOh9AbWFyc2hhbF93aXRoX3V0Y19jb2VyY2lvblQ%3D--de2dc7f909ce89e0ce9f2307ac43ddfc171442b7; path=/; secure
Set-Cookie: _sample_session=BAh7BzoQaWRlbnRpdHlfaWRpA2eiKjoPc2Vzc2lvbl9pZCIlNGVlNWMzNWY4MzdmZmM3MGNlNzE1ZjdjZmM5MDhmYmY%3D--d8927e076329846e844f9f73b4d587c697628481; path=/; HttpOnly; secure
Cache-Control: no-cache
Strict-Transport-Security: max-age=31536000
1
0
Above is the response. It has both no body and a content-type = application/xml. WCF doesn't know how to reconcile this for some reason. So, that is why I am trying to intercept the WCF Binding or Behavior before the responseStream is read.
I would like to see if someone can point me the right direction. Thanks.