[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.aspnet.webservices

Send Object to webservice problem cast

news.microsoft.com

6/9/2004 8:47:00 AM

Hi all,

I have a class LiveSupportClass.Config

[Serializable()]

[XmlRoot("LiveSupportClass.Config")]

public class Config : ISerializable

{

......

My webservice return this object

[WebMethod (Description="LiveSupportClass.Config Object")]

[XmlInclude(typeof(LiveSupportClass.Config))]

public LiveSupportClass.Config LoadSettings (string idclient)

{

......

Now my problem I the client (Win form) the return of my webservice is not
a LiveSupportClass.Config but mynamespace.webserviceclass.Config



Where is the problem

thanks for your help or suggestion



Costa Lino


1 Answer

User

6/10/2004 11:05:00 AM

0

I've solved this problem in this way.
When you add a web reference, VisualStudio creates
a wrapper of your web service in the file Reference.vb

Look in that file you'll se that the return value
will be of type Config.

To solve the prolem add, just before Config, LiveSupportClass.
You have also to specify the class or add the reference of the
class LiveSupportClass in you application.

Bye
Andrea



In article <eGTxp2eTEHA.1048@tk2msftngp13.phx.gbl>,
costalino@hotmail.com says...
> Hi all,
>
> I have a class LiveSupportClass.Config
>
> [Serializable()]
>
> [XmlRoot("LiveSupportClass.Config")]
>
> public class Config : ISerializable
>
> {
>
> ......
>
> My webservice return this object
>
> [WebMethod (Description="LiveSupportClass.Config Object")]
>
> [XmlInclude(typeof(LiveSupportClass.Config))]
>
> public LiveSupportClass.Config LoadSettings (string idclient)
>
> {
>
> ......
>
> Now my problem I the client (Win form) the return of my webservice is not
> a LiveSupportClass.Config but mynamespace.webserviceclass.Config
>
>
>
> Where is the problem
>
> thanks for your help or suggestion
>
>
>
> Costa Lino
>
>
>