Hi guys
I have the following:
[ServiceContract]
[ServiceKnownType(typeof(ActionParameters))]
[ServiceKnownType(typeof(SportProgram))]
[ServiceKnownType(typeof(ActionResult<SportProgram>))]
public interface ISportProgramBl
{
[OperationContract]
IActionResult<ISportProgram> Get(IActionParameters parameters);
}
When I run the ...
I have an service Interface:
[ServiceContract]
[ServiceKnownType(typeof(Models.ArticleImage))]
public interface IPhotoManagementService
{
[OperationContract]
bool Login(string username, string password);
[OperationContract]
bool IsLoggedIn();
[OperationContract]
void UpdateImage(string articleID, string selectedImage);
}
As yo...
I am having a little trouble understanding ServiceKnownType in WCF.
Taken from this blog, the following code does not work:
[DataContract(Namespace = “http://mycompany.com/”)]
public class Shape{…}
[DataContract(Namespace = “http://mycompany.com/”)]
public class Circle : Shape {…}
[ServiceContract]
public interface IMyServer
{
[O...
I am trying to apply the ServiceKnownTypeAttribute to my WCF Service but keep getting the error below my config. Does anyone have any ideas?
<object id="HHGEstimating" type="Spring.ServiceModel.ServiceExporter, Spring.Services">
<property name="TargetName" value="HHGEstimatingHelper"/>
<property name="Name" value="HHGEstimat...
i am using third party classes in my service, so i cant edit them.
third party
[Serializable]
Class B : E
[Serialazable]
Class E : A
service
[ServiceKnownType(typeof(B))]
[ServiceKnownType(typeof(E))]
fun(A pic)
client
for some reason :
proxy.fun(object)
throw an exception that B is unexpected and add it to ...
I'm trying to implement a service contract that contains a method which takes a generic interface, and that generic interface itself is given an interface parameter. I've decorated the service interface with ServiceKnownType, I have decorated the service implementation with regular KnownType, and I have decorated the datacontract impleme...
I have a WCF serivic and Im sharing types with a client in a shared assembly.
If the client create a derived class will it be possible to pass back the derived type to the service so that I can read the added properties through reflection ?
I tried but having issues with KnownTypes since the service dont know how to deserialize the deri...
Guys,
I am having problems creating WCF client proxy for service code like in this example:
// data classes
[KnownType(typeof(ClassA))]
[KnownType(typeof(ClassB))]
public abstract class BaseClass : Dictionary<string, ITest>
{
}
public class ClassA : BaseClass
{
}
public class ClassB : BaseClass
{
}
public interface ITest
{
}
// se...
How would I tell the WCF service what KnownTypes to use when passing data back to the client?
I know I can use the [ServiceKnownType] attribute, which makes the service call run fine from a WCF Test Server, however it still fails from the client. Am I missing something here?
[OperationContract]
[ServiceKnownType(typeof(SubClassA))]
[Se...