views:

365

answers:

0

I have created an application in silverlight 3 beta. I am trying to access a dataset from Silverlight enabled WCF. I have created the WCF. I have added its reference to the silverlight app, but the ServiceReferences.ClientConfig file shows error "ServiceReference1.ArrayOfXElement not declared" in the code. The code is as follows:

Partial Public Class DoWorkResponse  
    <System.ServiceModel.MessageBodyMemberAttribute([Namespace]:="", Order:=0), _
     System.Xml.Serialization.XmlElementAttribute(IsNullable:=True)> _
    Public DoWorkResult As ServiceReference1.ArrayOfXElement

    Public Sub New()
        MyBase.New
    End Sub

    Public Sub New(ByVal DoWorkResult As ServiceReference1.ArrayOfXElement)
        MyBase.New()
        Me.DoWorkResult = DoWorkResult
    End Sub
End Class

And my ServiceReferences.ClientConfig file is empty. There is even a problem in creating the proxy object as:

Dim proxy As ServiceReference1.MyWebServiceClient = New ServiceReference1.MyWebServiceClient()
    AddHandler proxy.DoWorkCompleted, AddressOf proxy_DoWorkCompleted

on first line it shows the error that key is not found in dictionary. That's why I am not getting the property e.Result to collect the value returned from the web service.

Please help me. I have been stuck here for the last two days.

Thanks in advance