0

我正在尝试从 WCF 客户端与 Apache 服务进行通信

我已经这样设置了客户端:

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

我的合同看起来像

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

不知道接收端使用什么框架,但用户和操作变量显示为 get 变量,根本看不到 json 有效负载。

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

我用 WCF 服务做了一些本地测试,它工作正常。

有什么想法有什么问题吗?

4

1 回答 1

0

没关系。这是Apache方面的一些错误

于 2011-04-07T10:37:37.410 回答