//change the import location in wsdl file
OutputStream wsdloutput = new BufferedOutputStream(new FileOutputStream(wsdlFile));
WSDLWriter wsdlWriter = WSDLFactory.newInstance().newWSDLWriter();
LoadingByteArrayOutputStream bout = new LoadingByteArrayOutputStream();
wsdlWriter.writeWSDL(def, bout);
Element defEle = StaxUtils.read(bout.createInputStream()).getDocumentElement();
List<Element> xsdElements = DOMUtils.findAllElementsByTagNameNS(defEle,
WSDLConstants.NS_SCHEMA_XSD,
"schema");
for (Element xsdEle : xsdElements) {
updateImports(xsdEle, sourceMap);