【问题标题】:WCF webHttpBinding post to apache serviceWCF webHttpBinding 发布到 apache 服务
【发布时间】:2011-07-31 11:19:43
【问题描述】:

我正在尝试从 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 服务进行了一些本地测试,它运行良好。

有什么想法会出错吗?

【问题讨论】:

    标签: wcf apache wcf-client webhttpbinding


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-10
      相关资源
      最近更新 更多