0
我是新來使用WCF服務但開始寫一個新的項目,並已就遇到了這個問題,當它的價值。我也是編程新手,如果措辭不正確,請原諒我!WCF - 對象失去傳遞給WCF服務
我有一個稱爲檔案,我可以檢索WCF我的客戶端上的對象,而且工作沒有問題 - 使用GetProfile方法。
我當時就想進行修改,在客戶端的對象,並使用UpdateProfile方法發送回通過WCF服務。此時,對象似乎總是被重新實例化(因此將所有值覆蓋爲空)。
任何幫助表示讚賞。
所以GetProfile方法精美的作品。 變更這個RAIS_Profile我的客戶端上精美的作品 發送RAIS_Profile回用UpdateProfile和對象中的所有值是空白,一旦該方法。
Public Function GetProfile(ByVal DocumentNumber As Integer) As RAIS_Profile Implements IRAISAPI.GetProfile
Dim Doc As New RAIS_Profile
'blah
'blah
Return Doc
End Function
Public Function UpdateProfile(ByVal pDoc As RAIS_Profile) As String Implements IRAISAPI.UpdateProfile
Return pDoc.DocumentNumber
End Function
任何幫助表示讚賞!
你有沒有你的標記與DataMemberAttribute的RAIS_Profile對象的屬性? – user957902
您可以發佈您在客戶端上更新RAIS_Profile的代碼,然後調用UpdateProfile方法。你還可以發佈RAIS_Profile類的代碼嗎? –