當前位置: 首頁>>代碼示例>>Java>>正文


Java WSDLReader.setFeature方法代碼示例

本文整理匯總了Java中javax.wsdl.xml.WSDLReader.setFeature方法的典型用法代碼示例。如果您正苦於以下問題:Java WSDLReader.setFeature方法的具體用法?Java WSDLReader.setFeature怎麽用?Java WSDLReader.setFeature使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.wsdl.xml.WSDLReader的用法示例。


在下文中一共展示了WSDLReader.setFeature方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPortTypeOperations

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * 參考SoapMessageBuilder.SoapMessageBuilder(URL wsdlUrl)方法
 * 獲取portType中的所有operation
 *
 * @param wsdlUrl
 * @return
 */
private static List<Operation> getPortTypeOperations(String wsdlUrl) {
    List<Operation> operationList = new ArrayList();
    try {
        WSDLReader reader = new WSDLReaderImpl();
        reader.setFeature("javax.wsdl.verbose", false);
        Definition definition = reader.readWSDL(wsdlUrl.toString());
        Map<String, PortTypeImpl> defMap = definition.getAllPortTypes();
        Collection<PortTypeImpl> collection = defMap.values();
        for (PortTypeImpl portType : collection) {
            operationList.addAll(portType.getOperations());
        }
    } catch (WSDLException e) {
        System.out.println("get wsdl operation fail.");
        e.printStackTrace();
    }
    return operationList;
}
 
開發者ID:wuxinshui,項目名稱:boosters,代碼行數:25,代碼來源:OperatonUtils.java

示例2: getWSDL11Parser

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
public static synchronized WSDL11Parser getWSDL11Parser(String wsdlLocation) throws WSDLException, IOException {
    WSDL11Parser parser = null;
    
    if (parsers == null) {
        parsers = new TreeMap<String, WSDL11Parser>();
    } else {
        parser = parsers.get(wsdlLocation);
    }
    
    if (parser == null) {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        Definition definition = reader.readWSDL(wsdlLocation);

        parser = new WSDL11Parser(definition);
        
        parsers.put(wsdlLocation, parser);
    }
    
    return parser;
}
 
開發者ID:apache,項目名稱:incubator-taverna-common-activities,代碼行數:23,代碼來源:WSDL11Parser.java

示例3: readWSDL

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * Read the WSDL document and create a WSDL Definition.
 *
 * @param wsdlLocation location pointing to a WSDL XML definition.
 * @return the Definition.
 * @throws WSDLException If unable to read the WSDL
 */
public static Definition readWSDL(final String wsdlLocation) throws WSDLException {
    InputStream inputStream = null;
    try {
        URL url = getURL(wsdlLocation);
        inputStream = url.openStream();
        InputSource source = new InputSource(inputStream);
        source.setSystemId(url.toString());
        Document wsdlDoc = XMLHelper.getDocument(source);
        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
        WSDLReader reader = wsdlFactory.newWSDLReader();
        reader.setFeature("javax.wsdl.verbose", false);
        return reader.readWSDL(url.toString(), wsdlDoc);
    } catch (Exception e) {
        throw new WSDLException(WSDLException.OTHER_ERROR,
                SOAPMessages.MESSAGES.unableToReadWSDL(wsdlLocation), e);
    } finally {
        if (inputStream != null) {
            try {
                inputStream.close();
            } catch (IOException ioe) {
                LOGGER.error(ioe);
            }
        }
    }
}
 
開發者ID:jboss-switchyard,項目名稱:switchyard,代碼行數:33,代碼來源:WSDLUtil.java

示例4: readInTheWSDLFile

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * Read the WSDL file
 *
 * @param uri
 * @throws WSDLException
 */
