简体   繁体   中英

AXIS2 and WSDL parsing: exclude schemas

According to the process of creation AXISService we should parse WSDL file and all imported schemas. But in case of big WebServices it takes a lot of memory(aproximately 200-300 Mb) Is there any abilities to exclude processing of schemas?

I parse WSDL by ibm implementation of javax.wsdl.*

Sample of code:

public static Definition read(FileObject wsdlFile)
        throws Exception
{
    try {
        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        reader.setFeature("javax.wsdl.importDocuments", true);
        return reader.readWSDL(new UnifiedURIResolver(wsdlFile));
    } finally {
        VfsUtils.close(wsdlFile);
    }
}

解决方案是将xsd处理到UnifiedURIResolver类(URIResolver的实现)中,如果导入xsd,则应返回null

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM