[Mono-list] WCF/JSON POST get error 415, expected content-type application/xml not application/json

Atsushi Eno atsushieno at veritas-vos-liberabit.com
Sun Apr 18 23:15:08 EDT 2010


Hello,

When it comes to WCF service stuff, 2.6 is already too outdated and only 
trunk (or daily build) is worth checking i.e. 2.6 won't work for several 
usage.

Though trunk wouldn't work fine for such UriTemplating stuff especially 
if you have configured wsdl support, due to very complicated design 
issue in WCF itself that made ours messed:
http://anonsvn.mono-project.com/viewvc/trunk/mcs/class/System.ServiceModel/HTTP_listener_notes.txt?view=log

If you still see the issue, please post a complete (but simplified) set 
of working repro code to bugzilla.

Atsushi Eno

On 2010/04/19 6:36, Iain Mcleod wrote:
> Also, I may as well add this stack trace, obtained when I switched my
> services across to use WebMessageFormat.Xml with
> WebMessageBodyStyle.Wrapped.  It happens every time I make a request.
>
> Regards
> Iain
>
>                           ----------------------
>
> Exception There is already message property for Web body format   at
> System.ServiceModel.Dispatcher.WebHttpDispatchOpera
> tionSelector.SelectOperation (System.ServiceModel.Channels.Message&  message,
> System.Boolean&  uriMatched) [0x00000] in<f
> ilename unknown>:0
>    at
> System.ServiceModel.Dispatcher.WebHttpDispatchOperationSelector.SelectOperation
> (System.ServiceModel.Channels.Messa
> ge&  message) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.OperationInvokerHandler.GetOperation
> (System.ServiceModel.Channels.Message input, Sy
> stem.ServiceModel.Dispatcher.DispatchRuntime dispatchRuntime) [0x00000] in
> <filename unknown>:0
>    at System.ServiceModel.Dispatcher.OperationInvokerHandler.ProcessRequest
> (System.ServiceModel.Dispatcher.MessageProces
> singContext mrc) [0x00000] in<filename unknown>:0
>    at
> System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
> (System.ServiceModel.Dispatcher.Mess
> ageProcessingContext mrc) [0x00000] in<filename unknown>:0
>    at
> System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
> (System.ServiceModel.Dispatcher.Mess
> ageProcessingContext mrc) [0x00000] in<filename unknown>:0
>    at
> System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
> (System.ServiceModel.Dispatcher.Mess
> ageProcessingContext mrc) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.HandlersChain.ProcessRequestChain
> (System.ServiceModel.Dispatcher.MessageProcessingC
> ontext mrc) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.BaseRequestProcessor.ProcessRequest
> (System.ServiceModel.Dispatcher.MessageProcessin
> gContext mrc) [0x00000] in<filename unknown>:0
> System.NullReferenceException: Object reference not set to an instance of an
> object
>    at System.ServiceModel.Dispatcher.MessageProcessingContext.Reply (Boolean
> useTimeout) [0x00000] in<filename unknown>:
> 0
>    at System.ServiceModel.Dispatcher.ErrorProcessingHandler.ProcessRequest
> (System.ServiceModel.Dispatcher.MessageProcess
> ingContext mrc) [0x00000] in<filename unknown>:0
>    at
> System.ServiceModel.Dispatcher.BaseRequestProcessorHandler.ProcessRequestChain
> (System.ServiceModel.Dispatcher.Mess
> ageProcessingContext mrc) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.HandlersChain.ProcessRequestChain
> (System.ServiceModel.Dispatcher.MessageProcessingC
> ontext mrc) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.BaseRequestProcessor.ProcessRequest
> (System.ServiceModel.Dispatcher.MessageProcessin
> gContext mrc) [0x00000] in<filename unknown>:0
>    at
> System.ServiceModel.Dispatcher.InputOrReplyRequestProcessor.ProcessReply
> (System.ServiceModel.Channels.RequestConte
> xt rc) [0x00000] in<filename unknown>:0
>    at System.ServiceModel.Dispatcher.ListenerLoopManager.ProcessRequest
> (IReplyChannel reply, System.ServiceModel.Channel
> s.RequestContext rc) [0x00000] in<filename unknown>:0
>    



More information about the Mono-list mailing list