2016-06-26 8 views
0

私は、次のvb.netのWebサービスコードしている:私のようなコードをvb.net WCF Iservice(文字列の)リストとリスト(mycustomclassのは)

Public Interface IService 
    <OperationContract()> 
    Function SendEmail(CustomerNo As Int32, Password As String, FromEmail As String, _ 
     ToEmail As List(Of String), CCemail As List(Of String), Subject As String, _ 
     body As String, AttachmentList As List(Of DocumentDatabaseInfo)) As Boolean 
End Interface 

クライアント側を持っています:

client.SendEmail(_Customer_CustomerNo, "duh", "[email protected]", myToList, myCcList, "testing", "testing", myAttachmentList)) 
  • myToListList(Of String)
  • myAttachmentListあるList(Of my custom class)
  • であります

myToList、およびmyCCList私にエラーを与える:

Value of type 'List(Of String)' cannot be converted to "String()'

myAttachmentListは私に同様のエラーを与える:

Public Class DocumentDatabaseInfo 
    Property CustomerNo As Int32 
    Property DatabaseName As String 
    Property DatabaseTableName As String 
End Class 

Value of type 'List(of DocumentDatabaseInfo)' cannot be converted to 'DocumentDatabaseInfo()'

DocumentDatabaseInfoクラスは次のようになりますクラスファイルiクライアントとWebサービスの両方のサーバー上にあります。

これを解決する方法についてのご意見はありますか?

+0

ようこそStackOverflow:コード、XML、またはデータサンプルを投稿する場合、**これらの行をテキストエディタで強調表示し、エディタツールバーの[コードサンプル]ボタン( '{}')をクリックしてくださいフォーマットと構文はそれを強調する! –

+0

ありがとう、私はウェブサイトの初心者です。 – Chris

答えて

0

WCFコントラクトのリストの代わりに配列を使用してみてください。

関連する問題