public Definition readInTheWSDLFile(final String uri) throws WSDLException {

    WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
    reader.setFeature("javax.wsdl.importDocuments", true);

    ExtensionRegistry extReg = WSDLFactory.newInstance().newPopulatedExtensionRegistry();
    extReg.registerExtensionAttributeType(Input.class,
            new QName(AddressingConstants.Final.WSAW_NAMESPACE, AddressingConstants.WSA_ACTION),
            AttributeExtensible.STRING_TYPE);
    extReg.registerExtensionAttributeType(Output.class,
            new QName(AddressingConstants.Final.WSAW_NAMESPACE, AddressingConstants.WSA_ACTION),
            AttributeExtensible.STRING_TYPE);
    reader.setExtensionRegistry(extReg);

    return reader.readWSDL(uri);
    
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:24,代碼來源:CodeGenerationEngine.java

示例5: parseWSDLDefinition

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * Parse the WSDL definition using WSDL4J.
 */
protected Definition parseWSDLDefinition() throws WSDLException {
    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader reader = wsdlFactory.newWSDLReader();
    reader.setFeature("javax.wsdl.verbose", false);
    reader.setFeature("javax.wsdl.importDocuments", true);
    Definition definition = reader.readWSDL(this.wsdlLocation);
    return definition;
}
 
開發者ID:flowable,項目名稱:flowable-engine,代碼行數:12,代碼來源:WSDLImporter.java

示例6: getAllBindingOperation

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * 參考SoapMessageBuilder.SoapMessageBuilder(URL wsdlUrl)方法
 * 獲取binding節點的所有operation
 *
 * @param wsdlUrl
 * @return
 */
public static List<String> getAllBindingOperation(String wsdlUrl) {
    List<BindingOperation> operationList = new ArrayList();
    List<String> nameList = new ArrayList();
    try {
        WSDLReader reader = new WSDLReaderImpl();
        reader.setFeature("javax.wsdl.verbose", false);
        Definition definition = reader.readWSDL(wsdlUrl.toString());
        Map<String, BindingImpl> defMap = definition.getAllBindings();
        Collection<BindingImpl> collection = defMap.values();
        for (BindingImpl binding : collection) {
            operationList.addAll(binding.getBindingOperations());
        }
        for (BindingOperation operation:operationList) {
            nameList.add(operation.getName());
        }
    } catch (WSDLException e) {
        System.out.println("get wsdl operation fail.");
        e.printStackTrace();
    }
    return nameList;
}
 
開發者ID:wuxinshui,項目名稱:boosters,代碼行數:29,代碼來源:OperatonUtils.java

示例7: get

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
public synchronized Definition get( String url )
	throws WSDLException
{
	Definition definition = cache.get( url );
	if ( definition == null ) {
		WSDLReader reader = factory.newWSDLReader();
		reader.setFeature( "javax.wsdl.verbose", false );
		definition = reader.readWSDL( url );
		cache.put( url, definition );
	}
	return definition;
}
 
開發者ID:jolie,項目名稱:jolie,代碼行數:13,代碼來源:WSDLCache.java

示例8: getWSDLDefinition

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
private Definition getWSDLDefinition(String wsdlLocation) throws Exception
{
   WSDLFactory wsdlFactory = WSDLFactory.newInstance();
   WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
   wsdlReader.setFeature("javax.wsdl.importDocuments", false);
   wsdlReader.setFeature("javax.wsdl.verbose", false);

   Definition definition = wsdlReader.readWSDL(null, wsdlLocation);
   return definition;
}
 
開發者ID:jbossws,項目名稱:jbossws-cxf,代碼行數:11,代碼來源:JBWS2150TestCase.java

示例9: parseWSDLDefinition

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * Parse the WSDL definition using WSDL4J.
 */
private Definition parseWSDLDefinition() throws WSDLException {
  WSDLFactory wsdlFactory = WSDLFactory.newInstance();
  WSDLReader reader = wsdlFactory.newWSDLReader();
  reader.setFeature("javax.wsdl.verbose", false);
  reader.setFeature("javax.wsdl.importDocuments", true);
  Definition definition = reader.readWSDL(this.wsdlLocation);
  return definition;
}
 
開發者ID:logicalhacking,項目名稱:SecureBPMN,代碼行數:12,代碼來源:WSDLImporter.java

示例10: getDefinition

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
public static Definition getDefinition(IFile pathToWsdl) throws CoreException {
    try {
        WSDLFactory wsdlFactory = WSDLFactory.newInstance();
        WSDLReader newWSDLReader = wsdlFactory.newWSDLReader();

        newWSDLReader.setExtensionRegistry(wsdlFactory.newPopulatedExtensionRegistry());
        newWSDLReader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false);
        return newWSDLReader.readWSDL(pathToWsdl.getLocationURI().toString());
    } catch (WSDLException e) {
        throw getCoreException(null, e);
    }
}
 
