WCF webHttpBinding发布到apache服务
我正在尝试从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服务做了一些本地测试,它运行正常。
有什么想法可能是错的吗?
没有找到相关结果
已邀请:
1 个回复
芦歉竭皑