繁体   English   中英

WCF服务在调用它时未获取Java应用程序提供的参数

[英]WCF Service is not getting the parameter supplied from java application while calling it

我在某个服务器上部署了WCF服务。

我需要通过JAVA应用程序调用它,当我检查该OperationContract的参数是否已从Java端正确传递时,但是当我在WCF服务中记录参数值时,似乎在这里未收到它。

我们仅使用“ basicHttpBinding”,并且为Service和OperationContracts设置的属性如下:-

[ServiceContract]
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[XmlSerializerFormat(Style = OperationFormatStyle.Rpc, Use =     OperationFormatUse.Encoded)]
public interface IMyService
{
    [WebMethod]
    [OperationContract(Action = @"http://tempuri.org/GetString")]
    [WebInvoke(Method = "GET", BodyStyle = WebMessageBodyStyle.Wrapped)]
    string GetString(string strParameters);
}

任何机构都可以检查这是否正确,或者可以建议所有步骤,以便可以通过JAVA应用程序正确访问WCF?

对于RESTful WCF,请尝试使用WEbHTTPBinding而非基本HTTP。 REST WCF支持WebHTTPBindings

WebInvoke属性不用于BasicHttpBinding(用于webhttpBinding)。 你可以拿出来。 一种诊断方法是在wcf配置编辑器(SvcConfigEditor.exe)中打开配置。 启用跟踪(搜索以启用wcf跟踪),请求服务将生成跟踪文件。 检查跟踪查看器(svtraceviewer.exe)中的日志。 您将找到发生故障的地方。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM