Need Help: Problem using RPC Encoding in WCF

Oct 20, 2008 at 4:49 PM
Hi,

I have a webservice which uses RPC encoding, I get only null values in the parameters that I receive in the service. Please point out what is missing here..

Service Contract:

 

[ServiceContract(Namespace = http://abcd.com), DataContractFormat(Style=OperationFormatStyle.Rpc) ]

 

 

public interface IReceiverService

 

{

[

OperationContract(Action = "", ReplyAction = "*")]

 

 

string[] NotifyMethod(string end_point, string notification_type);

 

 

 

}

 


Client Proxy

 

 

[System.CodeDom.Compiler.

GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]

 

[System.ServiceModel.

ServiceContractAttribute(Namespace = "http://abcd.com", ConfigurationName = "WebServiceTest")]

 

public

 

interface WebServiceTest

 

{

[System.ServiceModel.

OperationContractAttribute(Action = "", ReplyAction = "*")]

 

[System.ServiceModel.

XmlSerializerFormatAttribute(Style = System.ServiceModel.OperationFormatStyle.Rpc, Use = System.ServiceModel.OperationFormatUse.Encoded)]

 

[

return: System.ServiceModel.MessageParameterAttribute(Name = "NotifyEventReturn")]

 

 

string[] NotifyEvent(string end_point, string notification_type);

 

}

[System.CodeDom.Compiler.

GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]

 

public

 

interface WebServiceTestChannel : WebServiceTest, System.ServiceModel.IClientChannel

 

{

}

[System.Diagnostics.

DebuggerStepThroughAttribute()]

 

[System.CodeDom.Compiler.

GeneratedCodeAttribute("System.ServiceModel", "3.0.0.0")]

 

public

 

partial class WebServiceTestClient : System.ServiceModel.ClientBase<WebServiceTest>, WebServiceTest

 

{

 

public WebServiceTestClient()

 

{

}

 

public WebServiceTestClient(string endpointConfigurationName) :

 

 

base(endpointConfigurationName)

 

{

}

 

public WebServiceTestClient(string endpointConfigurationName, string remoteAddress) :

 

 

base(endpointConfigurationName, remoteAddress)

 

{

}

 

public WebServiceTestClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) :

 

 

base(endpointConfigurationName, remoteAddress)

 

{

}

 

public WebServiceTestClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) :

 

 

base(binding, remoteAddress)

 

{

}

 

public string[] NotifyEvent(string end_point, string notification_type)

 

{

 

return base.Channel.NotifyEvent(end_point, notification_type);

 

}

}

When I execute the client, on the server i receive only null parameters. Why is it so? What am I missing here?