WebServices 2.0

Posts   
 
    
Answer
User
Posts: 363
Joined: 28-Jun-2004
# Posted on: 12-Sep-2005 18:31:32   

Frans,

Inorder to use webservices in .NET 2.0 one can utilize the schema import extensions to mod the proxy. Which i have been able to do with custom objects but not with llblgen entities yet. I think the reason is becuase IXmlSerializable needs to be implemented ina slightly different way.

here is a link with some info: http://mtaulty.com/blog/(5wxr3sus4pij0t2wx3krhq45)/archive/2004/05/20/422.aspx

But it seems the generated code is lacking a [XmlSchemaProvider ("OrderSchema")] attribute. And then in this case, a function called OrderSchema also would need to be implemented for that entity that returns a schema. I could implement this myself, however i know basically nothing about XML nor what the schema would look like rage

         public static XmlQualifiedName OrderSchema (XmlSchemaSet xs)
        {
            XmlSerializer schemaSerializer = new XmlSerializer (typeof(XmlSchema));
            XmlSchema s=(XmlSchema)schemaSerializer.Deserialize (new XmlTextReader (HttpContext.Current.Server.MapPath("Order.xsd")), null);
            xs.XmlResolver = new XmlUrlResolver ();
            xs.Add (s);
            return new XmlQualifiedName ("Order", OrdersNamespace);
        }

That is how they implemented it in the example im looking at which is available at

http://msdn2.microsoft.com/en-us/library/h2byscsb(en-us,vs.80).aspx

Whats happening now is that since the above function isnt working, when the schema importer extension is run, it never gets called since .NET thinks its a dataset and just skips it, so i never get the chance to mod the proxy.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Sep-2005 11:07:54   

thanks for the links. I'll look into it. It was on the plan for 1.0.2005.1, though not enough time was available to implement it in full, though I'll see if I can still add something to make it more simpler on .NET 2.0 during the beta period, but I can't promise anything.

Frans Bouma | Lead developer LLBLGen Pro