Tech
Forums
Jobs
Books
Events
Live
Interviews Prep
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
0
Reply
How to add attributes to node
Eliseo Gonzalez
Nov 13 2017 5:46 PM
172
Reply
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
>
<!--Zero or more repetitions:-->
<
tem:venta
attr1
=
"?"
attr2
=
"?"
>
<!--Zero or more repetitions:-->
<
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
>
<!--Optional:-->
<
tem:venta
>
<!--Zero or more repetitions:-->
<
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
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
0
)
Next Recommended Forum
Powerapps-Need to create datasource in Hard drive
Solution and technology for between clients and servers