How to convert a predicateexpression object to an xml string

Posts   
 
    
ilango
User
Posts: 1
Joined: 12-Oct-2005
# Posted on: 12-Oct-2005 11:23:35   

Hello everybody,

I am unable to pass the predicateexpression object into a webservice method as a parameter, since the predicateexpression is not serializable. So, I want to convert the predicateexpression object to an xml string.

If any body knows, please inform me.

S Ilangovan

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 12-Oct-2005 15:54:59   

Hi,

You have 3 options:

1) Don't pass the predicateexpression to a webmethod, either pass parameters and construct it later in the server (My favorite choice)

2) serialize it to a string using the SoapFormatter, and pass the string to the webmethod

3) serialize to a memstream using the binary formatter and base64 encode the stream and send that to the server