*
* @param result
*/
private void extractDetails(AsyncResult result) {
Iterator iterator, iterator2;
OMNode node;
SOAPBody body;
OMElement operation, elem;
SOAPEnvelope resEnvelope;
resEnvelope = result.getResponseEnvelope();
body = resEnvelope.getBody();
operation = body.getFirstElement();
if (body.hasFault()) {
snippet =
snippet +
"A Fault message received, Check your Licence key. Else you have reached the" +
" daily limit of 1000 requests";
} else {
OMElement part = operation.getFirstElement();
iterator = part.getChildren();
while (iterator.hasNext()) {
node = (OMNode) iterator.next();
if (node.getType() == OMNode.ELEMENT_NODE) {
elem = (OMElement) node;
String str = elem.getLocalName();
//System.out.println(str);
if (str.equals("resultElements")) {
//System.out.println("Got the Result Elements");
Iterator iterator0 = elem.getChildren();
while (iterator0.hasNext()) {
node = (OMNode) iterator0.next();
if (node.getType() == OMNode.ELEMENT_NODE) {
elem = (OMElement) node;
if (elem.getLocalName().equals("item")) {
iterator2 = elem.getChildren();
while (iterator2.hasNext()) {
node = (OMNode) iterator2.next();
if (node.getType() ==
OMNode.ELEMENT_NODE) {
elem = (OMElement) node;
String str3 = elem.getLocalName();
if (elem.getLocalName().equals(
"snippet")) {