I am new to Scala and stuck on this issue. I am trying to construct a SOAP XML message using scala.xml. I need to dynamically add the nil attribute to the nodes that have no value. I am doing that as below
<temp>{tag._2}</temp>.copy(label=tag._1)% Attribute("xsi","nil",Text("true"),Null) This generates the string I need but on the SOAP envelope it also adds the prefixed namespace as xmlns:xsi="xsi" shown below
<SOAP-ENV:Envelope .... xmlns:xsi="xsi"> ... <employee> <firstname>John</firstname> <lastname>Smith</lastname> <dob xsi:nil="true"/> </employee> <employee> .... </employee> </SOAP-ENV:Envelope> I need the namespace value to be something else. Is there a way to specify the namespace for this prefixed attribute?
No comments:
Post a Comment