0

I have a WCF service deployed at a certain server.

I need to call it through the JAVA application, when i am checking the parameter for this OperationContract is being passed correctly from java side but when i am logging the parameter value in WCF service, it seems not to be received here.

We are using 'basicHttpBinding' only and the attributes set for the Service and OperationContracts are as follows :-

[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);
}

Can any body check if this is correct or may suggest with all the steps so that a WCF can be accessed properly through JAVA application ?

SmrutiRanjan
  • 65
  • 1
  • 8

2 Answers2

0

For REST ful WCF, try using WEbHTTPBinding rather basic HTTP. REST WCF support WebHTTPBindings

0

WebInvoke attribute is not used for BasicHttpBinding (It is for webhttpBinding). You can take that out. One way to diagnose is open config in wcf config editor (SvcConfigEditor.exe). Enable tracing (search for enabling wcf tracing), make a request to service which will generate trace file. Check the log in Trace viewer (svtraceviewer.exe). You will find place where it is failing.

avi
  • 178
  • 2
  • 9