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);
不知道接收端使用什么框架,但用户和操作变量显示为获取变量并且根本看不到 json 有效负载。
debug started
post:
Array
(
)
get:
Array
(
[user] => someusername
[action] => someaction
)
json:
我使用 WCF 服务做了一些本地测试,效果很好。
有什么想法可能是错的吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没关系。这是 Apache 方面的一些错误
Never mind. It was some error on the Apache side