}
schema.write(writer);
writer.flush();
Document doc = domBuilder.parse(new ByteArrayInputStream(writer.toString().getBytes()));
Element documentElement = doc.getDocumentElement();
WSDLDescription womDescription;
WSDLComponentFactory wsdlComponentFactory = new WSDLDescriptionImpl();
womDescription = wsdlComponentFactory.createDescription();
HashMap namespaceMap = new HashMap();
namespaceMap.put("soap", "http://schemas.xmlsoap.org/wsdl/soap/");
namespaceMap.put(targetNamespecheprefix, targetNamespece);
namespaceMap.put("ns1", "http://org.apache.axis2/xsd");
namespaceMap.put("xs", "http://www.w3.org/2001/XMLSchema");
womDescription.setNamespaces(namespaceMap);
womDescription.setTargetNameSpace(targetNamespece);
//generating port type
WSDLInterface portType = generatePortType(womDescription, wsdlComponentFactory, documentElement);
womDescription.addInterface(portType);
QName bindingName = new QName(targetNamespece, axisService.getName() + "Binding"
, targetNamespecheprefix);
//generating binding
WSDLBinding binding = generateBinding(wsdlComponentFactory,
portType,
bindingName,
"document", "literal", "http://schemas.xmlsoap.org/soap/http",
"http://www.org.apache.axis2");
womDescription.addBinding(binding);
//generating axisService
WSDLService service = generateService(wsdlComponentFactory, binding,
axisService.getName(), url);
womDescription.addService(service);
return womDescription;
}