Hi all of you, I hope to be clear (sorry for my English).
I need to create the following soap xml.
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
- <soapenv:Header/>
- <soapenv:Body>
- <tem:ventas>
-
- <tem:venta attr1="?" attr2 ="?">
-
- <tem:material attr1="?" attr2 ="?"/>
- </tem:venta>
- </tem:ventas>
- </soapenv:Body>
- </soapenv:Envelope>
I am writing a Service Contract like this:
- namespace Arx2Casa
- {
-
- [DataContract]
- public class material
- {
- [XmlAttribute]
- public string attr1 { get; set; }
- [XmlAttribute]
- public string attr2 { get; set; }
- }
-
- [ServiceContract]
- [XmlSerializerFormat]
- public interface Arx2CasaIntf
- {
- [OperationContract]
- string ventas(material[] venta);
- }
-
- }
That contract generate the following REQUEST
- <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
- <soapenv:Header/>
- <soapenv:Body>
- <tem:ventas>
-
- <tem:venta>
-
- <tem:material attr1="?" attr2="?"/>
- </tem:venta>
- </tem:ventas>
- </soapenv:Body>
- </soapenv:Envelope>
How do I add attibutes to <tem:venta> node?
Is there other way to do that?
Thanks for you support.
Regards