开发者

WCF webHttpBinding post to apache service

I am trying to communicate with an Apache service from a WCF client

I have set up the client like 开发者_如何学运维this:

<client>
    <endpoint name="ApacheService" 
              address="SomeUrl" 
              behaviorConfiguration="ApacheBehavior" 
              binding="webHttpBinding" 
              contract="ISomeContrect" />
</client>
<behaviors>
    <endpointBehaviors>
        <behavior name="ApacheBehavior">
            <webHttp />
        </behavior>
    </endpointBehaviors>
</behaviors>

and my contract looks like

    [OperationContract]
    [WebInvoke(Method = WebRequestMethods.Http.Post, 
               RequestFormat = WebMessageFormat.Json, 
               BodyStyle = WebMessageBodyStyle.Bare,
               UriTemplate = "?user={username}&action=someaction")]
    void dosomeaction(string username, List<SomeJSONSerializableObject> data);

Don't know what framework is used on the receiving side but the user and action variables are presented as get variables and the json payload is not seen at all.

debug started
post:
Array
(
)
get:
Array
(
    [user] => someusername
    [action] => someaction
)
json:

I did some local tests with a WCF service and it works fine.

Any ideas what ca be wrong?


Never mind. It was some error on the Apache side

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