You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Vinod Soni <vi...@btinternet.com> on 2001/12/05 16:30:45 UTC

Help with attributes to Parameters

Hi All,

Can someone help me with this ?
I am trying to create a XML tag which is something like this:
<TAGNAME name="tag1" xsi:type="string">MyTagValue</TAGNAME>

How do I add the 'name' attribute to TAGNAME ??

What I do in my code is this:

Vector v = new Vector();
Parameter p1 = new Parameter("TAGNAME", String.class, "MyTagValue", null);
v.addElement(p1);

and what I get in Envelope is this because of this code:
<TAGNAME xsi:type="string">MyTagValue</TAGNAME>

Any suggestions on how to add attributes to Parameter Names ?
Also, when I do p.setName("name");
the XML changes to:
<name xsi:type="string">MyTagValue</name>

So it doesn't help this way.
Please help.

TIA
Vinod.