SOAPFactory omfactory = OMAbstractFactory.getSOAP11Factory();
OMNamespace opN = omfactory.createOMNamespace("urn:GoogleSearch",
"ns1");
OMNamespace emptyNs = omfactory.createOMNamespace("", null);
OMElement method = omfactory.createOMElement("doSpellingSuggestion",
opN);
method.declareNamespace("http://www.w3.org/1999/XMLSchema-instance",
"xsi");
method.declareNamespace("http://www.w3.org/1999/XMLSchema", "xsd");
//reqEnv.getBody().addChild(method);
method.addAttribute("soapenv:encodingStyle",
"http://schemas.xmlsoap.org/soap/encoding/",
null);
OMElement value1 = omfactory.createOMElement("key", emptyNs);
OMElement value2 = omfactory.createOMElement("phrase", emptyNs);
value1.addAttribute("xsi:type", "xsd:string", null);
value2.addAttribute("xsi:type", "xsd:string", null);
value1.addChild(
omfactory.createText(value1, PropertyLoader.getGoogleKey()));
value2.addChild(omfactory.createText(value2, word));
method.addChild(value1);
method.addChild(value2);
return method;
}