This is what I understand from Web Services.
Apache CXF(I am using Apache CXF) will unmarshal data it receives from Server(Service Provider) and convert it into already stubbed CXF Objects(from WSDL). Typically after that we transform these CXF objects into user defined objects to use it within our application. Now as originally problem has been depicted, since element type was "anyType", CXF objects(converted from WSDL) are by default java.lang.Object and in runtime(when I put my debugger on) it becomes instance of ElementNSImpl which I guess is from xerces.jar.
From the response, I can see that this tag can have multiple tags inside it and as of now, I am looking specifically 1 tag to use in my application. How to get to that tag in JAVA World, that's what my question is?
If my understanding is not correct, please let me know as I am newbie for Web Services.
After googling further, found following way to Read this object in String(though it's still not plain String, it's actually in XML format String) but still not getting any clear way to convert this String conversion into a hashtable with Key/Value pair. I am asking for Hashtable because as original problem depicts, it's "anyType" so I can't have pre-planned Java objects. Hashtable is the only way to get all tags under "Key" and value of those tags under "value" pair of hashtable.
Here is the snippet of WSDL defining this variable.
<xsd:element name="AnySampleObject" type="xsd:anyType" minOccurs="0" maxOccurs="1"/>
Here is the sysout for above code.
<?xml version="1.0" encoding="UTF-8"?>
Any help will be highly appreciated.