Creating XSD Message request using Service Factory

Topics: Service Factory Modeling Edition Forum
Feb 5, 2008 at 12:00 AM
Hi, I have created a project using XSD Message as a request. I am loading at the Element my OAGIS 9.1 XSD (called Invoice.XSD), so far looks works good. The start element for the Invoice.XSD is 'Event' which has a child element 'Payload' and 'Payload' a child element called 'Invoice'. After I create the proxy at the client, when I am creating an instance of the request, I would like to be able to load the XML document at the 'Event', instead it shows a ReadXml method at the 'Invoice': request.Event.Payload.Invoice.ReadXml(reader);

Does anyone have an example of how to create a request based on XSD Message and XSD schema?

Thanks in advance, Ruben
Feb 5, 2008 at 11:14 PM
Can you specify the technology and the serialization type and if you can send a sample of your schema so we can repro this scenario.

Feb 6, 2008 at 5:27 PM
Hi CF, the serialization type is XmlSerializer, WCF technology. The XSD I am using is too long to paste here.
I found a workaround to the problem. The root element of the XSD 'Event' must expose ReadXml() in order to load the XML from the XSD request message contract. At the event class in the generated proxy class I have to implement System.Xml.Serialization.IXmlSerializable on the Event class. I have tested and it works properly.

Now I would like to know why the generated proxy class always implements System.Xml.Serialization.IXmlSerializable on Invoice no matter what I do and doesn't do it on Event class.

Thank you, R
Feb 6, 2008 at 6:55 PM
It seems that invoice has some member or type that requires some special case that is not supported in the standard attr driven behavior. Check som info regarding XmlSerialization that should require IXmlSerializable.