TechGuru
TechGuru

Reputation: 439

Operation name is not coming in WSDL

I have created a WCF service and my interface looks like below:-

[ServiceContract]
public interface IService1
 {    
   [OperationContract(Action = "GetData")]
   CompositeType GetDataUsingDataContract(CompositeType composite);   
 }

here i am using Action name and when i am generating WSDL from this service i am getting operation name like below :

enter image description here

but when i am using wildcard for action like below :

[ServiceContract]
public interface IService1
 {    
   [OperationContract(Action = "*")]
   CompositeType GetDataUsingDataContract(CompositeType composite);   
 }

here i am not getting operation name in my WSDL.

enter image description here

My question is that how can i use wildcard by generating operation name in WSDL. Please help me to solve this issue or give me suggestions for achieving this.

Upvotes: 0

Views: 372

Answers (1)

spodger
spodger

Reputation: 1679

You can only use [OperationContract(Action = "*")] if your service operation takes a Message object and returns a Message object or void.

See the MSDN documentation for OperationContractAttribute.Action Property

Upvotes: 2

Related Questions