Organizational Research By

Surprising Reserch Topic

Question:Adding Data in XmlObject

I have to code a Web service client, compliant to Axis2 1.5.4. The part of code giving the problem is as follows:

String my_var = "some value";
MetaDataEntry metaDataEntry = MetaDataEntry.Factory.newInstance();

Now basically the setKey woks fine but setValue expects an XmlObject value while according to the sample response document I have got, the xml structure should be like :


   some _value


I've tried using :


MetaDataEntry.setValue(XmlObject.Factory.parse(""+my_var+"")); but it makes the value tag as some_value


metaDataEntry.setValue(XmlObject.Factory.parse(my_var)); but it gives an exception 'Unexpected Element: CDATA'

Can anybody please help me write the correct statement?

asked Sep 13, 2013 in Core java by anonymous
edited Sep 12, 2013
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.