開發者ID:Talend,項目名稱:tesb-studio-se,代碼行數:13,代碼來源:WSDLUtils.java

示例11: load

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
public static Definition load(String wsdlLocation, String filenamePrefix) throws InvocationTargetException, WSDLException {
    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader newWSDLReader = wsdlFactory.newWSDLReader();

    newWSDLReader.setExtensionRegistry(wsdlFactory.newPopulatedExtensionRegistry());
    newWSDLReader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false);
    return newWSDLReader.readWSDL(new InMemoryWSDLLocator(wsdlLocation, new WSDLLoader().load(wsdlLocation, filenamePrefix
            + "%d.wsdl")));
}
 
開發者ID:Talend,項目名稱:tesb-studio-se,代碼行數:10,代碼來源:WSDLHelper.java

示例12: setUp

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
protected void setUp() throws Exception {
    super.setUp();
    WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
    reader.setFeature("javax.wsdl.importDocuments", false);
    reader.setFeature("javax.wsdl.verbose", false);

    URL wsdlFile = new File(AbstractTestCase.basedir + testWSDLFile)
            .toURL();//getClass().getClassLoader().getResource(testWSDLFile);
    definition = reader.readWSDL(wsdlFile.toString());
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:11,代碼來源:WSDL11ActionHelperTest.java

示例13: configureReaderInstance

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * This will be called to configure the WSDLReader instance.
 */
public void configureReaderInstance(WSDLReader reader) throws WSDLException 
{
	// prevent the WSDLReader instance from using the System.out
	// stream for messages and logging
	reader.setFeature(com.ibm.wsdl.Constants.FEATURE_VERBOSE, false);
}
 
開發者ID:wso2,項目名稱:wso2-axis2,代碼行數:10,代碼來源:WSDLReaderConfiguratorImpl.java

示例14: getReader

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
/**
 * Get a WSDLReader.
 *
 * @return WSDLReader.
 * @throws WSDLException on error.
 */
private WSDLReader getReader() throws WSDLException {

    WSDLFactory wsdlFactory = WSDLFactory.newInstance();
    WSDLReader wsdlReader = wsdlFactory.newWSDLReader();
    ExtensionRegistry registry = wsdlFactory.newPopulatedExtensionRegistry();
    wsdlReader.setExtensionRegistry(registry);
    wsdlReader.setFeature("javax.wsdl.verbose", true);
    wsdlReader.setFeature("javax.wsdl.importDocuments", true);
    return wsdlReader;
}
 
開發者ID:icholy,項目名稱:geokettle-2.0,代碼行數:17,代碼來源:Wsdl.java

示例15: readWsdl

import javax.wsdl.xml.WSDLReader; //導入方法依賴的package包/類
private static Definition readWsdl(String wsdlUrl, boolean verbose, boolean resolveImports) {
    try {
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        reader.setFeature(Constants.FEATURE_VERBOSE, verbose);
        reader.setFeature(Constants.FEATURE_IMPORT_DOCUMENTS, resolveImports);
        return reader.readWSDL(wsdlUrl);
    } catch (WSDLException ex) {
    	throw new RuntimeException(ex);
    }
}
 
開發者ID:whummer,項目名稱:service-prefetching,代碼行數:12,代碼來源:WSClient.java


注:本文中的javax.wsdl.xml.WSDLReader.setFeature方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。