Hello everybody!
I'm using VS2008 and I'm new with WCF. I have the following problem:
I have a function in the IService:
" <OperationContract()> _
Function SaveData(ByRef BaseDS As DataSet) As Boolean"
In my Client, i want to call the Function with a Typed Dataset,
for example:
"Dim changes = CType(Me.CustomersDataSet.GetChanges, DataSet)
If changes IsNot Nothing Then
Using proxy As New BaseDataServices.BaseDataServiceClient
proxy.SaveData(changes)
End Using
End If"
But i recieve the following Error:
"Was presented a fault at the effort of serielizing parameter http://tempuri.org/:BaseDS. Was the message of InnerException isn't expected type 'Entities.BaseDataSet' with name of convention of given 'BaseDataSet: http://schemas.datacontract.org/2004/07/Entities'. Add any types that are not statically acquaintance in the list with the known types - as an example, using characteristic KnownTypeAttribute or adding are transmitted to them in the list with the known types that in the DataContractSerializer.'. See InnerException for more details."
Note:This message is translated from Greek.
I have no DataContract.
I tried the following :
" <OperationContract()> _
<ServiceKnownType(GetType(System.Data.Dataset))> _
<ServiceKnownType(GetType(Entities.CustomersDataset))> _
Function SaveData(ByRef BaseDS As DataSet) As Boolean"
I steel recieve the same Error.
What can i do to solve this?
Sorry for my English....
And thanks in andvanced!
I'm using VS2008 and I'm new with WCF. I have the following problem:
I have a function in the IService:
" <OperationContract()> _
Function SaveData(ByRef BaseDS As DataSet) As Boolean"
In my Client, i want to call the Function with a Typed Dataset,
for example:
"Dim changes = CType(Me.CustomersDataSet.GetChanges, DataSet)
If changes IsNot Nothing Then
Using proxy As New BaseDataServices.BaseDataServiceClient
proxy.SaveData(changes)
End Using
End If"
But i recieve the following Error:
"Was presented a fault at the effort of serielizing parameter http://tempuri.org/:BaseDS. Was the message of InnerException isn't expected type 'Entities.BaseDataSet' with name of convention of given 'BaseDataSet: http://schemas.datacontract.org/2004/07/Entities'. Add any types that are not statically acquaintance in the list with the known types - as an example, using characteristic KnownTypeAttribute or adding are transmitted to them in the list with the known types that in the DataContractSerializer.'. See InnerException for more details."
Note:This message is translated from Greek.
I have no DataContract.
I tried the following :
" <OperationContract()> _
<ServiceKnownType(GetType(System.Data.Dataset))> _
<ServiceKnownType(GetType(Entities.CustomersDataset))> _
Function SaveData(ByRef BaseDS As DataSet) As Boolean"
I steel recieve the same Error.
What can i do to solve this?
Sorry for my English....
And thanks in andvanced!
Last edited: